From f457071cb4c38afc8246960de45f7a1d809370ca Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 12 Sep 2024 21:59:18 +0000 Subject: [PATCH 1/2] feat: add `satisfies_pzi` to `Environment` PiperOrigin-RevId: 673910740 Source-Link: https://github.com/googleapis/googleapis/commit/dcc4f933bfbc0bc805187ae7f65b3b6be23fd1c3 Source-Link: https://github.com/googleapis/googleapis-gen/commit/0683c793d18547a017f446533bed4bcd09f565d9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW9yY2hlc3RyYXRpb24tYWlyZmxvdy1zZXJ2aWNlLy5Pd2xCb3QueWFtbCIsImgiOiIwNjgzYzc5M2QxODU0N2EwMTdmNDQ2NTMzYmVkNGJjZDA5ZjU2NWQ5In0= --- .../v1/.eslintignore | 7 + .../v1/.eslintrc.json | 3 + .../v1/.gitignore | 14 + .../v1/.jsdoc.js | 55 + .../v1/.mocharc.js | 33 + .../v1/.prettierrc.js | 22 + .../v1/README.md | 1 + .../v1/package.json | 59 + .../airflow/service/v1/environments.proto | 2075 + .../airflow/service/v1/image_versions.proto | 90 + .../airflow/service/v1/operations.proto | 97 + .../v1/protos/protos.d.ts | 16914 ++++++ .../v1/protos/protos.js | 42770 +++++++++++++++ .../v1/protos/protos.json | 4446 ++ .../v1/environments.check_upgrade.js | 87 + .../v1/environments.create_environment.js | 66 + ...nments.create_user_workloads_config_map.js | 67 + ...vironments.create_user_workloads_secret.js | 67 + .../v1/environments.database_failover.js | 62 + .../v1/environments.delete_environment.js | 62 + ...nments.delete_user_workloads_config_map.js | 62 + ...vironments.delete_user_workloads_secret.js | 62 + .../environments.execute_airflow_command.js | 76 + .../environments.fetch_database_properties.js | 62 + .../v1/environments.get_environment.js | 61 + ...ironments.get_user_workloads_config_map.js | 62 + .../environments.get_user_workloads_secret.js | 62 + .../v1/environments.list_environments.js | 71 + ...onments.list_user_workloads_config_maps.js | 73 + ...nvironments.list_user_workloads_secrets.js | 73 + .../v1/environments.list_workloads.js | 82 + .../v1/environments.load_snapshot.js | 87 + .../v1/environments.poll_airflow_command.js | 77 + .../v1/environments.save_snapshot.js | 67 + .../v1/environments.stop_airflow_command.js | 78 + .../v1/environments.update_environment.js | 184 + ...nments.update_user_workloads_config_map.js | 60 + ...vironments.update_user_workloads_secret.js | 60 + .../v1/image_versions.list_image_versions.js | 75 + ...loud.orchestration.airflow.service.v1.json | 1155 + .../v1/src/index.ts | 27 + .../v1/src/v1/environments_client.ts | 3311 ++ .../v1/src/v1/environments_client_config.json | 122 + .../v1/src/v1/environments_proto_list.json | 5 + .../v1/src/v1/gapic_metadata.json | 307 + .../v1/src/v1/image_versions_client.ts | 714 + .../src/v1/image_versions_client_config.json | 30 + .../v1/src/v1/image_versions_proto_list.json | 5 + .../v1/src/v1/index.ts | 20 + .../system-test/fixtures/sample/src/index.js | 28 + .../system-test/fixtures/sample/src/index.ts | 38 + .../v1/system-test/install.ts | 49 + .../v1/test/gapic_environments_v1.ts | 4159 ++ .../v1/test/gapic_image_versions_v1.ts | 663 + .../v1/tsconfig.json | 19 + .../v1/webpack.config.js | 64 + .../v1beta1/.eslintignore | 7 + .../v1beta1/.eslintrc.json | 3 + .../v1beta1/.gitignore | 14 + .../v1beta1/.jsdoc.js | 55 + .../v1beta1/.mocharc.js | 33 + .../v1beta1/.prettierrc.js | 22 + .../v1beta1/README.md | 1 + .../v1beta1/package.json | 59 + .../service/v1beta1/environments.proto | 2145 + .../service/v1beta1/image_versions.proto | 90 + .../airflow/service/v1beta1/operations.proto | 93 + .../v1beta1/protos/protos.d.ts | 17037 ++++++ .../v1beta1/protos/protos.js | 43000 ++++++++++++++++ .../v1beta1/protos/protos.json | 4529 ++ .../v1beta1/environments.check_upgrade.js | 86 + .../environments.create_environment.js | 66 + ...nments.create_user_workloads_config_map.js | 67 + ...vironments.create_user_workloads_secret.js | 67 + .../v1beta1/environments.database_failover.js | 62 + .../environments.delete_environment.js | 62 + ...nments.delete_user_workloads_config_map.js | 62 + ...vironments.delete_user_workloads_secret.js | 62 + .../environments.execute_airflow_command.js | 76 + .../environments.fetch_database_properties.js | 62 + .../v1beta1/environments.get_environment.js | 61 + ...ironments.get_user_workloads_config_map.js | 62 + .../environments.get_user_workloads_secret.js | 62 + .../v1beta1/environments.list_environments.js | 71 + ...onments.list_user_workloads_config_maps.js | 73 + ...nvironments.list_user_workloads_secrets.js | 73 + .../v1beta1/environments.list_workloads.js | 82 + .../v1beta1/environments.load_snapshot.js | 87 + .../environments.poll_airflow_command.js | 77 + .../environments.restart_web_server.js | 63 + .../v1beta1/environments.save_snapshot.js | 67 + .../environments.stop_airflow_command.js | 78 + .../environments.update_environment.js | 206 + ...nments.update_user_workloads_config_map.js | 60 + ...vironments.update_user_workloads_secret.js | 60 + .../image_versions.list_image_versions.js | 75 + ...orchestration.airflow.service.v1beta1.json | 1195 + .../v1beta1/src/index.ts | 27 + .../src/v1beta1/environments_client.ts | 3431 ++ .../v1beta1/environments_client_config.json | 126 + .../src/v1beta1/environments_proto_list.json | 5 + .../v1beta1/src/v1beta1/gapic_metadata.json | 317 + .../src/v1beta1/image_versions_client.ts | 714 + .../v1beta1/image_versions_client_config.json | 30 + .../v1beta1/image_versions_proto_list.json | 5 + .../v1beta1/src/v1beta1/index.ts | 20 + .../system-test/fixtures/sample/src/index.js | 28 + .../system-test/fixtures/sample/src/index.ts | 38 + .../v1beta1/system-test/install.ts | 49 + .../test/gapic_environments_v1beta1.ts | 4313 ++ .../test/gapic_image_versions_v1beta1.ts | 663 + .../v1beta1/tsconfig.json | 19 + .../v1beta1/webpack.config.js | 64 + 113 files changed, 159208 insertions(+) create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.eslintignore create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/README.md create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/package.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/environments.proto create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/operations.proto create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.check_upgrade.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_environment.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_user_workloads_config_map.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_user_workloads_secret.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.database_failover.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_environment.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_user_workloads_config_map.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_user_workloads_secret.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.execute_airflow_command.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.fetch_database_properties.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_environment.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_user_workloads_config_map.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_user_workloads_secret.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_environments.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_user_workloads_config_maps.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_user_workloads_secrets.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_workloads.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.load_snapshot.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.poll_airflow_command.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.save_snapshot.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.stop_airflow_command.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_environment.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_user_workloads_config_map.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_user_workloads_secret.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/image_versions.list_image_versions.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/index.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_client.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_client_config.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_proto_list.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_client.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_client_config.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_proto_list.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/index.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/test/gapic_environments_v1.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/test/gapic_image_versions_v1.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/webpack.config.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.eslintignore create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.gitignore create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.prettierrc.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/README.md create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/package.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.check_upgrade.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_environment.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_user_workloads_config_map.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_user_workloads_secret.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.database_failover.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_environment.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_user_workloads_config_map.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_user_workloads_secret.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.execute_airflow_command.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.fetch_database_properties.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_environment.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_user_workloads_config_map.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_user_workloads_secret.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_environments.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_user_workloads_config_maps.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_user_workloads_secrets.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_workloads.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.load_snapshot.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.poll_airflow_command.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.restart_web_server.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.save_snapshot.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.stop_airflow_command.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_environment.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_user_workloads_config_map.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_user_workloads_secret.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/image_versions.list_image_versions.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/index.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_client.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_client_config.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_proto_list.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_client.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_client_config.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_proto_list.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/index.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/test/gapic_environments_v1beta1.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/test/gapic_image_versions_v1beta1.ts create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/webpack.config.js diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.eslintignore b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.eslintrc.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.gitignore b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.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-orchestration-airflow-service/v1/.jsdoc.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.jsdoc.js new file mode 100644 index 00000000000..86e4179a983 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 2024 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/orchestration-airflow', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.mocharc.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.mocharc.js new file mode 100644 index 00000000000..13b67c34edc --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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-orchestration-airflow-service/v1/.prettierrc.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.prettierrc.js new file mode 100644 index 00000000000..9a8fd690982 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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-orchestration-airflow-service/v1/README.md b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/README.md new file mode 100644 index 00000000000..536af38a9bb --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/README.md @@ -0,0 +1 @@ +Service: Nodejs Client diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/package.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/package.json new file mode 100644 index 00000000000..5d2f497a88a --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/package.json @@ -0,0 +1,59 @@ +{ + "name": "@google-cloud/orchestration-airflow", + "version": "0.1.0", + "description": "Service client for Node.js", + "repository": "googleapis/nodejs-service", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google service", + "service", + "environments", + "image versions" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^4.3.4" + }, + "devDependencies": { + "@types/mocha": "^10.0.6", + "@types/node": "^20.12.12", + "@types/sinon": "^10.0.20", + "c8": "^9.1.0", + "gapic-tools": "^0.4.2", + "gts": "5.3.0", + "jsdoc": "^4.0.3", + "jsdoc-fresh": "^3.0.0", + "jsdoc-region-tag": "^3.0.0", + "mocha": "^10.4.0", + "pack-n-play": "^2.0.3", + "sinon": "^15.2.0", + "typescript": "5.1.6" + }, + "engines": { + "node": ">=v14" + } +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/environments.proto b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/environments.proto new file mode 100644 index 00000000000..9976999b6f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/environments.proto @@ -0,0 +1,2075 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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.orchestration.airflow.service.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/orchestration/airflow/service/v1/operations.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/orchestration/airflow/service/apiv1/servicepb;servicepb"; +option java_multiple_files = true; +option java_package = "com.google.cloud.orchestration.airflow.service.v1"; + +// Managed Apache Airflow Environments. +service Environments { + option (google.api.default_host) = "composer.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Create a new environment. + rpc CreateEnvironment(CreateEnvironmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/environments" + body: "environment" + }; + option (google.api.method_signature) = "parent,environment"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }; + } + + // Get an existing environment. + rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List environments. + rpc ListEnvironments(ListEnvironmentsRequest) + returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/environments" + }; + option (google.api.method_signature) = "parent"; + } + + // Update an environment. + rpc UpdateEnvironment(UpdateEnvironmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1/{name=projects/*/locations/*/environments/*}" + body: "environment" + }; + option (google.api.method_signature) = "name,environment,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }; + } + + // Delete an environment. + rpc DeleteEnvironment(DeleteEnvironmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }; + } + + // Executes Airflow CLI command. + rpc ExecuteAirflowCommand(ExecuteAirflowCommandRequest) + returns (ExecuteAirflowCommandResponse) { + option (google.api.http) = { + post: "/v1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand" + body: "*" + }; + } + + // Stops Airflow CLI command execution. + rpc StopAirflowCommand(StopAirflowCommandRequest) + returns (StopAirflowCommandResponse) { + option (google.api.http) = { + post: "/v1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand" + body: "*" + }; + } + + // Polls Airflow CLI command execution and fetches logs. + rpc PollAirflowCommand(PollAirflowCommandRequest) + returns (PollAirflowCommandResponse) { + option (google.api.http) = { + post: "/v1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand" + body: "*" + }; + } + + // Lists workloads in a Cloud Composer environment. Workload is a unit that + // runs a single Composer component. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc ListWorkloads(ListWorkloadsRequest) returns (ListWorkloadsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/environments/*}/workloads" + }; + option (google.api.method_signature) = "parent"; + } + + // Check if an upgrade operation on the environment will succeed. + // + // In case of problems detailed info can be found in the returned Operation. + rpc CheckUpgrade(CheckUpgradeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{environment=projects/*/locations/*/environments/*}:checkUpgrade" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse" + metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }; + } + + // Creates a user workloads Secret. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc CreateUserWorkloadsSecret(CreateUserWorkloadsSecretRequest) + returns (UserWorkloadsSecret) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets" + body: "user_workloads_secret" + }; + option (google.api.method_signature) = "parent,user_workloads_secret"; + } + + // Gets an existing user workloads Secret. + // Values of the "data" field in the response are cleared. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc GetUserWorkloadsSecret(GetUserWorkloadsSecretRequest) + returns (UserWorkloadsSecret) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists user workloads Secrets. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc ListUserWorkloadsSecrets(ListUserWorkloadsSecretsRequest) + returns (ListUserWorkloadsSecretsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates a user workloads Secret. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc UpdateUserWorkloadsSecret(UpdateUserWorkloadsSecretRequest) + returns (UserWorkloadsSecret) { + option (google.api.http) = { + put: "/v1/{user_workloads_secret.name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" + body: "user_workloads_secret" + }; + option (google.api.method_signature) = "user_workloads_secret"; + } + + // Deletes a user workloads Secret. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc DeleteUserWorkloadsSecret(DeleteUserWorkloadsSecretRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a user workloads ConfigMap. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc CreateUserWorkloadsConfigMap(CreateUserWorkloadsConfigMapRequest) + returns (UserWorkloadsConfigMap) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps" + body: "user_workloads_config_map" + }; + option (google.api.method_signature) = "parent,user_workloads_config_map"; + } + + // Gets an existing user workloads ConfigMap. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc GetUserWorkloadsConfigMap(GetUserWorkloadsConfigMapRequest) + returns (UserWorkloadsConfigMap) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists user workloads ConfigMaps. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc ListUserWorkloadsConfigMaps(ListUserWorkloadsConfigMapsRequest) + returns (ListUserWorkloadsConfigMapsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates a user workloads ConfigMap. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc UpdateUserWorkloadsConfigMap(UpdateUserWorkloadsConfigMapRequest) + returns (UserWorkloadsConfigMap) { + option (google.api.http) = { + put: "/v1/{user_workloads_config_map.name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" + body: "user_workloads_config_map" + }; + option (google.api.method_signature) = "user_workloads_config_map"; + } + + // Deletes a user workloads ConfigMap. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc DeleteUserWorkloadsConfigMap(DeleteUserWorkloadsConfigMapRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a snapshots of a Cloud Composer environment. + // + // As a result of this operation, snapshot of environment's state is stored + // in a location specified in the SaveSnapshotRequest. + rpc SaveSnapshot(SaveSnapshotRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{environment=projects/*/locations/*/environments/*}:saveSnapshot" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse" + metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }; + } + + // Loads a snapshot of a Cloud Composer environment. + // + // As a result of this operation, a snapshot of environment's specified in + // LoadSnapshotRequest is loaded into the environment. + rpc LoadSnapshot(LoadSnapshotRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{environment=projects/*/locations/*/environments/*}:loadSnapshot" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse" + metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }; + } + + // Triggers database failover (only for highly resilient environments). + rpc DatabaseFailover(DatabaseFailoverRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{environment=projects/*/locations/*/environments/*}:databaseFailover" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse" + metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }; + } + + // Fetches database properties. + rpc FetchDatabaseProperties(FetchDatabasePropertiesRequest) + returns (FetchDatabasePropertiesResponse) { + option (google.api.http) = { + get: "/v1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties" + }; + } +} + +// Create a new environment. +message CreateEnvironmentRequest { + // The parent must be of the form + // "projects/{projectId}/locations/{locationId}". + string parent = 1; + + // The environment to create. + Environment environment = 2; +} + +// Get an environment. +message GetEnvironmentRequest { + // The resource name of the environment to get, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 1; +} + +// List environments in a project and location. +message ListEnvironmentsRequest { + // List environments in the given project and location, in the form: + // "projects/{projectId}/locations/{locationId}" + string parent = 1; + + // The maximum number of environments to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// The environments in a project and location. +message ListEnvironmentsResponse { + // The list of environments returned by a ListEnvironmentsRequest. + repeated Environment environments = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// Delete an environment. +message DeleteEnvironmentRequest { + // The environment to delete, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 1; +} + +// Update an environment. +message UpdateEnvironmentRequest { + // The relative resource name of the environment to update, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 2; + + // A patch environment. Fields specified by the `updateMask` will be copied + // from the patch environment into the environment under update. + Environment environment = 1; + + // Required. A comma-separated list of paths, relative to `Environment`, of + // fields to update. + // For example, to set the version of scikit-learn to install in the + // environment to 0.19.0 and to remove an existing installation of + // numpy, the `updateMask` parameter would include the following two + // `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + // "config.softwareConfig.pypiPackages.numpy". The included patch + // environment would specify the scikit-learn version as follows: + // + // { + // "config":{ + // "softwareConfig":{ + // "pypiPackages":{ + // "scikit-learn":"==0.19.0" + // } + // } + // } + // } + // + // Note that in the above example, any existing PyPI packages + // other than scikit-learn and numpy will be unaffected. + // + // Only one update type may be included in a single request's `updateMask`. + // For example, one cannot update both the PyPI packages and + // labels in the same request. However, it is possible to update multiple + // members of a map field simultaneously in the same request. For example, + // to set the labels "label1" and "label2" while clearing "label3" (assuming + // it already exists), one can + // provide the paths "labels.label1", "labels.label2", and "labels.label3" + // and populate the patch environment as follows: + // + // { + // "labels":{ + // "label1":"new-label1-value" + // "label2":"new-label2-value" + // } + // } + // + // Note that in the above example, any existing labels that are not + // included in the `updateMask` will be unaffected. + // + // It is also possible to replace an entire map field by providing the + // map field's path in the `updateMask`. The new value of the field will + // be that which is provided in the patch environment. For example, to + // delete all pre-existing user-specified PyPI packages and + // install botocore at version 1.7.14, the `updateMask` would contain + // the path "config.softwareConfig.pypiPackages", and + // the patch environment would be the following: + // + // { + // "config":{ + // "softwareConfig":{ + // "pypiPackages":{ + // "botocore":"==1.7.14" + // } + // } + // } + // } + // + // **Note:** Only the following fields can be updated: + // + // * `config.softwareConfig.pypiPackages` + // * Replace all custom custom PyPI packages. If a replacement + // package map is not included in `environment`, all custom + // PyPI packages are cleared. It is an error to provide both + // this mask and a mask specifying an individual package. + // * `config.softwareConfig.pypiPackages.`packagename + // * Update the custom PyPI package *packagename*, + // preserving other packages. To delete the package, include it in + // `updateMask`, and omit the mapping for it in + // `environment.config.softwareConfig.pypiPackages`. It is an error + // to provide both a mask of this form and the + // `config.softwareConfig.pypiPackages` mask. + // * `labels` + // * Replace all environment labels. If a replacement labels map is not + // included in `environment`, all labels are cleared. It is an error to + // provide both this mask and a mask specifying one or more individual + // labels. + // * `labels.`labelName + // * Set the label named *labelName*, while preserving other + // labels. To delete the label, include it in `updateMask` and omit its + // mapping in `environment.labels`. It is an error to provide both a + // mask of this form and the `labels` mask. + // * `config.nodeCount` + // * Horizontally scale the number of nodes in the environment. An integer + // greater than or equal to 3 must be provided in the `config.nodeCount` + // field. Supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + // * `config.webServerNetworkAccessControl` + // * Replace the environment's current `WebServerNetworkAccessControl`. + // * `config.softwareConfig.airflowConfigOverrides` + // * Replace all Apache Airflow config overrides. If a replacement config + // overrides map is not included in `environment`, all config overrides + // are cleared. + // It is an error to provide both this mask and a mask specifying one or + // more individual config overrides. + // * `config.softwareConfig.airflowConfigOverrides.`section-name + // * Override the Apache Airflow config property *name* in the + // section named *section*, preserving other properties. To + // delete the property override, include it in `updateMask` and omit its + // mapping in + // `environment.config.softwareConfig.airflowConfigOverrides`. + // It is an error to provide both a mask of this form and the + // `config.softwareConfig.airflowConfigOverrides` mask. + // * `config.softwareConfig.envVariables` + // * Replace all environment variables. If a replacement environment + // variable map is not included in `environment`, all custom environment + // variables are cleared. + // * `config.softwareConfig.schedulerCount` + // * Horizontally scale the number of schedulers in Airflow. A positive + // integer not greater than the number of nodes must be provided in the + // `config.softwareConfig.schedulerCount` field. Supported for Cloud + // Composer environments in versions composer-1.*.*-airflow-2.*.*. + // * `config.databaseConfig.machineType` + // * Cloud SQL machine type used by Airflow database. + // It has to be one of: db-n1-standard-2, db-n1-standard-4, + // db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer + // environments in versions composer-1.*.*-airflow-*.*.*. + // * `config.webServerConfig.machineType` + // * Machine type on which Airflow web server is running. + // It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 + // or composer-n1-webserver-8. Supported for Cloud Composer environments + // in versions composer-1.*.*-airflow-*.*.*. + google.protobuf.FieldMask update_mask = 3; +} + +// Execute Airflow Command request. +message ExecuteAirflowCommandRequest { + // The resource name of the environment in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + string environment = 1; + + // Airflow command. + string command = 2; + + // Airflow subcommand. + string subcommand = 3; + + // Parameters for the Airflow command/subcommand as an array of arguments. + // It may contain positional arguments like `["my-dag-id"]`, key-value + // parameters like `["--foo=bar"]` or `["--foo","bar"]`, + // or other flags like `["-f"]`. + repeated string parameters = 4; +} + +// Response to ExecuteAirflowCommandRequest. +message ExecuteAirflowCommandResponse { + // The unique ID of the command execution for polling. + string execution_id = 1; + + // The name of the pod where the command is executed. + string pod = 2; + + // The namespace of the pod where the command is executed. + string pod_namespace = 3; + + // Error message. Empty if there was no error. + string error = 4; +} + +// Stop Airflow Command request. +message StopAirflowCommandRequest { + // The resource name of the environment in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + string environment = 1; + + // The unique ID of the command execution. + string execution_id = 2; + + // The name of the pod where the command is executed. + string pod = 3; + + // The namespace of the pod where the command is executed. + string pod_namespace = 4; + + // If true, the execution is terminated forcefully (SIGKILL). If false, the + // execution is stopped gracefully, giving it time for cleanup. + bool force = 5; +} + +// Response to StopAirflowCommandRequest. +message StopAirflowCommandResponse { + // Whether the execution is still running. + bool is_done = 1; + + // Output message from stopping execution request. + repeated string output = 2; +} + +// Poll Airflow Command request. +message PollAirflowCommandRequest { + // The resource name of the environment in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1; + + // The unique ID of the command execution. + string execution_id = 2; + + // The name of the pod where the command is executed. + string pod = 3; + + // The namespace of the pod where the command is executed. + string pod_namespace = 4; + + // Line number from which new logs should be fetched. + int32 next_line_number = 5; +} + +// Response to PollAirflowCommandRequest. +message PollAirflowCommandResponse { + // Contains information about a single line from logs. + message Line { + // Number of the line. + int32 line_number = 1; + + // Text content of the log line. + string content = 2; + } + + // Information about how a command ended. + message ExitInfo { + // The exit code from the command execution. + int32 exit_code = 1; + + // Error message. Empty if there was no error. + string error = 2; + } + + // Output from the command execution. It may not contain the full output + // and the caller may need to poll for more lines. + repeated Line output = 1; + + // Whether the command execution has finished and there is no more output. + bool output_end = 2; + + // The result exit status of the command. + ExitInfo exit_info = 3; +} + +// Create user workloads Secret request. +message CreateUserWorkloadsSecretRequest { + // Required. The environment name to create a Secret for, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/Environment" + } + ]; + + // Required. User workloads Secret to create. + UserWorkloadsSecret user_workloads_secret = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Get user workloads Secret request. +message GetUserWorkloadsSecretRequest { + // Required. The resource name of the Secret to get, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/UserWorkloadsSecret" + } + ]; +} + +// List user workloads Secrets request. +message ListUserWorkloadsSecretsRequest { + // Required. List Secrets in the given environment, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/Environment" + } + ]; + + // Optional. The maximum number of Secrets to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous List request, + // if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update user workloads Secret request. +message UpdateUserWorkloadsSecretRequest { + // Optional. User workloads Secret to override. + UserWorkloadsSecret user_workloads_secret = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete user workloads Secret request. +message DeleteUserWorkloadsSecretRequest { + // Required. The Secret to delete, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/UserWorkloadsSecret" + } + ]; +} + +// Create user workloads ConfigMap request. +message CreateUserWorkloadsConfigMapRequest { + // Required. The environment name to create a ConfigMap for, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/Environment" + } + ]; + + // Required. User workloads ConfigMap to create. + UserWorkloadsConfigMap user_workloads_config_map = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Get user workloads ConfigMap request. +message GetUserWorkloadsConfigMapRequest { + // Required. The resource name of the ConfigMap to get, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/UserWorkloadsConfigMap" + } + ]; +} + +// List user workloads ConfigMaps request. +message ListUserWorkloadsConfigMapsRequest { + // Required. List ConfigMaps in the given environment, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/Environment" + } + ]; + + // Optional. The maximum number of ConfigMaps to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous List request, + // if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update user workloads ConfigMap request. +message UpdateUserWorkloadsConfigMapRequest { + // Optional. User workloads ConfigMap to override. + UserWorkloadsConfigMap user_workloads_config_map = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete user workloads ConfigMap request. +message DeleteUserWorkloadsConfigMapRequest { + // Required. The ConfigMap to delete, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/UserWorkloadsConfigMap" + } + ]; +} + +// User workloads Secret used by Airflow tasks that run with Kubernetes executor +// or KubernetesPodOperator. +message UserWorkloadsSecret { + option (google.api.resource) = { + type: "composer.googleapis.com/UserWorkloadsSecret" + pattern: "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}" + plural: "userWorkloadsSecrets" + singular: "userWorkloadsSecret" + }; + + // Identifier. The resource name of the Secret, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The "data" field of Kubernetes Secret, organized in key-value + // pairs, which can contain sensitive values such as a password, a token, or a + // key. The values for all keys have to be base64-encoded strings. For details + // see: https://kubernetes.io/docs/concepts/configuration/secret/ + map data = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The user workloads Secrets for a given environment. +message ListUserWorkloadsSecretsResponse { + // The list of Secrets returned by a ListUserWorkloadsSecretsRequest. + repeated UserWorkloadsSecret user_workloads_secrets = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// User workloads ConfigMap used by Airflow tasks that run with Kubernetes +// executor or KubernetesPodOperator. +message UserWorkloadsConfigMap { + option (google.api.resource) = { + type: "composer.googleapis.com/UserWorkloadsConfigMap" + pattern: "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}" + plural: "userWorkloadsConfigMaps" + singular: "userWorkloadsConfigMap" + }; + + // Identifier. The resource name of the ConfigMap, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The "data" field of Kubernetes ConfigMap, organized in key-value + // pairs. For details see: + // https://kubernetes.io/docs/concepts/configuration/configmap/ + map data = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The user workloads ConfigMaps for a given environment. +message ListUserWorkloadsConfigMapsResponse { + // The list of ConfigMaps returned by a ListUserWorkloadsConfigMapsRequest. + repeated UserWorkloadsConfigMap user_workloads_config_maps = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// Request for listing workloads in a Cloud Composer environment. +message ListWorkloadsRequest { + // Required. The environment name to get workloads for, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/Environment" + } + ]; + + // Optional. The maximum number of environments to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous List request, + // if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list filter. + // Currently only supports equality on the type field. The value of a field + // specified in the filter expression must be one ComposerWorkloadType enum + // option. It's possible to get multiple types using "OR" operator, e.g.: + // "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are + // returned. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response to ListWorkloadsRequest. +message ListWorkloadsResponse { + // Information about a single workload. + message ComposerWorkload { + // Name of a workload. + string name = 1; + + // Type of a workload. + ComposerWorkloadType type = 2; + + // Output only. Status of a workload. + ComposerWorkloadStatus status = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Supported workload types. + enum ComposerWorkloadType { + // Not able to determine the type of the workload. + COMPOSER_WORKLOAD_TYPE_UNSPECIFIED = 0; + + // Celery worker. + CELERY_WORKER = 1; + + // Kubernetes worker. + KUBERNETES_WORKER = 2; + + // Workload created by Kubernetes Pod Operator. + KUBERNETES_OPERATOR_POD = 3; + + // Airflow scheduler. + SCHEDULER = 4; + + // Airflow Dag processor. + DAG_PROCESSOR = 5; + + // Airflow triggerer. + TRIGGERER = 6; + + // Airflow web server UI. + WEB_SERVER = 7; + + // Redis. + REDIS = 8; + } + + // Workload status. + message ComposerWorkloadStatus { + // Output only. Workload state. + ComposerWorkloadState state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Text to provide more descriptive status. + string status_message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Detailed message of the status. + string detailed_status_message = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Workload states. + enum ComposerWorkloadState { + // Not able to determine the status of the workload. + COMPOSER_WORKLOAD_STATE_UNSPECIFIED = 0; + + // Workload is in pending state and has not yet started. + PENDING = 1; + + // Workload is running fine. + OK = 2; + + // Workload is running but there are some non-critical problems. + WARNING = 3; + + // Workload is not running due to an error. + ERROR = 4; + + // Workload has finished execution with success. + SUCCEEDED = 5; + + // Workload has finished execution with failure. + FAILED = 6; + } + + // The list of environment workloads. + repeated ComposerWorkload workloads = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// Request to create a snapshot of a Cloud Composer environment. +message SaveSnapshotRequest { + // The resource name of the source environment in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1; + + // Location in a Cloud Storage where the snapshot is going to be stored, e.g.: + // "gs://my-bucket/snapshots". + string snapshot_location = 2; +} + +// Response to SaveSnapshotRequest. +message SaveSnapshotResponse { + // The fully-resolved Cloud Storage path of the created snapshot, + // e.g.: + // "gs://my-bucket/snapshots/project_location_environment_timestamp". + // This field is populated only if the snapshot creation was successful. + string snapshot_path = 1; +} + +// Request to load a snapshot into a Cloud Composer environment. +message LoadSnapshotRequest { + // The resource name of the target environment in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1; + + // A Cloud Storage path to a snapshot to load, e.g.: + // "gs://my-bucket/snapshots/project_location_environment_timestamp". + string snapshot_path = 2; + + // Whether or not to skip installing Pypi packages when loading the + // environment's state. + bool skip_pypi_packages_installation = 3; + + // Whether or not to skip setting environment variables when loading the + // environment's state. + bool skip_environment_variables_setting = 4; + + // Whether or not to skip setting Airflow overrides when loading the + // environment's state. + bool skip_airflow_overrides_setting = 5; + + // Whether or not to skip copying Cloud Storage data when loading the + // environment's state. + bool skip_gcs_data_copying = 6; +} + +// Response to LoadSnapshotRequest. +message LoadSnapshotResponse {} + +// Request to trigger database failover (only for highly resilient +// environments). +message DatabaseFailoverRequest { + // Target environment: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1; +} + +// Response for DatabaseFailoverRequest. +message DatabaseFailoverResponse {} + +// Request to fetch properties of environment's database. +message FetchDatabasePropertiesRequest { + // Required. The resource name of the environment, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/Environment" + } + ]; +} + +// Response for FetchDatabasePropertiesRequest. +message FetchDatabasePropertiesResponse { + // The Compute Engine zone that the instance is currently serving from. + string primary_gce_zone = 1; + + // The Compute Engine zone that the failover instance is currently serving + // from for a regional Cloud SQL instance. + string secondary_gce_zone = 2; + + // The availability status of the failover replica. A false status indicates + // that the failover replica is out of sync. The primary instance can only + // fail over to the failover replica when the status is true. + bool is_failover_replica_available = 3; +} + +// The configuration for data storage in the environment. +message StorageConfig { + // Optional. The name of the Cloud Storage bucket used by the environment. No + // `gs://` prefix. + string bucket = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration information for an environment. +message EnvironmentConfig { + // The size of the Cloud Composer environment. + enum EnvironmentSize { + // The size of the environment is unspecified. + ENVIRONMENT_SIZE_UNSPECIFIED = 0; + + // The environment size is small. + ENVIRONMENT_SIZE_SMALL = 1; + + // The environment size is medium. + ENVIRONMENT_SIZE_MEDIUM = 2; + + // The environment size is large. + ENVIRONMENT_SIZE_LARGE = 3; + } + + // Resilience mode of the Cloud Composer Environment. + enum ResilienceMode { + // Default mode doesn't change environment parameters. + RESILIENCE_MODE_UNSPECIFIED = 0; + + // Enabled High Resilience mode, including Cloud SQL HA. + HIGH_RESILIENCE = 1; + } + + // Output only. The Kubernetes Engine cluster used to run this environment. + string gke_cluster = 1; + + // Output only. The Cloud Storage prefix of the DAGs for this environment. + // Although Cloud Storage objects reside in a flat namespace, a hierarchical + // file tree can be simulated using "/"-delimited object name prefixes. DAG + // objects for this environment reside in a simulated directory with the given + // prefix. + string dag_gcs_prefix = 2; + + // The number of nodes in the Kubernetes Engine cluster that will be + // used to run this environment. + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + int32 node_count = 3; + + // The configuration settings for software inside the environment. + SoftwareConfig software_config = 4; + + // The configuration used for the Kubernetes Engine cluster. + NodeConfig node_config = 5; + + // The configuration used for the Private IP Cloud Composer environment. + PrivateEnvironmentConfig private_environment_config = 7; + + // Optional. The network-level access control policy for the Airflow web + // server. If unspecified, no network-level access restrictions will be + // applied. + WebServerNetworkAccessControl web_server_network_access_control = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration settings for Cloud SQL instance used internally + // by Apache Airflow software. + DatabaseConfig database_config = 9 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration settings for the Airflow web server App Engine + // instance. + WebServerConfig web_server_config = 10 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The encryption options for the Cloud Composer environment + // and its dependencies. Cannot be updated. + EncryptionConfig encryption_config = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maintenance window is the period when Cloud Composer + // components may undergo maintenance. It is defined so that maintenance is + // not executed during peak hours or critical time periods. + // + // The system will not be under maintenance for every occurrence of this + // window, but when maintenance is planned, it will be scheduled + // during the window. + // + // The maintenance window period must encompass at least 12 hours per week. + // This may be split into multiple chunks, each with a size of + // at least 4 hours. + // + // If this value is omitted, the default value for maintenance window is + // applied. By default, maintenance windows are from 00:00:00 to 04:00:00 + // (GMT) on Friday, Saturday, and Sunday every week. + MaintenanceWindow maintenance_window = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The workloads configuration settings for the GKE cluster + // associated with the Cloud Composer environment. The GKE cluster runs + // Airflow scheduler, web server and workers workloads. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + WorkloadsConfig workloads_config = 15 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The size of the Cloud Composer environment. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + EnvironmentSize environment_size = 16 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The URI of the Apache Airflow Web UI hosted within this + // environment (see [Airflow web + // interface](/composer/docs/how-to/accessing/airflow-web-interface)). + string airflow_uri = 6; + + // Output only. The 'bring your own identity' variant of the URI of the Apache + // Airflow Web UI hosted within this environment, to be accessed with external + // identities using workforce identity federation (see [Access environments + // with workforce identity + // federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). + string airflow_byoid_uri = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The configuration options for GKE cluster master authorized + // networks. By default master authorized networks feature is: + // - in case of private environment: enabled with no external networks + // allowlisted. + // - in case of public environment: disabled. + MasterAuthorizedNetworksConfig master_authorized_networks_config = 17 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Recovery settings configuration of an environment. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + RecoveryConfig recovery_config = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resilience mode of the Cloud Composer Environment. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.2.0-airflow-*.*.* and newer. + ResilienceMode resilience_mode = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration setting for Airflow database data retention + // mechanism. + DataRetentionConfig data_retention_config = 21 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Network-level access control policy for the Airflow web server. +message WebServerNetworkAccessControl { + // Allowed IP range with user-provided description. + message AllowedIpRange { + // IP address or range, defined using CIDR notation, of requests that this + // rule applies to. + // Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` + // or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. + // + // IP range prefixes should be properly truncated. For example, + // `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, + // `2001:db8::1/32` should be truncated to `2001:db8::/32`. + string value = 1; + + // Optional. User-provided description. It must contain at most 300 + // characters. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // A collection of allowed IP ranges with descriptions. + repeated AllowedIpRange allowed_ip_ranges = 1; +} + +// The configuration of Cloud SQL instance that is used by the Apache Airflow +// software. +message DatabaseConfig { + // Optional. Cloud SQL machine type used by Airflow database. + // It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 + // or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. + // Supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Compute Engine zone where the Airflow database is created. If + // zone is provided, it must be in the region selected for the environment. If + // zone is not provided, a zone is automatically selected. The zone can only + // be set during environment creation. Supported for Cloud Composer + // environments in versions composer-2.*.*-airflow-*.*.*. + string zone = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration settings for the Airflow web server App Engine instance. +// Supported for Cloud Composer environments in versions +// composer-1.*.*-airflow-*.*.* +message WebServerConfig { + // Optional. Machine type on which Airflow web server is running. + // It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or + // composer-n1-webserver-8. + // If not specified, composer-n1-webserver-2 will be used. + // Value custom is returned only in response, if Airflow web server parameters + // were manually changed to a non-standard values. + string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The encryption options for the Cloud Composer environment +// and its dependencies.Supported for Cloud Composer environments in versions +// composer-1.*.*-airflow-*.*.*. +message EncryptionConfig { + // Optional. Customer-managed Encryption Key available through Google's Key + // Management Service. Cannot be updated. If not specified, Google-managed key + // will be used. + string kms_key_name = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration settings for Cloud Composer maintenance window. +// The following example: +// +// ``` +// { +// "startTime":"2019-08-01T01:00:00Z" +// "endTime":"2019-08-01T07:00:00Z" +// "recurrence":"FREQ=WEEKLY;BYDAY=TU,WE" +// } +// ``` +// +// would define a maintenance window between 01 and 07 hours UTC during +// each Tuesday and Wednesday. +message MaintenanceWindow { + // Required. Start time of the first recurrence of the maintenance window. + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Maintenance window end time. It is used only to calculate the + // duration of the maintenance window. The value for end-time must be in the + // future, relative to `start_time`. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Maintenance window recurrence. Format is a subset of + // [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed + // values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` + // Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. + string recurrence = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Specifies the selection and configuration of software inside the environment. +message SoftwareConfig { + // Web server plugins mode of the Cloud Composer environment. + enum WebServerPluginsMode { + // Default mode. + WEB_SERVER_PLUGINS_MODE_UNSPECIFIED = 0; + + // Web server plugins are not supported. + PLUGINS_DISABLED = 1; + + // Web server plugins are supported. + PLUGINS_ENABLED = 2; + } + + // The version of the software running in the environment. + // This encapsulates both the version of Cloud Composer functionality and the + // version of Apache Airflow. It must match the regular expression + // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. + // When used as input, the server also checks if the provided version is + // supported and denies the request for an unsupported version. + // + // The Cloud Composer portion of the image version is a full + // [semantic version](https://semver.org), or an alias in the form of major + // version number or `latest`. When an alias is provided, the server replaces + // it with the current Cloud Composer version that satisfies the alias. + // + // The Apache Airflow portion of the image version is a full semantic version + // that points to one of the supported Apache Airflow versions, or an alias in + // the form of only major or major.minor versions specified. When an alias is + // provided, the server replaces it with the latest Apache Airflow version + // that satisfies the alias and is supported in the given Cloud Composer + // version. + // + // In all cases, the resolved image version is stored in the same field. + // + // See also [version + // list](/composer/docs/concepts/versioning/composer-versions) and [versioning + // overview](/composer/docs/concepts/versioning/composer-versioning-overview). + string image_version = 1; + + // Optional. Apache Airflow configuration properties to override. + // + // Property keys contain the section and property names, separated by a + // hyphen, for example "core-dags_are_paused_at_creation". Section names must + // not contain hyphens ("-"), opening square brackets ("["), or closing + // square brackets ("]"). The property name must not be empty and must not + // contain an equals sign ("=") or semicolon (";"). Section and property names + // must not contain a period ("."). Apache Airflow configuration property + // names must be written in + // [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can + // contain any character, and can be written in any lower/upper case format. + // + // Certain Apache Airflow configuration property values are + // [blocked](/composer/docs/concepts/airflow-configurations), + // and cannot be overridden. + map airflow_config_overrides = 2; + + // Optional. Custom Python Package Index (PyPI) packages to be installed in + // the environment. + // + // Keys refer to the lowercase package name such as "numpy" + // and values are the lowercase extras and version specifier such as + // "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a + // package without pinning it to a version specifier, use the empty string as + // the value. + map pypi_packages = 3; + + // Optional. Additional environment variables to provide to the Apache Airflow + // scheduler, worker, and webserver processes. + // + // Environment variable names must match the regular expression + // `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow + // software configuration overrides (they cannot match the regular expression + // `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the + // following reserved names: + // + // * `AIRFLOW_HOME` + // * `C_FORCE_ROOT` + // * `CONTAINER_NAME` + // * `DAGS_FOLDER` + // * `GCP_PROJECT` + // * `GCS_BUCKET` + // * `GKE_CLUSTER_NAME` + // * `SQL_DATABASE` + // * `SQL_INSTANCE` + // * `SQL_PASSWORD` + // * `SQL_PROJECT` + // * `SQL_REGION` + // * `SQL_USER` + map env_variables = 4; + + // Optional. The major version of Python used to run the Apache Airflow + // scheduler, worker, and webserver processes. + // + // Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be + // updated. + // + // This field is only supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. Environments in newer versions always use + // Python major version 3. + string python_version = 6; + + // Optional. The number of schedulers for Airflow. + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-2.*.*. + int32 scheduler_count = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration for Cloud Data Lineage integration. + CloudDataLineageIntegration cloud_data_lineage_integration = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether or not the web server uses custom plugins. + // If unspecified, the field defaults to `PLUGINS_ENABLED`. + // + // This field is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + WebServerPluginsMode web_server_plugins_mode = 10 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for controlling how IPs are allocated in the +// GKE cluster running the Apache Airflow software. +message IPAllocationPolicy { + // Optional. Whether or not to enable Alias IPs in the GKE cluster. + // If `true`, a VPC-native cluster is created. + // + // This field is only supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. Environments in newer versions always use + // VPC-native GKE clusters. + bool use_ip_aliases = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Configuration of allocating IP addresses for pods in the GKE cluster. + oneof cluster_ip_allocation { + // Optional. The name of the GKE cluster's secondary range used to allocate + // IP addresses to pods. + // + // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + // this field is applicable only when `use_ip_aliases` is true. + string cluster_secondary_range_name = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP address range used to allocate IP addresses to pods in + // the GKE cluster. + // + // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + // this field is applicable only when `use_ip_aliases` is true. + // + // Set to blank to have GKE choose a range with the default size. + // + // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + // netmask. + // + // Set to a + // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + string cluster_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration of allocating IP addresses for services in the GKE cluster. + oneof services_ip_allocation { + // Optional. The name of the services' secondary range used to allocate + // IP addresses to the GKE cluster. + // + // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + // this field is applicable only when `use_ip_aliases` is true. + string services_secondary_range_name = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP address range of the services IP addresses in this + // GKE cluster. + // + // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + // this field is applicable only when `use_ip_aliases` is true. + // + // Set to blank to have GKE choose a range with the default size. + // + // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + // netmask. + // + // Set to a + // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + string services_ipv4_cidr_block = 5 + [(google.api.field_behavior) = OPTIONAL]; + } +} + +// The configuration information for the Kubernetes Engine nodes running +// the Apache Airflow software. +message NodeConfig { + // Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which + // to deploy the VMs used to run the Apache Airflow software, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/zones/{zoneId}". + // + // This `location` must belong to the enclosing environment's project and + // location. If both this field and `nodeConfig.machineType` are specified, + // `nodeConfig.machineType` must belong to this `location`; if both are + // unspecified, the service will pick a zone in the Compute Engine region + // corresponding to the Cloud Composer location, and propagate that choice to + // both fields. If only one field (`location` or `nodeConfig.machineType`) is + // specified, the location information from the specified field will be + // propagated to the unspecified field. + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + string location = 1; + + // Optional. The Compute Engine + // [machine type](/compute/docs/machine-types) used for cluster instances, + // specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". + // + // The `machineType` must belong to the enclosing environment's project and + // location. If both this field and `nodeConfig.location` are specified, + // this `machineType` must belong to the `nodeConfig.location`; if both are + // unspecified, the service will pick a zone in the Compute Engine region + // corresponding to the Cloud Composer location, and propagate that choice to + // both fields. If exactly one of this field and `nodeConfig.location` is + // specified, the location information from the specified field will be + // propagated to the unspecified field. + // + // The `machineTypeId` must not be a [shared-core machine + // type](/compute/docs/machine-types#sharedcore). + // + // If this field is unspecified, the `machineTypeId` defaults + // to "n1-standard-1". + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + string machine_type = 2; + + // Optional. The Compute Engine network to be used for machine + // communications, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/global/networks/{networkId}". + // + // If unspecified, the "default" network ID in the environment's project is + // used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) + // is provided, `nodeConfig.subnetwork` must also be provided. For + // [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see + // `nodeConfig.subnetwork`. + string network = 3; + + // Optional. The Compute Engine subnetwork to be used for machine + // communications, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" + // + // If a subnetwork is provided, `nodeConfig.network` must also be provided, + // and the subnetwork must belong to the enclosing environment's project and + // location. + string subnetwork = 4; + + // Optional. The disk size in GB used for node VMs. Minimum size is 30GB. + // If unspecified, defaults to 100GB. Cannot be updated. + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + int32 disk_size_gb = 5; + + // Optional. The set of Google API scopes to be made available on all + // node VMs. If `oauth_scopes` is empty, defaults to + // ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + repeated string oauth_scopes = 6; + + // Optional. The Google Cloud Platform Service Account to be used by the node + // VMs. If a service account is not specified, the "default" Compute Engine + // service account is used. Cannot be updated. + string service_account = 7; + + // Optional. The list of instance tags applied to all node VMs. Tags are used + // to identify valid sources or targets for network firewalls. Each tag within + // the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + // Cannot be updated. + repeated string tags = 8; + + // Optional. The configuration for controlling how IPs are allocated in the + // GKE cluster. + IPAllocationPolicy ip_allocation_policy = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines + // nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for + // all destination addresses, except between pods traffic. + // + // See: + // https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent + bool enable_ip_masq_agent = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Network Attachment that Cloud Composer environment is connected + // to, which provides connectivity with a user's VPC network. Takes precedence + // over network and subnetwork settings. If not provided, but network and + // subnetwork are defined during environment, it will be provisioned. If not + // provided and network and subnetwork are also empty, then connectivity to + // user's VPC network is disabled. Network attachment must be provided in + // format + // projects/{project}/regions/{region}/networkAttachments/{networkAttachment}. + // + // This field is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + string composer_network_attachment = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP range in CIDR notation to use internally by Cloud + // Composer. IP addresses are not reserved - and the same range can be used by + // multiple Cloud Composer environments. In case of overlap, IPs from this + // range will not be accessible in the user's VPC network. Cannot be updated. + // If not specified, the default value of '100.64.128.0/20' is used. + // + // This field is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + string composer_internal_ipv4_cidr_block = 13 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration options for the private GKE cluster in a Cloud Composer +// environment. +message PrivateClusterConfig { + // Optional. If `true`, access to the public endpoint of the GKE cluster is + // denied. + bool enable_private_endpoint = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IPv4 range for GKE master will be + // reserved. If left blank, the default value of '172.16.0.0/23' is used. + string master_ipv4_cidr_block = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP range in CIDR notation to use for the hosted master + // network. This range is used for assigning internal IP addresses to the GKE + // cluster master or set of masters and to the internal load balancer virtual + // IP. This range must not overlap with any other ranges in use within the + // cluster's network. + string master_ipv4_reserved_range = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configuration options for networking connections in the Composer 2 +// environment. +message NetworkingConfig { + // Represents connection type between Composer environment in Customer + // Project and the corresponding Tenant project, from a predefined list + // of available connection modes. + enum ConnectionType { + // No specific connection type was requested, so the environment uses + // the default value corresponding to the rest of its configuration. + CONNECTION_TYPE_UNSPECIFIED = 0; + + // Requests the use of VPC peerings for connecting the Customer and Tenant + // projects. + VPC_PEERING = 1; + + // Requests the use of Private Service Connect for connecting the Customer + // and Tenant projects. + PRIVATE_SERVICE_CONNECT = 2; + } + + // Optional. Indicates the user requested specifc connection type between + // Tenant and Customer projects. You cannot set networking connection type in + // public IP environment. + ConnectionType connection_type = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration information for configuring a Private IP Cloud Composer +// environment. +message PrivateEnvironmentConfig { + // Optional. If `true`, a Private IP Cloud Composer environment is created. + // If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be + // set to true for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + bool enable_private_environment = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If `true`, builds performed during operations that install Python + // packages have only private connectivity to Google services (including + // Artifact Registry) and VPC network (if either `NodeConfig.network` and + // `NodeConfig.subnetwork` fields or `NodeConfig.composer_network_attachment` + // field are specified). If `false`, the builds also have access to the + // internet. + // + // This field is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + bool enable_private_builds_only = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for the private GKE cluster for a Private IP + // Cloud Composer environment. + PrivateClusterConfig private_cluster_config = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IP range for web server will be + // reserved. Needs to be disjoint from + // `private_cluster_config.master_ipv4_cidr_block` and + // `cloud_sql_ipv4_cidr_block`. + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + string web_server_ipv4_cidr_block = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IP range in tenant project will be + // reserved for Cloud SQL. Needs to be disjoint from + // `web_server_ipv4_cidr_block`. + string cloud_sql_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP range reserved for the tenant project's App Engine VMs. + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + string web_server_ipv4_reserved_range = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The CIDR block from which IP range for Cloud Composer Network in + // tenant project will be reserved. Needs to be disjoint from + // private_cluster_config.master_ipv4_cidr_block and + // cloud_sql_ipv4_cidr_block. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + string cloud_composer_network_ipv4_cidr_block = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP range reserved for the tenant project's Cloud Composer + // network. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + string cloud_composer_network_ipv4_reserved_range = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. When enabled, IPs from public (non-RFC1918) ranges can be used + // for `IPAllocationPolicy.cluster_ipv4_cidr_block` and + // `IPAllocationPolicy.service_ipv4_cidr_block`. + bool enable_privately_used_public_ips = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When specified, the environment will use Private Service Connect + // instead of VPC peerings to connect to Cloud SQL in the Tenant Project, + // and the PSC endpoint in the Customer Project will use an IP address from + // this subnetwork. + string cloud_composer_connection_subnetwork = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for the network connections configuration in the + // environment. + NetworkingConfig networking_config = 10 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The Kubernetes workloads configuration for GKE cluster associated with the +// Cloud Composer environment. Supported for Cloud Composer environments in +// versions composer-2.*.*-airflow-*.*.* and newer. +message WorkloadsConfig { + // Configuration for resources used by Airflow schedulers. + message SchedulerResource { + // Optional. CPU request and limit for a single Airflow scheduler replica. + float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Memory (GB) request and limit for a single Airflow scheduler + // replica. + float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Storage (GB) request and limit for a single Airflow scheduler + // replica. + float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of schedulers. + int32 count = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for resources used by Airflow web server. + message WebServerResource { + // Optional. CPU request and limit for Airflow web server. + float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Memory (GB) request and limit for Airflow web server. + float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Storage (GB) request and limit for Airflow web server. + float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for resources used by Airflow workers. + message WorkerResource { + // Optional. CPU request and limit for a single Airflow worker replica. + float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Memory (GB) request and limit for a single Airflow worker + // replica. + float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Storage (GB) request and limit for a single Airflow worker + // replica. + float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Minimum number of workers for autoscaling. + int32 min_count = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum number of workers for autoscaling. + int32 max_count = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for resources used by Airflow triggerers. + message TriggererResource { + // Optional. The number of triggerers. + int32 count = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. CPU request and limit for a single Airflow triggerer replica. + float cpu = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Memory (GB) request and limit for a single Airflow triggerer + // replica. + float memory_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for resources used by Airflow DAG processors. + // + // This field is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + message DagProcessorResource { + // Optional. CPU request and limit for a single Airflow DAG processor + // replica. + float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Memory (GB) request and limit for a single Airflow DAG + // processor replica. + float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Storage (GB) request and limit for a single Airflow DAG + // processor replica. + float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of DAG processors. If not provided or set to 0, a + // single DAG processor instance will be created. + int32 count = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Resources used by Airflow schedulers. + SchedulerResource scheduler = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resources used by Airflow web server. + WebServerResource web_server = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resources used by Airflow workers. + WorkerResource worker = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resources used by Airflow triggerers. + TriggererResource triggerer = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resources used by Airflow DAG processors. + // + // This field is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + DagProcessorResource dag_processor = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The Recovery settings of an environment. +message RecoveryConfig { + // Optional. The configuration for scheduled snapshot creation mechanism. + ScheduledSnapshotsConfig scheduled_snapshots_config = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration for scheduled snapshot creation mechanism. +message ScheduledSnapshotsConfig { + // Optional. Whether scheduled snapshots creation is enabled. + bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud Storage location for storing automatically created + // snapshots. + string snapshot_location = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The cron expression representing the time when snapshots creation + // mechanism runs. This field is subject to additional validation around + // frequency of execution. + string snapshot_creation_schedule = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Time zone that sets the context to interpret + // snapshot_creation_schedule. + string time_zone = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration options for the master authorized networks feature. Enabled +// master authorized networks will disallow all external traffic to access +// Kubernetes master through HTTPS except traffic from the given CIDR blocks, +// Google Compute Engine Public IPs and Google Prod IPs. +message MasterAuthorizedNetworksConfig { + // CIDR block with an optional name. + message CidrBlock { + // User-defined name that identifies the CIDR block. + string display_name = 1; + + // CIDR block that must be specified in CIDR notation. + string cidr_block = 2; + } + + // Whether or not master authorized networks feature is enabled. + bool enabled = 1; + + // Up to 50 external networks that could access Kubernetes master through + // HTTPS. + repeated CidrBlock cidr_blocks = 2; +} + +// Configuration for Cloud Data Lineage integration. +message CloudDataLineageIntegration { + // Optional. Whether or not Cloud Data Lineage integration is enabled. + bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// An environment for running orchestration tasks. +message Environment { + option (google.api.resource) = { + type: "composer.googleapis.com/Environment" + pattern: "projects/{project}/locations/{location}/environments/{environment}" + }; + + // State of the environment. + enum State { + // The state of the environment is unknown. + STATE_UNSPECIFIED = 0; + + // The environment is in the process of being created. + CREATING = 1; + + // The environment is currently running and healthy. It is ready for use. + RUNNING = 2; + + // The environment is being updated. It remains usable but cannot receive + // additional update requests or be deleted at this time. + UPDATING = 3; + + // The environment is undergoing deletion. It cannot be used. + DELETING = 4; + + // The environment has encountered an error and cannot be used. + ERROR = 5; + } + + // The resource name of the environment, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + // + // EnvironmentId must start with a lowercase letter followed by up to 63 + // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + string name = 1; + + // Configuration parameters for this environment. + EnvironmentConfig config = 2; + + // Output only. The UUID (Universally Unique IDentifier) associated with this + // environment. This value is generated when the environment is created. + string uuid = 3; + + // The current state of the environment. + State state = 4; + + // Output only. The time at which this environment was created. + google.protobuf.Timestamp create_time = 5; + + // Output only. The time at which this environment was last modified. + google.protobuf.Timestamp update_time = 6; + + // Optional. User-defined labels for this environment. + // The labels map can contain no more than 64 entries. Entries of the labels + // map are UTF8 strings that comply with the following restrictions: + // + // * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} + // * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} + // * Both keys and values are additionally constrained to be <= 128 bytes in + // size. + map labels = 7; + + // Output only. Reserved for future use. + bool satisfies_pzs = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + bool satisfies_pzi = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Storage configuration for this environment. + StorageConfig storage_config = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request to check whether image upgrade will succeed. +message CheckUpgradeRequest { + // Required. The resource name of the environment to check upgrade for, in the + // form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The version of the software running in the environment. + // This encapsulates both the version of Cloud Composer functionality and the + // version of Apache Airflow. It must match the regular expression + // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. + // When used as input, the server also checks if the provided version is + // supported and denies the request for an unsupported version. + // + // The Cloud Composer portion of the image version is a full + // [semantic version](https://semver.org), or an alias in the form of major + // version number or `latest`. When an alias is provided, the server replaces + // it with the current Cloud Composer version that satisfies the alias. + // + // The Apache Airflow portion of the image version is a full semantic version + // that points to one of the supported Apache Airflow versions, or an alias in + // the form of only major or major.minor versions specified. When an alias is + // provided, the server replaces it with the latest Apache Airflow version + // that satisfies the alias and is supported in the given Cloud Composer + // version. + // + // In all cases, the resolved image version is stored in the same field. + // + // See also [version + // list](/composer/docs/concepts/versioning/composer-versions) and [versioning + // overview](/composer/docs/concepts/versioning/composer-versioning-overview). + string image_version = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message containing information about the result of an upgrade check +// operation. +message CheckUpgradeResponse { + // Whether there were python modules conflict during image build. + enum ConflictResult { + // It is unknown whether build had conflicts or not. + CONFLICT_RESULT_UNSPECIFIED = 0; + + // There were python packages conflicts. + CONFLICT = 1; + + // There were no python packages conflicts. + NO_CONFLICT = 2; + } + + // Output only. Url for a docker build log of an upgraded image. + string build_log_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether build has succeeded or failed on modules conflicts. + ConflictResult contains_pypi_modules_conflict = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Extract from a docker image build log containing information + // about pypi modules conflicts. + string pypi_conflict_build_log_extract = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Composer image for which the build was happening. + string image_version = 5; + + // Pypi dependencies specified in the environment configuration, at the time + // when the build was triggered. + map pypi_dependencies = 6; +} + +// The configuration setting for Airflow database data retention mechanism. +message DataRetentionConfig { + // Optional. The retention policy for airflow metadata database. + AirflowMetadataRetentionPolicyConfig airflow_metadata_retention_config = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration settings for task logs retention + TaskLogsRetentionConfig task_logs_retention_config = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration setting for Task Logs. +message TaskLogsRetentionConfig { + // The definition of task_logs_storage_mode. + enum TaskLogsStorageMode { + // This configuration is not specified by the user. + TASK_LOGS_STORAGE_MODE_UNSPECIFIED = 0; + + // Store task logs in Cloud Logging and in the environment's Cloud Storage + // bucket. + CLOUD_LOGGING_AND_CLOUD_STORAGE = 1; + + // Store task logs in Cloud Logging only. + CLOUD_LOGGING_ONLY = 2; + } + + // Optional. The mode of storage for Airflow workers task logs. + TaskLogsStorageMode storage_mode = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The policy for airflow metadata database retention. +message AirflowMetadataRetentionPolicyConfig { + // Describes retention policy. + enum RetentionMode { + // Default mode doesn't change environment parameters. + RETENTION_MODE_UNSPECIFIED = 0; + + // Retention policy is enabled. + RETENTION_MODE_ENABLED = 1; + + // Retention policy is disabled. + RETENTION_MODE_DISABLED = 2; + } + + // Optional. Retention can be either enabled or disabled. + RetentionMode retention_mode = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. How many days data should be retained for. + int32 retention_days = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto new file mode 100644 index 00000000000..94c92b8ec7f --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto @@ -0,0 +1,90 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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.orchestration.airflow.service.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/type/date.proto"; + +option go_package = "cloud.google.com/go/orchestration/airflow/service/apiv1/servicepb;servicepb"; +option java_multiple_files = true; +option java_package = "com.google.cloud.orchestration.airflow.service.v1"; + +// Readonly service to query available ImageVersions. +service ImageVersions { + option (google.api.default_host) = "composer.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // List ImageVersions for provided location. + rpc ListImageVersions(ListImageVersionsRequest) + returns (ListImageVersionsResponse) { + option (google.api.http) = { + get: "/v1/{parent=projects/*/locations/*}/imageVersions" + }; + option (google.api.method_signature) = "parent"; + } +} + +// List ImageVersions in a project and location. +message ListImageVersionsRequest { + // List ImageVersions in the given project and location, in the form: + // "projects/{projectId}/locations/{locationId}" + string parent = 1; + + // The maximum number of image_versions to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; + + // Whether or not image versions from old releases should be included. + bool include_past_releases = 4; +} + +// The ImageVersions in a project and location. +message ListImageVersionsResponse { + // The list of supported ImageVersions in a location. + repeated ImageVersion image_versions = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// ImageVersion information +message ImageVersion { + // The string identifier of the ImageVersion, in the form: + // "composer-x.y.z-airflow-a.b.c" + string image_version_id = 1; + + // Whether this is the default ImageVersion used by Composer during + // environment creation if no input ImageVersion is specified. + bool is_default = 2; + + // supported python versions + repeated string supported_python_versions = 3; + + // The date of the version release. + google.type.Date release_date = 4; + + // Whether it is impossible to create an environment with the image version. + bool creation_disabled = 5; + + // Whether it is impossible to upgrade an environment running with the image + // version. + bool upgrade_disabled = 6; +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/operations.proto b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/operations.proto new file mode 100644 index 00000000000..ec14d069c03 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/operations.proto @@ -0,0 +1,97 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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.orchestration.airflow.service.v1; + +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/orchestration/airflow/service/apiv1/servicepb;servicepb"; +option java_multiple_files = true; +option java_outer_classname = "OperationsProto"; +option java_package = "com.google.cloud.orchestration.airflow.service.v1"; + +// Metadata describing an operation. +message OperationMetadata { + // An enum describing the overall state of an operation. + enum State { + option allow_alias = true; + + // Unused. + STATE_UNSPECIFIED = 0; + + // The operation has been created but is not yet started. + PENDING = 1; + + // The operation is underway. + RUNNING = 2; + + // The operation completed successfully. + SUCCEEDED = 3; + + SUCCESSFUL = 3; + + // The operation is no longer running but did not succeed. + FAILED = 4; + } + + // Type of longrunning operation. + enum Type { + // Unused. + TYPE_UNSPECIFIED = 0; + + // A resource creation operation. + CREATE = 1; + + // A resource deletion operation. + DELETE = 2; + + // A resource update operation. + UPDATE = 3; + + // A resource check operation. + CHECK = 4; + + // Saves snapshot of the resource operation. + SAVE_SNAPSHOT = 5; + + // Loads snapshot of the resource operation. + LOAD_SNAPSHOT = 6; + + // Triggers failover of environment's Cloud SQL instance (only for highly + // resilient environments). + DATABASE_FAILOVER = 7; + } + + // Output only. The current operation state. + State state = 1; + + // Output only. The type of operation being performed. + Type operation_type = 2; + + // Output only. The resource being operated on, as a [relative resource name]( + // /apis/design/resource_names#relative_resource_name). + string resource = 3; + + // Output only. The UUID of the resource being operated on. + string resource_uuid = 4; + + // Output only. The time the operation was submitted to the server. + google.protobuf.Timestamp create_time = 5; + + // Output only. The time when the operation terminated, regardless of its + // success. This field is unset if the operation is still ongoing. + google.protobuf.Timestamp end_time = 6; +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.d.ts new file mode 100644 index 00000000000..8ab29e46783 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.d.ts @@ -0,0 +1,16914 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 orchestration. */ + namespace orchestration { + + /** Namespace airflow. */ + namespace airflow { + + /** Namespace service. */ + namespace service { + + /** Namespace v1. */ + namespace v1 { + + /** Represents an Environments */ + class Environments extends $protobuf.rpc.Service { + + /** + * Constructs a new Environments 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 Environments 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): Environments; + + /** + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createEnvironment(request: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.CreateEnvironmentCallback): void; + + /** + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @returns Promise + */ + public createEnvironment(request: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest): Promise; + + /** + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Environment + */ + public getEnvironment(request: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.GetEnvironmentCallback): void; + + /** + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @returns Promise + */ + public getEnvironment(request: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest): Promise; + + /** + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + */ + public listEnvironments(request: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.ListEnvironmentsCallback): void; + + /** + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @returns Promise + */ + public listEnvironments(request: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest): Promise; + + /** + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateEnvironment(request: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.UpdateEnvironmentCallback): void; + + /** + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @returns Promise + */ + public updateEnvironment(request: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest): Promise; + + /** + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteEnvironment(request: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.DeleteEnvironmentCallback): void; + + /** + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @returns Promise + */ + public deleteEnvironment(request: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest): Promise; + + /** + * Calls ExecuteAirflowCommand. + * @param request ExecuteAirflowCommandRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExecuteAirflowCommandResponse + */ + public executeAirflowCommand(request: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.ExecuteAirflowCommandCallback): void; + + /** + * Calls ExecuteAirflowCommand. + * @param request ExecuteAirflowCommandRequest message or plain object + * @returns Promise + */ + public executeAirflowCommand(request: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest): Promise; + + /** + * Calls StopAirflowCommand. + * @param request StopAirflowCommandRequest message or plain object + * @param callback Node-style callback called with the error, if any, and StopAirflowCommandResponse + */ + public stopAirflowCommand(request: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.StopAirflowCommandCallback): void; + + /** + * Calls StopAirflowCommand. + * @param request StopAirflowCommandRequest message or plain object + * @returns Promise + */ + public stopAirflowCommand(request: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest): Promise; + + /** + * Calls PollAirflowCommand. + * @param request PollAirflowCommandRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PollAirflowCommandResponse + */ + public pollAirflowCommand(request: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.PollAirflowCommandCallback): void; + + /** + * Calls PollAirflowCommand. + * @param request PollAirflowCommandRequest message or plain object + * @returns Promise + */ + public pollAirflowCommand(request: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest): Promise; + + /** + * Calls ListWorkloads. + * @param request ListWorkloadsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListWorkloadsResponse + */ + public listWorkloads(request: google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.ListWorkloadsCallback): void; + + /** + * Calls ListWorkloads. + * @param request ListWorkloadsRequest message or plain object + * @returns Promise + */ + public listWorkloads(request: google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest): Promise; + + /** + * Calls CheckUpgrade. + * @param request CheckUpgradeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public checkUpgrade(request: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.CheckUpgradeCallback): void; + + /** + * Calls CheckUpgrade. + * @param request CheckUpgradeRequest message or plain object + * @returns Promise + */ + public checkUpgrade(request: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest): Promise; + + /** + * Calls CreateUserWorkloadsSecret. + * @param request CreateUserWorkloadsSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserWorkloadsSecret + */ + public createUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.CreateUserWorkloadsSecretCallback): void; + + /** + * Calls CreateUserWorkloadsSecret. + * @param request CreateUserWorkloadsSecretRequest message or plain object + * @returns Promise + */ + public createUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest): Promise; + + /** + * Calls GetUserWorkloadsSecret. + * @param request GetUserWorkloadsSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserWorkloadsSecret + */ + public getUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.GetUserWorkloadsSecretCallback): void; + + /** + * Calls GetUserWorkloadsSecret. + * @param request GetUserWorkloadsSecretRequest message or plain object + * @returns Promise + */ + public getUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest): Promise; + + /** + * Calls ListUserWorkloadsSecrets. + * @param request ListUserWorkloadsSecretsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUserWorkloadsSecretsResponse + */ + public listUserWorkloadsSecrets(request: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.ListUserWorkloadsSecretsCallback): void; + + /** + * Calls ListUserWorkloadsSecrets. + * @param request ListUserWorkloadsSecretsRequest message or plain object + * @returns Promise + */ + public listUserWorkloadsSecrets(request: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest): Promise; + + /** + * Calls UpdateUserWorkloadsSecret. + * @param request UpdateUserWorkloadsSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserWorkloadsSecret + */ + public updateUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.UpdateUserWorkloadsSecretCallback): void; + + /** + * Calls UpdateUserWorkloadsSecret. + * @param request UpdateUserWorkloadsSecretRequest message or plain object + * @returns Promise + */ + public updateUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest): Promise; + + /** + * Calls DeleteUserWorkloadsSecret. + * @param request DeleteUserWorkloadsSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.DeleteUserWorkloadsSecretCallback): void; + + /** + * Calls DeleteUserWorkloadsSecret. + * @param request DeleteUserWorkloadsSecretRequest message or plain object + * @returns Promise + */ + public deleteUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest): Promise; + + /** + * Calls CreateUserWorkloadsConfigMap. + * @param request CreateUserWorkloadsConfigMapRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap + */ + public createUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.CreateUserWorkloadsConfigMapCallback): void; + + /** + * Calls CreateUserWorkloadsConfigMap. + * @param request CreateUserWorkloadsConfigMapRequest message or plain object + * @returns Promise + */ + public createUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest): Promise; + + /** + * Calls GetUserWorkloadsConfigMap. + * @param request GetUserWorkloadsConfigMapRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap + */ + public getUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.GetUserWorkloadsConfigMapCallback): void; + + /** + * Calls GetUserWorkloadsConfigMap. + * @param request GetUserWorkloadsConfigMapRequest message or plain object + * @returns Promise + */ + public getUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest): Promise; + + /** + * Calls ListUserWorkloadsConfigMaps. + * @param request ListUserWorkloadsConfigMapsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUserWorkloadsConfigMapsResponse + */ + public listUserWorkloadsConfigMaps(request: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.ListUserWorkloadsConfigMapsCallback): void; + + /** + * Calls ListUserWorkloadsConfigMaps. + * @param request ListUserWorkloadsConfigMapsRequest message or plain object + * @returns Promise + */ + public listUserWorkloadsConfigMaps(request: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest): Promise; + + /** + * Calls UpdateUserWorkloadsConfigMap. + * @param request UpdateUserWorkloadsConfigMapRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap + */ + public updateUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.UpdateUserWorkloadsConfigMapCallback): void; + + /** + * Calls UpdateUserWorkloadsConfigMap. + * @param request UpdateUserWorkloadsConfigMapRequest message or plain object + * @returns Promise + */ + public updateUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest): Promise; + + /** + * Calls DeleteUserWorkloadsConfigMap. + * @param request DeleteUserWorkloadsConfigMapRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.DeleteUserWorkloadsConfigMapCallback): void; + + /** + * Calls DeleteUserWorkloadsConfigMap. + * @param request DeleteUserWorkloadsConfigMapRequest message or plain object + * @returns Promise + */ + public deleteUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest): Promise; + + /** + * Calls SaveSnapshot. + * @param request SaveSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public saveSnapshot(request: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.SaveSnapshotCallback): void; + + /** + * Calls SaveSnapshot. + * @param request SaveSnapshotRequest message or plain object + * @returns Promise + */ + public saveSnapshot(request: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest): Promise; + + /** + * Calls LoadSnapshot. + * @param request LoadSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public loadSnapshot(request: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.LoadSnapshotCallback): void; + + /** + * Calls LoadSnapshot. + * @param request LoadSnapshotRequest message or plain object + * @returns Promise + */ + public loadSnapshot(request: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest): Promise; + + /** + * Calls DatabaseFailover. + * @param request DatabaseFailoverRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public databaseFailover(request: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.DatabaseFailoverCallback): void; + + /** + * Calls DatabaseFailover. + * @param request DatabaseFailoverRequest message or plain object + * @returns Promise + */ + public databaseFailover(request: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest): Promise; + + /** + * Calls FetchDatabaseProperties. + * @param request FetchDatabasePropertiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchDatabasePropertiesResponse + */ + public fetchDatabaseProperties(request: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.FetchDatabasePropertiesCallback): void; + + /** + * Calls FetchDatabaseProperties. + * @param request FetchDatabasePropertiesRequest message or plain object + * @returns Promise + */ + public fetchDatabaseProperties(request: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest): Promise; + } + + namespace Environments { + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|createEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|getEnvironment}. + * @param error Error, if any + * @param [response] Environment + */ + type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.Environment) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listEnvironments}. + * @param error Error, if any + * @param [response] ListEnvironmentsResponse + */ + type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|updateEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|deleteEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|executeAirflowCommand}. + * @param error Error, if any + * @param [response] ExecuteAirflowCommandResponse + */ + type ExecuteAirflowCommandCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|stopAirflowCommand}. + * @param error Error, if any + * @param [response] StopAirflowCommandResponse + */ + type StopAirflowCommandCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|pollAirflowCommand}. + * @param error Error, if any + * @param [response] PollAirflowCommandResponse + */ + type PollAirflowCommandCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listWorkloads}. + * @param error Error, if any + * @param [response] ListWorkloadsResponse + */ + type ListWorkloadsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|checkUpgrade}. + * @param error Error, if any + * @param [response] Operation + */ + type CheckUpgradeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|createUserWorkloadsSecret}. + * @param error Error, if any + * @param [response] UserWorkloadsSecret + */ + type CreateUserWorkloadsSecretCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|getUserWorkloadsSecret}. + * @param error Error, if any + * @param [response] UserWorkloadsSecret + */ + type GetUserWorkloadsSecretCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listUserWorkloadsSecrets}. + * @param error Error, if any + * @param [response] ListUserWorkloadsSecretsResponse + */ + type ListUserWorkloadsSecretsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|updateUserWorkloadsSecret}. + * @param error Error, if any + * @param [response] UserWorkloadsSecret + */ + type UpdateUserWorkloadsSecretCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|deleteUserWorkloadsSecret}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteUserWorkloadsSecretCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|createUserWorkloadsConfigMap}. + * @param error Error, if any + * @param [response] UserWorkloadsConfigMap + */ + type CreateUserWorkloadsConfigMapCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|getUserWorkloadsConfigMap}. + * @param error Error, if any + * @param [response] UserWorkloadsConfigMap + */ + type GetUserWorkloadsConfigMapCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listUserWorkloadsConfigMaps}. + * @param error Error, if any + * @param [response] ListUserWorkloadsConfigMapsResponse + */ + type ListUserWorkloadsConfigMapsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|updateUserWorkloadsConfigMap}. + * @param error Error, if any + * @param [response] UserWorkloadsConfigMap + */ + type UpdateUserWorkloadsConfigMapCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|deleteUserWorkloadsConfigMap}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteUserWorkloadsConfigMapCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|saveSnapshot}. + * @param error Error, if any + * @param [response] Operation + */ + type SaveSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|loadSnapshot}. + * @param error Error, if any + * @param [response] Operation + */ + type LoadSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|databaseFailover}. + * @param error Error, if any + * @param [response] Operation + */ + type DatabaseFailoverCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|fetchDatabaseProperties}. + * @param error Error, if any + * @param [response] FetchDatabasePropertiesResponse + */ + type FetchDatabasePropertiesCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse) => void; + } + + /** Properties of a CreateEnvironmentRequest. */ + interface ICreateEnvironmentRequest { + + /** CreateEnvironmentRequest parent */ + parent?: (string|null); + + /** CreateEnvironmentRequest environment */ + environment?: (google.cloud.orchestration.airflow.service.v1.IEnvironment|null); + } + + /** Represents a CreateEnvironmentRequest. */ + class CreateEnvironmentRequest implements ICreateEnvironmentRequest { + + /** + * Constructs a new CreateEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest); + + /** CreateEnvironmentRequest parent. */ + public parent: string; + + /** CreateEnvironmentRequest environment. */ + public environment?: (google.cloud.orchestration.airflow.service.v1.IEnvironment|null); + + /** + * Creates a new CreateEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateEnvironmentRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest): google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest; + + /** + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.verify|verify} messages. + * @param message CreateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.verify|verify} messages. + * @param message CreateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest; + + /** + * Verifies a CreateEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest; + + /** + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * @param message CreateEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetEnvironmentRequest. */ + interface IGetEnvironmentRequest { + + /** GetEnvironmentRequest name */ + name?: (string|null); + } + + /** Represents a GetEnvironmentRequest. */ + class GetEnvironmentRequest implements IGetEnvironmentRequest { + + /** + * Constructs a new GetEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest); + + /** GetEnvironmentRequest name. */ + public name: string; + + /** + * Creates a new GetEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEnvironmentRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest): google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest; + + /** + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest; + + /** + * Verifies a GetEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest; + + /** + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @param message GetEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEnvironmentsRequest. */ + interface IListEnvironmentsRequest { + + /** ListEnvironmentsRequest parent */ + parent?: (string|null); + + /** ListEnvironmentsRequest pageSize */ + pageSize?: (number|null); + + /** ListEnvironmentsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListEnvironmentsRequest. */ + class ListEnvironmentsRequest implements IListEnvironmentsRequest { + + /** + * Constructs a new ListEnvironmentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest); + + /** ListEnvironmentsRequest parent. */ + public parent: string; + + /** ListEnvironmentsRequest pageSize. */ + public pageSize: number; + + /** ListEnvironmentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListEnvironmentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEnvironmentsRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest; + + /** + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.verify|verify} messages. + * @param message ListEnvironmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.verify|verify} messages. + * @param message ListEnvironmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest; + + /** + * Verifies a ListEnvironmentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEnvironmentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest; + + /** + * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * @param message ListEnvironmentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEnvironmentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEnvironmentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEnvironmentsResponse. */ + interface IListEnvironmentsResponse { + + /** ListEnvironmentsResponse environments */ + environments?: (google.cloud.orchestration.airflow.service.v1.IEnvironment[]|null); + + /** ListEnvironmentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListEnvironmentsResponse. */ + class ListEnvironmentsResponse implements IListEnvironmentsResponse { + + /** + * Constructs a new ListEnvironmentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse); + + /** ListEnvironmentsResponse environments. */ + public environments: google.cloud.orchestration.airflow.service.v1.IEnvironment[]; + + /** ListEnvironmentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListEnvironmentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEnvironmentsResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; + + /** + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.verify|verify} messages. + * @param message ListEnvironmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.verify|verify} messages. + * @param message ListEnvironmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; + + /** + * Verifies a ListEnvironmentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEnvironmentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; + + /** + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * @param message ListEnvironmentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEnvironmentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEnvironmentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteEnvironmentRequest. */ + interface IDeleteEnvironmentRequest { + + /** DeleteEnvironmentRequest name */ + name?: (string|null); + } + + /** Represents a DeleteEnvironmentRequest. */ + class DeleteEnvironmentRequest implements IDeleteEnvironmentRequest { + + /** + * Constructs a new DeleteEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest); + + /** DeleteEnvironmentRequest name. */ + public name: string; + + /** + * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteEnvironmentRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest): google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest; + + /** + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @param message DeleteEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @param message DeleteEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest; + + /** + * Verifies a DeleteEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest; + + /** + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * @param message DeleteEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEnvironmentRequest. */ + interface IUpdateEnvironmentRequest { + + /** UpdateEnvironmentRequest name */ + name?: (string|null); + + /** UpdateEnvironmentRequest environment */ + environment?: (google.cloud.orchestration.airflow.service.v1.IEnvironment|null); + + /** UpdateEnvironmentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateEnvironmentRequest. */ + class UpdateEnvironmentRequest implements IUpdateEnvironmentRequest { + + /** + * Constructs a new UpdateEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest); + + /** UpdateEnvironmentRequest name. */ + public name: string; + + /** UpdateEnvironmentRequest environment. */ + public environment?: (google.cloud.orchestration.airflow.service.v1.IEnvironment|null); + + /** UpdateEnvironmentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEnvironmentRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest): google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest; + + /** + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @param message UpdateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @param message UpdateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest; + + /** + * Verifies an UpdateEnvironmentRequest message. + * @param message Plain 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 UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest; + + /** + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * @param message UpdateEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteAirflowCommandRequest. */ + interface IExecuteAirflowCommandRequest { + + /** ExecuteAirflowCommandRequest environment */ + environment?: (string|null); + + /** ExecuteAirflowCommandRequest command */ + command?: (string|null); + + /** ExecuteAirflowCommandRequest subcommand */ + subcommand?: (string|null); + + /** ExecuteAirflowCommandRequest parameters */ + parameters?: (string[]|null); + } + + /** Represents an ExecuteAirflowCommandRequest. */ + class ExecuteAirflowCommandRequest implements IExecuteAirflowCommandRequest { + + /** + * Constructs a new ExecuteAirflowCommandRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest); + + /** ExecuteAirflowCommandRequest environment. */ + public environment: string; + + /** ExecuteAirflowCommandRequest command. */ + public command: string; + + /** ExecuteAirflowCommandRequest subcommand. */ + public subcommand: string; + + /** ExecuteAirflowCommandRequest parameters. */ + public parameters: string[]; + + /** + * Creates a new ExecuteAirflowCommandRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteAirflowCommandRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest): google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest; + + /** + * Encodes the specified ExecuteAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest.verify|verify} messages. + * @param message ExecuteAirflowCommandRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest.verify|verify} messages. + * @param message ExecuteAirflowCommandRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteAirflowCommandRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest; + + /** + * Decodes an ExecuteAirflowCommandRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest; + + /** + * Verifies an ExecuteAirflowCommandRequest message. + * @param message Plain 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 ExecuteAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteAirflowCommandRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest; + + /** + * Creates a plain object from an ExecuteAirflowCommandRequest message. Also converts values to other types if specified. + * @param message ExecuteAirflowCommandRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteAirflowCommandRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteAirflowCommandRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteAirflowCommandResponse. */ + interface IExecuteAirflowCommandResponse { + + /** ExecuteAirflowCommandResponse executionId */ + executionId?: (string|null); + + /** ExecuteAirflowCommandResponse pod */ + pod?: (string|null); + + /** ExecuteAirflowCommandResponse podNamespace */ + podNamespace?: (string|null); + + /** ExecuteAirflowCommandResponse error */ + error?: (string|null); + } + + /** Represents an ExecuteAirflowCommandResponse. */ + class ExecuteAirflowCommandResponse implements IExecuteAirflowCommandResponse { + + /** + * Constructs a new ExecuteAirflowCommandResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse); + + /** ExecuteAirflowCommandResponse executionId. */ + public executionId: string; + + /** ExecuteAirflowCommandResponse pod. */ + public pod: string; + + /** ExecuteAirflowCommandResponse podNamespace. */ + public podNamespace: string; + + /** ExecuteAirflowCommandResponse error. */ + public error: string; + + /** + * Creates a new ExecuteAirflowCommandResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteAirflowCommandResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse): google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse; + + /** + * Encodes the specified ExecuteAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse.verify|verify} messages. + * @param message ExecuteAirflowCommandResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse.verify|verify} messages. + * @param message ExecuteAirflowCommandResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteAirflowCommandResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse; + + /** + * Decodes an ExecuteAirflowCommandResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse; + + /** + * Verifies an ExecuteAirflowCommandResponse message. + * @param message Plain 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 ExecuteAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteAirflowCommandResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse; + + /** + * Creates a plain object from an ExecuteAirflowCommandResponse message. Also converts values to other types if specified. + * @param message ExecuteAirflowCommandResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteAirflowCommandResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteAirflowCommandResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StopAirflowCommandRequest. */ + interface IStopAirflowCommandRequest { + + /** StopAirflowCommandRequest environment */ + environment?: (string|null); + + /** StopAirflowCommandRequest executionId */ + executionId?: (string|null); + + /** StopAirflowCommandRequest pod */ + pod?: (string|null); + + /** StopAirflowCommandRequest podNamespace */ + podNamespace?: (string|null); + + /** StopAirflowCommandRequest force */ + force?: (boolean|null); + } + + /** Represents a StopAirflowCommandRequest. */ + class StopAirflowCommandRequest implements IStopAirflowCommandRequest { + + /** + * Constructs a new StopAirflowCommandRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest); + + /** StopAirflowCommandRequest environment. */ + public environment: string; + + /** StopAirflowCommandRequest executionId. */ + public executionId: string; + + /** StopAirflowCommandRequest pod. */ + public pod: string; + + /** StopAirflowCommandRequest podNamespace. */ + public podNamespace: string; + + /** StopAirflowCommandRequest force. */ + public force: boolean; + + /** + * Creates a new StopAirflowCommandRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StopAirflowCommandRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest): google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest; + + /** + * Encodes the specified StopAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest.verify|verify} messages. + * @param message StopAirflowCommandRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StopAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest.verify|verify} messages. + * @param message StopAirflowCommandRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StopAirflowCommandRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StopAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest; + + /** + * Decodes a StopAirflowCommandRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StopAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest; + + /** + * Verifies a StopAirflowCommandRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StopAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StopAirflowCommandRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest; + + /** + * Creates a plain object from a StopAirflowCommandRequest message. Also converts values to other types if specified. + * @param message StopAirflowCommandRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StopAirflowCommandRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StopAirflowCommandRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StopAirflowCommandResponse. */ + interface IStopAirflowCommandResponse { + + /** StopAirflowCommandResponse isDone */ + isDone?: (boolean|null); + + /** StopAirflowCommandResponse output */ + output?: (string[]|null); + } + + /** Represents a StopAirflowCommandResponse. */ + class StopAirflowCommandResponse implements IStopAirflowCommandResponse { + + /** + * Constructs a new StopAirflowCommandResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse); + + /** StopAirflowCommandResponse isDone. */ + public isDone: boolean; + + /** StopAirflowCommandResponse output. */ + public output: string[]; + + /** + * Creates a new StopAirflowCommandResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns StopAirflowCommandResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse): google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse; + + /** + * Encodes the specified StopAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse.verify|verify} messages. + * @param message StopAirflowCommandResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StopAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse.verify|verify} messages. + * @param message StopAirflowCommandResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StopAirflowCommandResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StopAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse; + + /** + * Decodes a StopAirflowCommandResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StopAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse; + + /** + * Verifies a StopAirflowCommandResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StopAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StopAirflowCommandResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse; + + /** + * Creates a plain object from a StopAirflowCommandResponse message. Also converts values to other types if specified. + * @param message StopAirflowCommandResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StopAirflowCommandResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StopAirflowCommandResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PollAirflowCommandRequest. */ + interface IPollAirflowCommandRequest { + + /** PollAirflowCommandRequest environment */ + environment?: (string|null); + + /** PollAirflowCommandRequest executionId */ + executionId?: (string|null); + + /** PollAirflowCommandRequest pod */ + pod?: (string|null); + + /** PollAirflowCommandRequest podNamespace */ + podNamespace?: (string|null); + + /** PollAirflowCommandRequest nextLineNumber */ + nextLineNumber?: (number|null); + } + + /** Represents a PollAirflowCommandRequest. */ + class PollAirflowCommandRequest implements IPollAirflowCommandRequest { + + /** + * Constructs a new PollAirflowCommandRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest); + + /** PollAirflowCommandRequest environment. */ + public environment: string; + + /** PollAirflowCommandRequest executionId. */ + public executionId: string; + + /** PollAirflowCommandRequest pod. */ + public pod: string; + + /** PollAirflowCommandRequest podNamespace. */ + public podNamespace: string; + + /** PollAirflowCommandRequest nextLineNumber. */ + public nextLineNumber: number; + + /** + * Creates a new PollAirflowCommandRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PollAirflowCommandRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest; + + /** + * Encodes the specified PollAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest.verify|verify} messages. + * @param message PollAirflowCommandRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest.verify|verify} messages. + * @param message PollAirflowCommandRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollAirflowCommandRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest; + + /** + * Decodes a PollAirflowCommandRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest; + + /** + * Verifies a PollAirflowCommandRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PollAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollAirflowCommandRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest; + + /** + * Creates a plain object from a PollAirflowCommandRequest message. Also converts values to other types if specified. + * @param message PollAirflowCommandRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollAirflowCommandRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollAirflowCommandRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PollAirflowCommandResponse. */ + interface IPollAirflowCommandResponse { + + /** PollAirflowCommandResponse output */ + output?: (google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine[]|null); + + /** PollAirflowCommandResponse outputEnd */ + outputEnd?: (boolean|null); + + /** PollAirflowCommandResponse exitInfo */ + exitInfo?: (google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo|null); + } + + /** Represents a PollAirflowCommandResponse. */ + class PollAirflowCommandResponse implements IPollAirflowCommandResponse { + + /** + * Constructs a new PollAirflowCommandResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse); + + /** PollAirflowCommandResponse output. */ + public output: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine[]; + + /** PollAirflowCommandResponse outputEnd. */ + public outputEnd: boolean; + + /** PollAirflowCommandResponse exitInfo. */ + public exitInfo?: (google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo|null); + + /** + * Creates a new PollAirflowCommandResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PollAirflowCommandResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse; + + /** + * Encodes the specified PollAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.verify|verify} messages. + * @param message PollAirflowCommandResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.verify|verify} messages. + * @param message PollAirflowCommandResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollAirflowCommandResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse; + + /** + * Decodes a PollAirflowCommandResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse; + + /** + * Verifies a PollAirflowCommandResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PollAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollAirflowCommandResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse; + + /** + * Creates a plain object from a PollAirflowCommandResponse message. Also converts values to other types if specified. + * @param message PollAirflowCommandResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollAirflowCommandResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollAirflowCommandResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PollAirflowCommandResponse { + + /** Properties of a Line. */ + interface ILine { + + /** Line lineNumber */ + lineNumber?: (number|null); + + /** Line content */ + content?: (string|null); + } + + /** Represents a Line. */ + class Line implements ILine { + + /** + * Constructs a new Line. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine); + + /** Line lineNumber. */ + public lineNumber: number; + + /** Line content. */ + public content: string; + + /** + * Creates a new Line instance using the specified properties. + * @param [properties] Properties to set + * @returns Line instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line; + + /** + * Encodes the specified Line message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.verify|verify} messages. + * @param message Line message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Line message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.verify|verify} messages. + * @param message Line message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Line message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Line + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line; + + /** + * Decodes a Line message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Line + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line; + + /** + * Verifies a Line message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Line message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Line + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line; + + /** + * Creates a plain object from a Line message. Also converts values to other types if specified. + * @param message Line + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Line to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Line + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExitInfo. */ + interface IExitInfo { + + /** ExitInfo exitCode */ + exitCode?: (number|null); + + /** ExitInfo error */ + error?: (string|null); + } + + /** Represents an ExitInfo. */ + class ExitInfo implements IExitInfo { + + /** + * Constructs a new ExitInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo); + + /** ExitInfo exitCode. */ + public exitCode: number; + + /** ExitInfo error. */ + public error: string; + + /** + * Creates a new ExitInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ExitInfo instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo; + + /** + * Encodes the specified ExitInfo message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.verify|verify} messages. + * @param message ExitInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExitInfo message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.verify|verify} messages. + * @param message ExitInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExitInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo; + + /** + * Decodes an ExitInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo; + + /** + * Verifies an ExitInfo message. + * @param message Plain 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 ExitInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExitInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo; + + /** + * Creates a plain object from an ExitInfo message. Also converts values to other types if specified. + * @param message ExitInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExitInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExitInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateUserWorkloadsSecretRequest. */ + interface ICreateUserWorkloadsSecretRequest { + + /** CreateUserWorkloadsSecretRequest parent */ + parent?: (string|null); + + /** CreateUserWorkloadsSecretRequest userWorkloadsSecret */ + userWorkloadsSecret?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null); + } + + /** Represents a CreateUserWorkloadsSecretRequest. */ + class CreateUserWorkloadsSecretRequest implements ICreateUserWorkloadsSecretRequest { + + /** + * Constructs a new CreateUserWorkloadsSecretRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest); + + /** CreateUserWorkloadsSecretRequest parent. */ + public parent: string; + + /** CreateUserWorkloadsSecretRequest userWorkloadsSecret. */ + public userWorkloadsSecret?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null); + + /** + * Creates a new CreateUserWorkloadsSecretRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserWorkloadsSecretRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest): google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest; + + /** + * Encodes the specified CreateUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest.verify|verify} messages. + * @param message CreateUserWorkloadsSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest.verify|verify} messages. + * @param message CreateUserWorkloadsSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserWorkloadsSecretRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest; + + /** + * Decodes a CreateUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest; + + /** + * Verifies a CreateUserWorkloadsSecretRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserWorkloadsSecretRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest; + + /** + * Creates a plain object from a CreateUserWorkloadsSecretRequest message. Also converts values to other types if specified. + * @param message CreateUserWorkloadsSecretRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserWorkloadsSecretRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserWorkloadsSecretRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetUserWorkloadsSecretRequest. */ + interface IGetUserWorkloadsSecretRequest { + + /** GetUserWorkloadsSecretRequest name */ + name?: (string|null); + } + + /** Represents a GetUserWorkloadsSecretRequest. */ + class GetUserWorkloadsSecretRequest implements IGetUserWorkloadsSecretRequest { + + /** + * Constructs a new GetUserWorkloadsSecretRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest); + + /** GetUserWorkloadsSecretRequest name. */ + public name: string; + + /** + * Creates a new GetUserWorkloadsSecretRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetUserWorkloadsSecretRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest): google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest; + + /** + * Encodes the specified GetUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest.verify|verify} messages. + * @param message GetUserWorkloadsSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest.verify|verify} messages. + * @param message GetUserWorkloadsSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetUserWorkloadsSecretRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest; + + /** + * Decodes a GetUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest; + + /** + * Verifies a GetUserWorkloadsSecretRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetUserWorkloadsSecretRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest; + + /** + * Creates a plain object from a GetUserWorkloadsSecretRequest message. Also converts values to other types if specified. + * @param message GetUserWorkloadsSecretRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetUserWorkloadsSecretRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetUserWorkloadsSecretRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserWorkloadsSecretsRequest. */ + interface IListUserWorkloadsSecretsRequest { + + /** ListUserWorkloadsSecretsRequest parent */ + parent?: (string|null); + + /** ListUserWorkloadsSecretsRequest pageSize */ + pageSize?: (number|null); + + /** ListUserWorkloadsSecretsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListUserWorkloadsSecretsRequest. */ + class ListUserWorkloadsSecretsRequest implements IListUserWorkloadsSecretsRequest { + + /** + * Constructs a new ListUserWorkloadsSecretsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest); + + /** ListUserWorkloadsSecretsRequest parent. */ + public parent: string; + + /** ListUserWorkloadsSecretsRequest pageSize. */ + public pageSize: number; + + /** ListUserWorkloadsSecretsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListUserWorkloadsSecretsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserWorkloadsSecretsRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest; + + /** + * Encodes the specified ListUserWorkloadsSecretsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest.verify|verify} messages. + * @param message ListUserWorkloadsSecretsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserWorkloadsSecretsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest.verify|verify} messages. + * @param message ListUserWorkloadsSecretsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserWorkloadsSecretsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserWorkloadsSecretsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest; + + /** + * Decodes a ListUserWorkloadsSecretsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserWorkloadsSecretsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest; + + /** + * Verifies a ListUserWorkloadsSecretsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserWorkloadsSecretsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserWorkloadsSecretsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest; + + /** + * Creates a plain object from a ListUserWorkloadsSecretsRequest message. Also converts values to other types if specified. + * @param message ListUserWorkloadsSecretsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserWorkloadsSecretsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserWorkloadsSecretsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateUserWorkloadsSecretRequest. */ + interface IUpdateUserWorkloadsSecretRequest { + + /** UpdateUserWorkloadsSecretRequest userWorkloadsSecret */ + userWorkloadsSecret?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null); + } + + /** Represents an UpdateUserWorkloadsSecretRequest. */ + class UpdateUserWorkloadsSecretRequest implements IUpdateUserWorkloadsSecretRequest { + + /** + * Constructs a new UpdateUserWorkloadsSecretRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest); + + /** UpdateUserWorkloadsSecretRequest userWorkloadsSecret. */ + public userWorkloadsSecret?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null); + + /** + * Creates a new UpdateUserWorkloadsSecretRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserWorkloadsSecretRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest): google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest; + + /** + * Encodes the specified UpdateUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest.verify|verify} messages. + * @param message UpdateUserWorkloadsSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest.verify|verify} messages. + * @param message UpdateUserWorkloadsSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserWorkloadsSecretRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest; + + /** + * Decodes an UpdateUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest; + + /** + * Verifies an UpdateUserWorkloadsSecretRequest message. + * @param message Plain 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 UpdateUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserWorkloadsSecretRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest; + + /** + * Creates a plain object from an UpdateUserWorkloadsSecretRequest message. Also converts values to other types if specified. + * @param message UpdateUserWorkloadsSecretRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserWorkloadsSecretRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserWorkloadsSecretRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteUserWorkloadsSecretRequest. */ + interface IDeleteUserWorkloadsSecretRequest { + + /** DeleteUserWorkloadsSecretRequest name */ + name?: (string|null); + } + + /** Represents a DeleteUserWorkloadsSecretRequest. */ + class DeleteUserWorkloadsSecretRequest implements IDeleteUserWorkloadsSecretRequest { + + /** + * Constructs a new DeleteUserWorkloadsSecretRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest); + + /** DeleteUserWorkloadsSecretRequest name. */ + public name: string; + + /** + * Creates a new DeleteUserWorkloadsSecretRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteUserWorkloadsSecretRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest): google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest; + + /** + * Encodes the specified DeleteUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest.verify|verify} messages. + * @param message DeleteUserWorkloadsSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest.verify|verify} messages. + * @param message DeleteUserWorkloadsSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteUserWorkloadsSecretRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest; + + /** + * Decodes a DeleteUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest; + + /** + * Verifies a DeleteUserWorkloadsSecretRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteUserWorkloadsSecretRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest; + + /** + * Creates a plain object from a DeleteUserWorkloadsSecretRequest message. Also converts values to other types if specified. + * @param message DeleteUserWorkloadsSecretRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteUserWorkloadsSecretRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteUserWorkloadsSecretRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateUserWorkloadsConfigMapRequest. */ + interface ICreateUserWorkloadsConfigMapRequest { + + /** CreateUserWorkloadsConfigMapRequest parent */ + parent?: (string|null); + + /** CreateUserWorkloadsConfigMapRequest userWorkloadsConfigMap */ + userWorkloadsConfigMap?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null); + } + + /** Represents a CreateUserWorkloadsConfigMapRequest. */ + class CreateUserWorkloadsConfigMapRequest implements ICreateUserWorkloadsConfigMapRequest { + + /** + * Constructs a new CreateUserWorkloadsConfigMapRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest); + + /** CreateUserWorkloadsConfigMapRequest parent. */ + public parent: string; + + /** CreateUserWorkloadsConfigMapRequest userWorkloadsConfigMap. */ + public userWorkloadsConfigMap?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null); + + /** + * Creates a new CreateUserWorkloadsConfigMapRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserWorkloadsConfigMapRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest): google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest; + + /** + * Encodes the specified CreateUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest.verify|verify} messages. + * @param message CreateUserWorkloadsConfigMapRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest.verify|verify} messages. + * @param message CreateUserWorkloadsConfigMapRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserWorkloadsConfigMapRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest; + + /** + * Decodes a CreateUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest; + + /** + * Verifies a CreateUserWorkloadsConfigMapRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserWorkloadsConfigMapRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest; + + /** + * Creates a plain object from a CreateUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. + * @param message CreateUserWorkloadsConfigMapRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserWorkloadsConfigMapRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserWorkloadsConfigMapRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetUserWorkloadsConfigMapRequest. */ + interface IGetUserWorkloadsConfigMapRequest { + + /** GetUserWorkloadsConfigMapRequest name */ + name?: (string|null); + } + + /** Represents a GetUserWorkloadsConfigMapRequest. */ + class GetUserWorkloadsConfigMapRequest implements IGetUserWorkloadsConfigMapRequest { + + /** + * Constructs a new GetUserWorkloadsConfigMapRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest); + + /** GetUserWorkloadsConfigMapRequest name. */ + public name: string; + + /** + * Creates a new GetUserWorkloadsConfigMapRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetUserWorkloadsConfigMapRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest): google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest; + + /** + * Encodes the specified GetUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest.verify|verify} messages. + * @param message GetUserWorkloadsConfigMapRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest.verify|verify} messages. + * @param message GetUserWorkloadsConfigMapRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetUserWorkloadsConfigMapRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest; + + /** + * Decodes a GetUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest; + + /** + * Verifies a GetUserWorkloadsConfigMapRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetUserWorkloadsConfigMapRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest; + + /** + * Creates a plain object from a GetUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. + * @param message GetUserWorkloadsConfigMapRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetUserWorkloadsConfigMapRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetUserWorkloadsConfigMapRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserWorkloadsConfigMapsRequest. */ + interface IListUserWorkloadsConfigMapsRequest { + + /** ListUserWorkloadsConfigMapsRequest parent */ + parent?: (string|null); + + /** ListUserWorkloadsConfigMapsRequest pageSize */ + pageSize?: (number|null); + + /** ListUserWorkloadsConfigMapsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListUserWorkloadsConfigMapsRequest. */ + class ListUserWorkloadsConfigMapsRequest implements IListUserWorkloadsConfigMapsRequest { + + /** + * Constructs a new ListUserWorkloadsConfigMapsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest); + + /** ListUserWorkloadsConfigMapsRequest parent. */ + public parent: string; + + /** ListUserWorkloadsConfigMapsRequest pageSize. */ + public pageSize: number; + + /** ListUserWorkloadsConfigMapsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListUserWorkloadsConfigMapsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserWorkloadsConfigMapsRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest; + + /** + * Encodes the specified ListUserWorkloadsConfigMapsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest.verify|verify} messages. + * @param message ListUserWorkloadsConfigMapsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserWorkloadsConfigMapsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest.verify|verify} messages. + * @param message ListUserWorkloadsConfigMapsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserWorkloadsConfigMapsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserWorkloadsConfigMapsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest; + + /** + * Decodes a ListUserWorkloadsConfigMapsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserWorkloadsConfigMapsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest; + + /** + * Verifies a ListUserWorkloadsConfigMapsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserWorkloadsConfigMapsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserWorkloadsConfigMapsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest; + + /** + * Creates a plain object from a ListUserWorkloadsConfigMapsRequest message. Also converts values to other types if specified. + * @param message ListUserWorkloadsConfigMapsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserWorkloadsConfigMapsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserWorkloadsConfigMapsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateUserWorkloadsConfigMapRequest. */ + interface IUpdateUserWorkloadsConfigMapRequest { + + /** UpdateUserWorkloadsConfigMapRequest userWorkloadsConfigMap */ + userWorkloadsConfigMap?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null); + } + + /** Represents an UpdateUserWorkloadsConfigMapRequest. */ + class UpdateUserWorkloadsConfigMapRequest implements IUpdateUserWorkloadsConfigMapRequest { + + /** + * Constructs a new UpdateUserWorkloadsConfigMapRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest); + + /** UpdateUserWorkloadsConfigMapRequest userWorkloadsConfigMap. */ + public userWorkloadsConfigMap?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null); + + /** + * Creates a new UpdateUserWorkloadsConfigMapRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserWorkloadsConfigMapRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest): google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest; + + /** + * Encodes the specified UpdateUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest.verify|verify} messages. + * @param message UpdateUserWorkloadsConfigMapRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest.verify|verify} messages. + * @param message UpdateUserWorkloadsConfigMapRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserWorkloadsConfigMapRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest; + + /** + * Decodes an UpdateUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest; + + /** + * Verifies an UpdateUserWorkloadsConfigMapRequest message. + * @param message Plain 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 UpdateUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserWorkloadsConfigMapRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest; + + /** + * Creates a plain object from an UpdateUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. + * @param message UpdateUserWorkloadsConfigMapRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserWorkloadsConfigMapRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserWorkloadsConfigMapRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteUserWorkloadsConfigMapRequest. */ + interface IDeleteUserWorkloadsConfigMapRequest { + + /** DeleteUserWorkloadsConfigMapRequest name */ + name?: (string|null); + } + + /** Represents a DeleteUserWorkloadsConfigMapRequest. */ + class DeleteUserWorkloadsConfigMapRequest implements IDeleteUserWorkloadsConfigMapRequest { + + /** + * Constructs a new DeleteUserWorkloadsConfigMapRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest); + + /** DeleteUserWorkloadsConfigMapRequest name. */ + public name: string; + + /** + * Creates a new DeleteUserWorkloadsConfigMapRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteUserWorkloadsConfigMapRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest): google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest; + + /** + * Encodes the specified DeleteUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest.verify|verify} messages. + * @param message DeleteUserWorkloadsConfigMapRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest.verify|verify} messages. + * @param message DeleteUserWorkloadsConfigMapRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteUserWorkloadsConfigMapRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest; + + /** + * Decodes a DeleteUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest; + + /** + * Verifies a DeleteUserWorkloadsConfigMapRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteUserWorkloadsConfigMapRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest; + + /** + * Creates a plain object from a DeleteUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. + * @param message DeleteUserWorkloadsConfigMapRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteUserWorkloadsConfigMapRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteUserWorkloadsConfigMapRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserWorkloadsSecret. */ + interface IUserWorkloadsSecret { + + /** UserWorkloadsSecret name */ + name?: (string|null); + + /** UserWorkloadsSecret data */ + data?: ({ [k: string]: string }|null); + } + + /** Represents a UserWorkloadsSecret. */ + class UserWorkloadsSecret implements IUserWorkloadsSecret { + + /** + * Constructs a new UserWorkloadsSecret. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret); + + /** UserWorkloadsSecret name. */ + public name: string; + + /** UserWorkloadsSecret data. */ + public data: { [k: string]: string }; + + /** + * Creates a new UserWorkloadsSecret instance using the specified properties. + * @param [properties] Properties to set + * @returns UserWorkloadsSecret instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret): google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret; + + /** + * Encodes the specified UserWorkloadsSecret message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.verify|verify} messages. + * @param message UserWorkloadsSecret message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserWorkloadsSecret message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.verify|verify} messages. + * @param message UserWorkloadsSecret message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserWorkloadsSecret message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserWorkloadsSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret; + + /** + * Decodes a UserWorkloadsSecret message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserWorkloadsSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret; + + /** + * Verifies a UserWorkloadsSecret message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserWorkloadsSecret message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserWorkloadsSecret + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret; + + /** + * Creates a plain object from a UserWorkloadsSecret message. Also converts values to other types if specified. + * @param message UserWorkloadsSecret + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserWorkloadsSecret to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserWorkloadsSecret + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserWorkloadsSecretsResponse. */ + interface IListUserWorkloadsSecretsResponse { + + /** ListUserWorkloadsSecretsResponse userWorkloadsSecrets */ + userWorkloadsSecrets?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret[]|null); + + /** ListUserWorkloadsSecretsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListUserWorkloadsSecretsResponse. */ + class ListUserWorkloadsSecretsResponse implements IListUserWorkloadsSecretsResponse { + + /** + * Constructs a new ListUserWorkloadsSecretsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse); + + /** ListUserWorkloadsSecretsResponse userWorkloadsSecrets. */ + public userWorkloadsSecrets: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret[]; + + /** ListUserWorkloadsSecretsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListUserWorkloadsSecretsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserWorkloadsSecretsResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse; + + /** + * Encodes the specified ListUserWorkloadsSecretsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse.verify|verify} messages. + * @param message ListUserWorkloadsSecretsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserWorkloadsSecretsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse.verify|verify} messages. + * @param message ListUserWorkloadsSecretsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserWorkloadsSecretsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserWorkloadsSecretsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse; + + /** + * Decodes a ListUserWorkloadsSecretsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserWorkloadsSecretsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse; + + /** + * Verifies a ListUserWorkloadsSecretsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserWorkloadsSecretsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserWorkloadsSecretsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse; + + /** + * Creates a plain object from a ListUserWorkloadsSecretsResponse message. Also converts values to other types if specified. + * @param message ListUserWorkloadsSecretsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserWorkloadsSecretsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserWorkloadsSecretsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserWorkloadsConfigMap. */ + interface IUserWorkloadsConfigMap { + + /** UserWorkloadsConfigMap name */ + name?: (string|null); + + /** UserWorkloadsConfigMap data */ + data?: ({ [k: string]: string }|null); + } + + /** Represents a UserWorkloadsConfigMap. */ + class UserWorkloadsConfigMap implements IUserWorkloadsConfigMap { + + /** + * Constructs a new UserWorkloadsConfigMap. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap); + + /** UserWorkloadsConfigMap name. */ + public name: string; + + /** UserWorkloadsConfigMap data. */ + public data: { [k: string]: string }; + + /** + * Creates a new UserWorkloadsConfigMap instance using the specified properties. + * @param [properties] Properties to set + * @returns UserWorkloadsConfigMap instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap): google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap; + + /** + * Encodes the specified UserWorkloadsConfigMap message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.verify|verify} messages. + * @param message UserWorkloadsConfigMap message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserWorkloadsConfigMap message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.verify|verify} messages. + * @param message UserWorkloadsConfigMap message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserWorkloadsConfigMap message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserWorkloadsConfigMap + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap; + + /** + * Decodes a UserWorkloadsConfigMap message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserWorkloadsConfigMap + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap; + + /** + * Verifies a UserWorkloadsConfigMap message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserWorkloadsConfigMap message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserWorkloadsConfigMap + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap; + + /** + * Creates a plain object from a UserWorkloadsConfigMap message. Also converts values to other types if specified. + * @param message UserWorkloadsConfigMap + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserWorkloadsConfigMap to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserWorkloadsConfigMap + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserWorkloadsConfigMapsResponse. */ + interface IListUserWorkloadsConfigMapsResponse { + + /** ListUserWorkloadsConfigMapsResponse userWorkloadsConfigMaps */ + userWorkloadsConfigMaps?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap[]|null); + + /** ListUserWorkloadsConfigMapsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListUserWorkloadsConfigMapsResponse. */ + class ListUserWorkloadsConfigMapsResponse implements IListUserWorkloadsConfigMapsResponse { + + /** + * Constructs a new ListUserWorkloadsConfigMapsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse); + + /** ListUserWorkloadsConfigMapsResponse userWorkloadsConfigMaps. */ + public userWorkloadsConfigMaps: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap[]; + + /** ListUserWorkloadsConfigMapsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListUserWorkloadsConfigMapsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserWorkloadsConfigMapsResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse; + + /** + * Encodes the specified ListUserWorkloadsConfigMapsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse.verify|verify} messages. + * @param message ListUserWorkloadsConfigMapsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserWorkloadsConfigMapsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse.verify|verify} messages. + * @param message ListUserWorkloadsConfigMapsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserWorkloadsConfigMapsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserWorkloadsConfigMapsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse; + + /** + * Decodes a ListUserWorkloadsConfigMapsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserWorkloadsConfigMapsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse; + + /** + * Verifies a ListUserWorkloadsConfigMapsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserWorkloadsConfigMapsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserWorkloadsConfigMapsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse; + + /** + * Creates a plain object from a ListUserWorkloadsConfigMapsResponse message. Also converts values to other types if specified. + * @param message ListUserWorkloadsConfigMapsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserWorkloadsConfigMapsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserWorkloadsConfigMapsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListWorkloadsRequest. */ + interface IListWorkloadsRequest { + + /** ListWorkloadsRequest parent */ + parent?: (string|null); + + /** ListWorkloadsRequest pageSize */ + pageSize?: (number|null); + + /** ListWorkloadsRequest pageToken */ + pageToken?: (string|null); + + /** ListWorkloadsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListWorkloadsRequest. */ + class ListWorkloadsRequest implements IListWorkloadsRequest { + + /** + * Constructs a new ListWorkloadsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest); + + /** ListWorkloadsRequest parent. */ + public parent: string; + + /** ListWorkloadsRequest pageSize. */ + public pageSize: number; + + /** ListWorkloadsRequest pageToken. */ + public pageToken: string; + + /** ListWorkloadsRequest filter. */ + public filter: string; + + /** + * Creates a new ListWorkloadsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkloadsRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest): google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest; + + /** + * Encodes the specified ListWorkloadsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest.verify|verify} messages. + * @param message ListWorkloadsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkloadsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest.verify|verify} messages. + * @param message ListWorkloadsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkloadsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkloadsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest; + + /** + * Decodes a ListWorkloadsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkloadsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest; + + /** + * Verifies a ListWorkloadsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkloadsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkloadsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest; + + /** + * Creates a plain object from a ListWorkloadsRequest message. Also converts values to other types if specified. + * @param message ListWorkloadsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkloadsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkloadsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListWorkloadsResponse. */ + interface IListWorkloadsResponse { + + /** ListWorkloadsResponse workloads */ + workloads?: (google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload[]|null); + + /** ListWorkloadsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListWorkloadsResponse. */ + class ListWorkloadsResponse implements IListWorkloadsResponse { + + /** + * Constructs a new ListWorkloadsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse); + + /** ListWorkloadsResponse workloads. */ + public workloads: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload[]; + + /** ListWorkloadsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListWorkloadsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkloadsResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse; + + /** + * Encodes the specified ListWorkloadsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.verify|verify} messages. + * @param message ListWorkloadsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkloadsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.verify|verify} messages. + * @param message ListWorkloadsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkloadsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkloadsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse; + + /** + * Decodes a ListWorkloadsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkloadsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse; + + /** + * Verifies a ListWorkloadsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkloadsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkloadsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse; + + /** + * Creates a plain object from a ListWorkloadsResponse message. Also converts values to other types if specified. + * @param message ListWorkloadsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkloadsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkloadsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ListWorkloadsResponse { + + /** Properties of a ComposerWorkload. */ + interface IComposerWorkload { + + /** ComposerWorkload name */ + name?: (string|null); + + /** ComposerWorkload type */ + type?: (google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType|keyof typeof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType|null); + + /** ComposerWorkload status */ + status?: (google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus|null); + } + + /** Represents a ComposerWorkload. */ + class ComposerWorkload implements IComposerWorkload { + + /** + * Constructs a new ComposerWorkload. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload); + + /** ComposerWorkload name. */ + public name: string; + + /** ComposerWorkload type. */ + public type: (google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType|keyof typeof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType); + + /** ComposerWorkload status. */ + public status?: (google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus|null); + + /** + * Creates a new ComposerWorkload instance using the specified properties. + * @param [properties] Properties to set + * @returns ComposerWorkload instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload; + + /** + * Encodes the specified ComposerWorkload message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.verify|verify} messages. + * @param message ComposerWorkload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComposerWorkload message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.verify|verify} messages. + * @param message ComposerWorkload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComposerWorkload message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComposerWorkload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload; + + /** + * Decodes a ComposerWorkload message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComposerWorkload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload; + + /** + * Verifies a ComposerWorkload message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComposerWorkload message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComposerWorkload + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload; + + /** + * Creates a plain object from a ComposerWorkload message. Also converts values to other types if specified. + * @param message ComposerWorkload + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComposerWorkload to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComposerWorkload + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ComposerWorkloadType enum. */ + enum ComposerWorkloadType { + COMPOSER_WORKLOAD_TYPE_UNSPECIFIED = 0, + CELERY_WORKER = 1, + KUBERNETES_WORKER = 2, + KUBERNETES_OPERATOR_POD = 3, + SCHEDULER = 4, + DAG_PROCESSOR = 5, + TRIGGERER = 6, + WEB_SERVER = 7, + REDIS = 8 + } + + /** Properties of a ComposerWorkloadStatus. */ + interface IComposerWorkloadStatus { + + /** ComposerWorkloadStatus state */ + state?: (google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState|keyof typeof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState|null); + + /** ComposerWorkloadStatus statusMessage */ + statusMessage?: (string|null); + + /** ComposerWorkloadStatus detailedStatusMessage */ + detailedStatusMessage?: (string|null); + } + + /** Represents a ComposerWorkloadStatus. */ + class ComposerWorkloadStatus implements IComposerWorkloadStatus { + + /** + * Constructs a new ComposerWorkloadStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus); + + /** ComposerWorkloadStatus state. */ + public state: (google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState|keyof typeof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState); + + /** ComposerWorkloadStatus statusMessage. */ + public statusMessage: string; + + /** ComposerWorkloadStatus detailedStatusMessage. */ + public detailedStatusMessage: string; + + /** + * Creates a new ComposerWorkloadStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns ComposerWorkloadStatus instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus; + + /** + * Encodes the specified ComposerWorkloadStatus message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.verify|verify} messages. + * @param message ComposerWorkloadStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComposerWorkloadStatus message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.verify|verify} messages. + * @param message ComposerWorkloadStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComposerWorkloadStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComposerWorkloadStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus; + + /** + * Decodes a ComposerWorkloadStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComposerWorkloadStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus; + + /** + * Verifies a ComposerWorkloadStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComposerWorkloadStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComposerWorkloadStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus; + + /** + * Creates a plain object from a ComposerWorkloadStatus message. Also converts values to other types if specified. + * @param message ComposerWorkloadStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComposerWorkloadStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComposerWorkloadStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ComposerWorkloadState enum. */ + enum ComposerWorkloadState { + COMPOSER_WORKLOAD_STATE_UNSPECIFIED = 0, + PENDING = 1, + OK = 2, + WARNING = 3, + ERROR = 4, + SUCCEEDED = 5, + FAILED = 6 + } + } + + /** Properties of a SaveSnapshotRequest. */ + interface ISaveSnapshotRequest { + + /** SaveSnapshotRequest environment */ + environment?: (string|null); + + /** SaveSnapshotRequest snapshotLocation */ + snapshotLocation?: (string|null); + } + + /** Represents a SaveSnapshotRequest. */ + class SaveSnapshotRequest implements ISaveSnapshotRequest { + + /** + * Constructs a new SaveSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest); + + /** SaveSnapshotRequest environment. */ + public environment: string; + + /** SaveSnapshotRequest snapshotLocation. */ + public snapshotLocation: string; + + /** + * Creates a new SaveSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveSnapshotRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest): google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest; + + /** + * Encodes the specified SaveSnapshotRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest.verify|verify} messages. + * @param message SaveSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest.verify|verify} messages. + * @param message SaveSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest; + + /** + * Decodes a SaveSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest; + + /** + * Verifies a SaveSnapshotRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest; + + /** + * Creates a plain object from a SaveSnapshotRequest message. Also converts values to other types if specified. + * @param message SaveSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveSnapshotResponse. */ + interface ISaveSnapshotResponse { + + /** SaveSnapshotResponse snapshotPath */ + snapshotPath?: (string|null); + } + + /** Represents a SaveSnapshotResponse. */ + class SaveSnapshotResponse implements ISaveSnapshotResponse { + + /** + * Constructs a new SaveSnapshotResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse); + + /** SaveSnapshotResponse snapshotPath. */ + public snapshotPath: string; + + /** + * Creates a new SaveSnapshotResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveSnapshotResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse): google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse; + + /** + * Encodes the specified SaveSnapshotResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse.verify|verify} messages. + * @param message SaveSnapshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveSnapshotResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse.verify|verify} messages. + * @param message SaveSnapshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveSnapshotResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse; + + /** + * Decodes a SaveSnapshotResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse; + + /** + * Verifies a SaveSnapshotResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveSnapshotResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveSnapshotResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse; + + /** + * Creates a plain object from a SaveSnapshotResponse message. Also converts values to other types if specified. + * @param message SaveSnapshotResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveSnapshotResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveSnapshotResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadSnapshotRequest. */ + interface ILoadSnapshotRequest { + + /** LoadSnapshotRequest environment */ + environment?: (string|null); + + /** LoadSnapshotRequest snapshotPath */ + snapshotPath?: (string|null); + + /** LoadSnapshotRequest skipPypiPackagesInstallation */ + skipPypiPackagesInstallation?: (boolean|null); + + /** LoadSnapshotRequest skipEnvironmentVariablesSetting */ + skipEnvironmentVariablesSetting?: (boolean|null); + + /** LoadSnapshotRequest skipAirflowOverridesSetting */ + skipAirflowOverridesSetting?: (boolean|null); + + /** LoadSnapshotRequest skipGcsDataCopying */ + skipGcsDataCopying?: (boolean|null); + } + + /** Represents a LoadSnapshotRequest. */ + class LoadSnapshotRequest implements ILoadSnapshotRequest { + + /** + * Constructs a new LoadSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest); + + /** LoadSnapshotRequest environment. */ + public environment: string; + + /** LoadSnapshotRequest snapshotPath. */ + public snapshotPath: string; + + /** LoadSnapshotRequest skipPypiPackagesInstallation. */ + public skipPypiPackagesInstallation: boolean; + + /** LoadSnapshotRequest skipEnvironmentVariablesSetting. */ + public skipEnvironmentVariablesSetting: boolean; + + /** LoadSnapshotRequest skipAirflowOverridesSetting. */ + public skipAirflowOverridesSetting: boolean; + + /** LoadSnapshotRequest skipGcsDataCopying. */ + public skipGcsDataCopying: boolean; + + /** + * Creates a new LoadSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadSnapshotRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest): google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest; + + /** + * Encodes the specified LoadSnapshotRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest.verify|verify} messages. + * @param message LoadSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest.verify|verify} messages. + * @param message LoadSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest; + + /** + * Decodes a LoadSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest; + + /** + * Verifies a LoadSnapshotRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest; + + /** + * Creates a plain object from a LoadSnapshotRequest message. Also converts values to other types if specified. + * @param message LoadSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadSnapshotResponse. */ + interface ILoadSnapshotResponse { + } + + /** Represents a LoadSnapshotResponse. */ + class LoadSnapshotResponse implements ILoadSnapshotResponse { + + /** + * Constructs a new LoadSnapshotResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse); + + /** + * Creates a new LoadSnapshotResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadSnapshotResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse): google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse; + + /** + * Encodes the specified LoadSnapshotResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse.verify|verify} messages. + * @param message LoadSnapshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadSnapshotResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse.verify|verify} messages. + * @param message LoadSnapshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadSnapshotResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse; + + /** + * Decodes a LoadSnapshotResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse; + + /** + * Verifies a LoadSnapshotResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadSnapshotResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadSnapshotResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse; + + /** + * Creates a plain object from a LoadSnapshotResponse message. Also converts values to other types if specified. + * @param message LoadSnapshotResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadSnapshotResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadSnapshotResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DatabaseFailoverRequest. */ + interface IDatabaseFailoverRequest { + + /** DatabaseFailoverRequest environment */ + environment?: (string|null); + } + + /** Represents a DatabaseFailoverRequest. */ + class DatabaseFailoverRequest implements IDatabaseFailoverRequest { + + /** + * Constructs a new DatabaseFailoverRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest); + + /** DatabaseFailoverRequest environment. */ + public environment: string; + + /** + * Creates a new DatabaseFailoverRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseFailoverRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest): google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest; + + /** + * Encodes the specified DatabaseFailoverRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest.verify|verify} messages. + * @param message DatabaseFailoverRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseFailoverRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest.verify|verify} messages. + * @param message DatabaseFailoverRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseFailoverRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseFailoverRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest; + + /** + * Decodes a DatabaseFailoverRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseFailoverRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest; + + /** + * Verifies a DatabaseFailoverRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseFailoverRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseFailoverRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest; + + /** + * Creates a plain object from a DatabaseFailoverRequest message. Also converts values to other types if specified. + * @param message DatabaseFailoverRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseFailoverRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseFailoverRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DatabaseFailoverResponse. */ + interface IDatabaseFailoverResponse { + } + + /** Represents a DatabaseFailoverResponse. */ + class DatabaseFailoverResponse implements IDatabaseFailoverResponse { + + /** + * Constructs a new DatabaseFailoverResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse); + + /** + * Creates a new DatabaseFailoverResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseFailoverResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse): google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse; + + /** + * Encodes the specified DatabaseFailoverResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse.verify|verify} messages. + * @param message DatabaseFailoverResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseFailoverResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse.verify|verify} messages. + * @param message DatabaseFailoverResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseFailoverResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseFailoverResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse; + + /** + * Decodes a DatabaseFailoverResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseFailoverResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse; + + /** + * Verifies a DatabaseFailoverResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseFailoverResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseFailoverResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse; + + /** + * Creates a plain object from a DatabaseFailoverResponse message. Also converts values to other types if specified. + * @param message DatabaseFailoverResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseFailoverResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseFailoverResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchDatabasePropertiesRequest. */ + interface IFetchDatabasePropertiesRequest { + + /** FetchDatabasePropertiesRequest environment */ + environment?: (string|null); + } + + /** Represents a FetchDatabasePropertiesRequest. */ + class FetchDatabasePropertiesRequest implements IFetchDatabasePropertiesRequest { + + /** + * Constructs a new FetchDatabasePropertiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest); + + /** FetchDatabasePropertiesRequest environment. */ + public environment: string; + + /** + * Creates a new FetchDatabasePropertiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchDatabasePropertiesRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest): google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest; + + /** + * Encodes the specified FetchDatabasePropertiesRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest.verify|verify} messages. + * @param message FetchDatabasePropertiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchDatabasePropertiesRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest.verify|verify} messages. + * @param message FetchDatabasePropertiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchDatabasePropertiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchDatabasePropertiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest; + + /** + * Decodes a FetchDatabasePropertiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchDatabasePropertiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest; + + /** + * Verifies a FetchDatabasePropertiesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchDatabasePropertiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchDatabasePropertiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest; + + /** + * Creates a plain object from a FetchDatabasePropertiesRequest message. Also converts values to other types if specified. + * @param message FetchDatabasePropertiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchDatabasePropertiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchDatabasePropertiesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchDatabasePropertiesResponse. */ + interface IFetchDatabasePropertiesResponse { + + /** FetchDatabasePropertiesResponse primaryGceZone */ + primaryGceZone?: (string|null); + + /** FetchDatabasePropertiesResponse secondaryGceZone */ + secondaryGceZone?: (string|null); + + /** FetchDatabasePropertiesResponse isFailoverReplicaAvailable */ + isFailoverReplicaAvailable?: (boolean|null); + } + + /** Represents a FetchDatabasePropertiesResponse. */ + class FetchDatabasePropertiesResponse implements IFetchDatabasePropertiesResponse { + + /** + * Constructs a new FetchDatabasePropertiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse); + + /** FetchDatabasePropertiesResponse primaryGceZone. */ + public primaryGceZone: string; + + /** FetchDatabasePropertiesResponse secondaryGceZone. */ + public secondaryGceZone: string; + + /** FetchDatabasePropertiesResponse isFailoverReplicaAvailable. */ + public isFailoverReplicaAvailable: boolean; + + /** + * Creates a new FetchDatabasePropertiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchDatabasePropertiesResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse): google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse; + + /** + * Encodes the specified FetchDatabasePropertiesResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse.verify|verify} messages. + * @param message FetchDatabasePropertiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchDatabasePropertiesResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse.verify|verify} messages. + * @param message FetchDatabasePropertiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchDatabasePropertiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchDatabasePropertiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse; + + /** + * Decodes a FetchDatabasePropertiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchDatabasePropertiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse; + + /** + * Verifies a FetchDatabasePropertiesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchDatabasePropertiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchDatabasePropertiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse; + + /** + * Creates a plain object from a FetchDatabasePropertiesResponse message. Also converts values to other types if specified. + * @param message FetchDatabasePropertiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchDatabasePropertiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchDatabasePropertiesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StorageConfig. */ + interface IStorageConfig { + + /** StorageConfig bucket */ + bucket?: (string|null); + } + + /** Represents a StorageConfig. */ + class StorageConfig implements IStorageConfig { + + /** + * Constructs a new StorageConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IStorageConfig); + + /** StorageConfig bucket. */ + public bucket: string; + + /** + * Creates a new StorageConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IStorageConfig): google.cloud.orchestration.airflow.service.v1.StorageConfig; + + /** + * Encodes the specified StorageConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StorageConfig.verify|verify} messages. + * @param message StorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StorageConfig.verify|verify} messages. + * @param message StorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.StorageConfig; + + /** + * Decodes a StorageConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.StorageConfig; + + /** + * Verifies a StorageConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.StorageConfig; + + /** + * Creates a plain object from a StorageConfig message. Also converts values to other types if specified. + * @param message StorageConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.StorageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnvironmentConfig. */ + interface IEnvironmentConfig { + + /** EnvironmentConfig gkeCluster */ + gkeCluster?: (string|null); + + /** EnvironmentConfig dagGcsPrefix */ + dagGcsPrefix?: (string|null); + + /** EnvironmentConfig nodeCount */ + nodeCount?: (number|null); + + /** EnvironmentConfig softwareConfig */ + softwareConfig?: (google.cloud.orchestration.airflow.service.v1.ISoftwareConfig|null); + + /** EnvironmentConfig nodeConfig */ + nodeConfig?: (google.cloud.orchestration.airflow.service.v1.INodeConfig|null); + + /** EnvironmentConfig privateEnvironmentConfig */ + privateEnvironmentConfig?: (google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig|null); + + /** EnvironmentConfig webServerNetworkAccessControl */ + webServerNetworkAccessControl?: (google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl|null); + + /** EnvironmentConfig databaseConfig */ + databaseConfig?: (google.cloud.orchestration.airflow.service.v1.IDatabaseConfig|null); + + /** EnvironmentConfig webServerConfig */ + webServerConfig?: (google.cloud.orchestration.airflow.service.v1.IWebServerConfig|null); + + /** EnvironmentConfig encryptionConfig */ + encryptionConfig?: (google.cloud.orchestration.airflow.service.v1.IEncryptionConfig|null); + + /** EnvironmentConfig maintenanceWindow */ + maintenanceWindow?: (google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow|null); + + /** EnvironmentConfig workloadsConfig */ + workloadsConfig?: (google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig|null); + + /** EnvironmentConfig environmentSize */ + environmentSize?: (google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize|keyof typeof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize|null); + + /** EnvironmentConfig airflowUri */ + airflowUri?: (string|null); + + /** EnvironmentConfig airflowByoidUri */ + airflowByoidUri?: (string|null); + + /** EnvironmentConfig masterAuthorizedNetworksConfig */ + masterAuthorizedNetworksConfig?: (google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig|null); + + /** EnvironmentConfig recoveryConfig */ + recoveryConfig?: (google.cloud.orchestration.airflow.service.v1.IRecoveryConfig|null); + + /** EnvironmentConfig resilienceMode */ + resilienceMode?: (google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode|keyof typeof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode|null); + + /** EnvironmentConfig dataRetentionConfig */ + dataRetentionConfig?: (google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig|null); + } + + /** Represents an EnvironmentConfig. */ + class EnvironmentConfig implements IEnvironmentConfig { + + /** + * Constructs a new EnvironmentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig); + + /** EnvironmentConfig gkeCluster. */ + public gkeCluster: string; + + /** EnvironmentConfig dagGcsPrefix. */ + public dagGcsPrefix: string; + + /** EnvironmentConfig nodeCount. */ + public nodeCount: number; + + /** EnvironmentConfig softwareConfig. */ + public softwareConfig?: (google.cloud.orchestration.airflow.service.v1.ISoftwareConfig|null); + + /** EnvironmentConfig nodeConfig. */ + public nodeConfig?: (google.cloud.orchestration.airflow.service.v1.INodeConfig|null); + + /** EnvironmentConfig privateEnvironmentConfig. */ + public privateEnvironmentConfig?: (google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig|null); + + /** EnvironmentConfig webServerNetworkAccessControl. */ + public webServerNetworkAccessControl?: (google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl|null); + + /** EnvironmentConfig databaseConfig. */ + public databaseConfig?: (google.cloud.orchestration.airflow.service.v1.IDatabaseConfig|null); + + /** EnvironmentConfig webServerConfig. */ + public webServerConfig?: (google.cloud.orchestration.airflow.service.v1.IWebServerConfig|null); + + /** EnvironmentConfig encryptionConfig. */ + public encryptionConfig?: (google.cloud.orchestration.airflow.service.v1.IEncryptionConfig|null); + + /** EnvironmentConfig maintenanceWindow. */ + public maintenanceWindow?: (google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow|null); + + /** EnvironmentConfig workloadsConfig. */ + public workloadsConfig?: (google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig|null); + + /** EnvironmentConfig environmentSize. */ + public environmentSize: (google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize|keyof typeof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize); + + /** EnvironmentConfig airflowUri. */ + public airflowUri: string; + + /** EnvironmentConfig airflowByoidUri. */ + public airflowByoidUri: string; + + /** EnvironmentConfig masterAuthorizedNetworksConfig. */ + public masterAuthorizedNetworksConfig?: (google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig|null); + + /** EnvironmentConfig recoveryConfig. */ + public recoveryConfig?: (google.cloud.orchestration.airflow.service.v1.IRecoveryConfig|null); + + /** EnvironmentConfig resilienceMode. */ + public resilienceMode: (google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode|keyof typeof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode); + + /** EnvironmentConfig dataRetentionConfig. */ + public dataRetentionConfig?: (google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig|null); + + /** + * Creates a new EnvironmentConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EnvironmentConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig): google.cloud.orchestration.airflow.service.v1.EnvironmentConfig; + + /** + * Encodes the specified EnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.verify|verify} messages. + * @param message EnvironmentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.verify|verify} messages. + * @param message EnvironmentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnvironmentConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.EnvironmentConfig; + + /** + * Decodes an EnvironmentConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.EnvironmentConfig; + + /** + * Verifies an EnvironmentConfig message. + * @param message Plain 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 EnvironmentConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnvironmentConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.EnvironmentConfig; + + /** + * Creates a plain object from an EnvironmentConfig message. Also converts values to other types if specified. + * @param message EnvironmentConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.EnvironmentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnvironmentConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnvironmentConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnvironmentConfig { + + /** EnvironmentSize enum. */ + enum EnvironmentSize { + ENVIRONMENT_SIZE_UNSPECIFIED = 0, + ENVIRONMENT_SIZE_SMALL = 1, + ENVIRONMENT_SIZE_MEDIUM = 2, + ENVIRONMENT_SIZE_LARGE = 3 + } + + /** ResilienceMode enum. */ + enum ResilienceMode { + RESILIENCE_MODE_UNSPECIFIED = 0, + HIGH_RESILIENCE = 1 + } + } + + /** Properties of a WebServerNetworkAccessControl. */ + interface IWebServerNetworkAccessControl { + + /** WebServerNetworkAccessControl allowedIpRanges */ + allowedIpRanges?: (google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange[]|null); + } + + /** Represents a WebServerNetworkAccessControl. */ + class WebServerNetworkAccessControl implements IWebServerNetworkAccessControl { + + /** + * Constructs a new WebServerNetworkAccessControl. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl); + + /** WebServerNetworkAccessControl allowedIpRanges. */ + public allowedIpRanges: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange[]; + + /** + * Creates a new WebServerNetworkAccessControl instance using the specified properties. + * @param [properties] Properties to set + * @returns WebServerNetworkAccessControl instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl; + + /** + * Encodes the specified WebServerNetworkAccessControl message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.verify|verify} messages. + * @param message WebServerNetworkAccessControl message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebServerNetworkAccessControl message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.verify|verify} messages. + * @param message WebServerNetworkAccessControl message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebServerNetworkAccessControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl; + + /** + * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebServerNetworkAccessControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl; + + /** + * Verifies a WebServerNetworkAccessControl message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebServerNetworkAccessControl message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebServerNetworkAccessControl + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl; + + /** + * Creates a plain object from a WebServerNetworkAccessControl message. Also converts values to other types if specified. + * @param message WebServerNetworkAccessControl + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebServerNetworkAccessControl to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebServerNetworkAccessControl + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WebServerNetworkAccessControl { + + /** Properties of an AllowedIpRange. */ + interface IAllowedIpRange { + + /** AllowedIpRange value */ + value?: (string|null); + + /** AllowedIpRange description */ + description?: (string|null); + } + + /** Represents an AllowedIpRange. */ + class AllowedIpRange implements IAllowedIpRange { + + /** + * Constructs a new AllowedIpRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange); + + /** AllowedIpRange value. */ + public value: string; + + /** AllowedIpRange description. */ + public description: string; + + /** + * Creates a new AllowedIpRange instance using the specified properties. + * @param [properties] Properties to set + * @returns AllowedIpRange instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange; + + /** + * Encodes the specified AllowedIpRange message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. + * @param message AllowedIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllowedIpRange message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. + * @param message AllowedIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllowedIpRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllowedIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange; + + /** + * Decodes an AllowedIpRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllowedIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange; + + /** + * Verifies an AllowedIpRange message. + * @param message Plain 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 AllowedIpRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllowedIpRange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange; + + /** + * Creates a plain object from an AllowedIpRange message. Also converts values to other types if specified. + * @param message AllowedIpRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllowedIpRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllowedIpRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DatabaseConfig. */ + interface IDatabaseConfig { + + /** DatabaseConfig machineType */ + machineType?: (string|null); + + /** DatabaseConfig zone */ + zone?: (string|null); + } + + /** Represents a DatabaseConfig. */ + class DatabaseConfig implements IDatabaseConfig { + + /** + * Constructs a new DatabaseConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IDatabaseConfig); + + /** DatabaseConfig machineType. */ + public machineType: string; + + /** DatabaseConfig zone. */ + public zone: string; + + /** + * Creates a new DatabaseConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IDatabaseConfig): google.cloud.orchestration.airflow.service.v1.DatabaseConfig; + + /** + * Encodes the specified DatabaseConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseConfig.verify|verify} messages. + * @param message DatabaseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IDatabaseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseConfig.verify|verify} messages. + * @param message DatabaseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IDatabaseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.DatabaseConfig; + + /** + * Decodes a DatabaseConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.DatabaseConfig; + + /** + * Verifies a DatabaseConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.DatabaseConfig; + + /** + * Creates a plain object from a DatabaseConfig message. Also converts values to other types if specified. + * @param message DatabaseConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.DatabaseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WebServerConfig. */ + interface IWebServerConfig { + + /** WebServerConfig machineType */ + machineType?: (string|null); + } + + /** Represents a WebServerConfig. */ + class WebServerConfig implements IWebServerConfig { + + /** + * Constructs a new WebServerConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IWebServerConfig); + + /** WebServerConfig machineType. */ + public machineType: string; + + /** + * Creates a new WebServerConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WebServerConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IWebServerConfig): google.cloud.orchestration.airflow.service.v1.WebServerConfig; + + /** + * Encodes the specified WebServerConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerConfig.verify|verify} messages. + * @param message WebServerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IWebServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebServerConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerConfig.verify|verify} messages. + * @param message WebServerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IWebServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebServerConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WebServerConfig; + + /** + * Decodes a WebServerConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WebServerConfig; + + /** + * Verifies a WebServerConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebServerConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebServerConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WebServerConfig; + + /** + * Creates a plain object from a WebServerConfig message. Also converts values to other types if specified. + * @param message WebServerConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.WebServerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebServerConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebServerConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EncryptionConfig. */ + interface IEncryptionConfig { + + /** EncryptionConfig kmsKeyName */ + kmsKeyName?: (string|null); + } + + /** Represents an EncryptionConfig. */ + class EncryptionConfig implements IEncryptionConfig { + + /** + * Constructs a new EncryptionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IEncryptionConfig); + + /** EncryptionConfig kmsKeyName. */ + public kmsKeyName: string; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IEncryptionConfig): google.cloud.orchestration.airflow.service.v1.EncryptionConfig; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.EncryptionConfig; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.EncryptionConfig; + + /** + * Verifies an EncryptionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.EncryptionConfig; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @param message EncryptionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MaintenanceWindow. */ + interface IMaintenanceWindow { + + /** MaintenanceWindow startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** MaintenanceWindow endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** MaintenanceWindow recurrence */ + recurrence?: (string|null); + } + + /** Represents a MaintenanceWindow. */ + class MaintenanceWindow implements IMaintenanceWindow { + + /** + * Constructs a new MaintenanceWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow); + + /** MaintenanceWindow startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** MaintenanceWindow endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** MaintenanceWindow recurrence. */ + public recurrence: string; + + /** + * Creates a new MaintenanceWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns MaintenanceWindow instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow): google.cloud.orchestration.airflow.service.v1.MaintenanceWindow; + + /** + * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.verify|verify} messages. + * @param message MaintenanceWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.verify|verify} messages. + * @param message MaintenanceWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.MaintenanceWindow; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.MaintenanceWindow; + + /** + * Verifies a MaintenanceWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MaintenanceWindow + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.MaintenanceWindow; + + /** + * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. + * @param message MaintenanceWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.MaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MaintenanceWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MaintenanceWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SoftwareConfig. */ + interface ISoftwareConfig { + + /** SoftwareConfig imageVersion */ + imageVersion?: (string|null); + + /** SoftwareConfig airflowConfigOverrides */ + airflowConfigOverrides?: ({ [k: string]: string }|null); + + /** SoftwareConfig pypiPackages */ + pypiPackages?: ({ [k: string]: string }|null); + + /** SoftwareConfig envVariables */ + envVariables?: ({ [k: string]: string }|null); + + /** SoftwareConfig pythonVersion */ + pythonVersion?: (string|null); + + /** SoftwareConfig schedulerCount */ + schedulerCount?: (number|null); + + /** SoftwareConfig cloudDataLineageIntegration */ + cloudDataLineageIntegration?: (google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration|null); + + /** SoftwareConfig webServerPluginsMode */ + webServerPluginsMode?: (google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode|keyof typeof google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode|null); + } + + /** Represents a SoftwareConfig. */ + class SoftwareConfig implements ISoftwareConfig { + + /** + * Constructs a new SoftwareConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ISoftwareConfig); + + /** SoftwareConfig imageVersion. */ + public imageVersion: string; + + /** SoftwareConfig airflowConfigOverrides. */ + public airflowConfigOverrides: { [k: string]: string }; + + /** SoftwareConfig pypiPackages. */ + public pypiPackages: { [k: string]: string }; + + /** SoftwareConfig envVariables. */ + public envVariables: { [k: string]: string }; + + /** SoftwareConfig pythonVersion. */ + public pythonVersion: string; + + /** SoftwareConfig schedulerCount. */ + public schedulerCount: number; + + /** SoftwareConfig cloudDataLineageIntegration. */ + public cloudDataLineageIntegration?: (google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration|null); + + /** SoftwareConfig webServerPluginsMode. */ + public webServerPluginsMode: (google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode|keyof typeof google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode); + + /** + * Creates a new SoftwareConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SoftwareConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ISoftwareConfig): google.cloud.orchestration.airflow.service.v1.SoftwareConfig; + + /** + * Encodes the specified SoftwareConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SoftwareConfig.verify|verify} messages. + * @param message SoftwareConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ISoftwareConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SoftwareConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SoftwareConfig.verify|verify} messages. + * @param message SoftwareConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ISoftwareConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SoftwareConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SoftwareConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.SoftwareConfig; + + /** + * Decodes a SoftwareConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SoftwareConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.SoftwareConfig; + + /** + * Verifies a SoftwareConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SoftwareConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SoftwareConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.SoftwareConfig; + + /** + * Creates a plain object from a SoftwareConfig message. Also converts values to other types if specified. + * @param message SoftwareConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.SoftwareConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SoftwareConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SoftwareConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SoftwareConfig { + + /** WebServerPluginsMode enum. */ + enum WebServerPluginsMode { + WEB_SERVER_PLUGINS_MODE_UNSPECIFIED = 0, + PLUGINS_DISABLED = 1, + PLUGINS_ENABLED = 2 + } + } + + /** Properties of a IPAllocationPolicy. */ + interface IIPAllocationPolicy { + + /** IPAllocationPolicy useIpAliases */ + useIpAliases?: (boolean|null); + + /** IPAllocationPolicy clusterSecondaryRangeName */ + clusterSecondaryRangeName?: (string|null); + + /** IPAllocationPolicy clusterIpv4CidrBlock */ + clusterIpv4CidrBlock?: (string|null); + + /** IPAllocationPolicy servicesSecondaryRangeName */ + servicesSecondaryRangeName?: (string|null); + + /** IPAllocationPolicy servicesIpv4CidrBlock */ + servicesIpv4CidrBlock?: (string|null); + } + + /** Represents a IPAllocationPolicy. */ + class IPAllocationPolicy implements IIPAllocationPolicy { + + /** + * Constructs a new IPAllocationPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy); + + /** IPAllocationPolicy useIpAliases. */ + public useIpAliases: boolean; + + /** IPAllocationPolicy clusterSecondaryRangeName. */ + public clusterSecondaryRangeName?: (string|null); + + /** IPAllocationPolicy clusterIpv4CidrBlock. */ + public clusterIpv4CidrBlock?: (string|null); + + /** IPAllocationPolicy servicesSecondaryRangeName. */ + public servicesSecondaryRangeName?: (string|null); + + /** IPAllocationPolicy servicesIpv4CidrBlock. */ + public servicesIpv4CidrBlock?: (string|null); + + /** IPAllocationPolicy clusterIpAllocation. */ + public clusterIpAllocation?: ("clusterSecondaryRangeName"|"clusterIpv4CidrBlock"); + + /** IPAllocationPolicy servicesIpAllocation. */ + public servicesIpAllocation?: ("servicesSecondaryRangeName"|"servicesIpv4CidrBlock"); + + /** + * Creates a new IPAllocationPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns IPAllocationPolicy instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy): google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy; + + /** + * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.verify|verify} messages. + * @param message IPAllocationPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.verify|verify} messages. + * @param message IPAllocationPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy; + + /** + * Verifies a IPAllocationPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IPAllocationPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy; + + /** + * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. + * @param message IPAllocationPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IPAllocationPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IPAllocationPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeConfig. */ + interface INodeConfig { + + /** NodeConfig location */ + location?: (string|null); + + /** NodeConfig machineType */ + machineType?: (string|null); + + /** NodeConfig network */ + network?: (string|null); + + /** NodeConfig subnetwork */ + subnetwork?: (string|null); + + /** NodeConfig diskSizeGb */ + diskSizeGb?: (number|null); + + /** NodeConfig oauthScopes */ + oauthScopes?: (string[]|null); + + /** NodeConfig serviceAccount */ + serviceAccount?: (string|null); + + /** NodeConfig tags */ + tags?: (string[]|null); + + /** NodeConfig ipAllocationPolicy */ + ipAllocationPolicy?: (google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy|null); + + /** NodeConfig enableIpMasqAgent */ + enableIpMasqAgent?: (boolean|null); + + /** NodeConfig composerNetworkAttachment */ + composerNetworkAttachment?: (string|null); + + /** NodeConfig composerInternalIpv4CidrBlock */ + composerInternalIpv4CidrBlock?: (string|null); + } + + /** Represents a NodeConfig. */ + class NodeConfig implements INodeConfig { + + /** + * Constructs a new NodeConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.INodeConfig); + + /** NodeConfig location. */ + public location: string; + + /** NodeConfig machineType. */ + public machineType: string; + + /** NodeConfig network. */ + public network: string; + + /** NodeConfig subnetwork. */ + public subnetwork: string; + + /** NodeConfig diskSizeGb. */ + public diskSizeGb: number; + + /** NodeConfig oauthScopes. */ + public oauthScopes: string[]; + + /** NodeConfig serviceAccount. */ + public serviceAccount: string; + + /** NodeConfig tags. */ + public tags: string[]; + + /** NodeConfig ipAllocationPolicy. */ + public ipAllocationPolicy?: (google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy|null); + + /** NodeConfig enableIpMasqAgent. */ + public enableIpMasqAgent: boolean; + + /** NodeConfig composerNetworkAttachment. */ + public composerNetworkAttachment: string; + + /** NodeConfig composerInternalIpv4CidrBlock. */ + public composerInternalIpv4CidrBlock: string; + + /** + * Creates a new NodeConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.INodeConfig): google.cloud.orchestration.airflow.service.v1.NodeConfig; + + /** + * Encodes the specified NodeConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NodeConfig.verify|verify} messages. + * @param message NodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NodeConfig.verify|verify} messages. + * @param message NodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.NodeConfig; + + /** + * Decodes a NodeConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.NodeConfig; + + /** + * Verifies a NodeConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.NodeConfig; + + /** + * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. + * @param message NodeConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.NodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrivateClusterConfig. */ + interface IPrivateClusterConfig { + + /** PrivateClusterConfig enablePrivateEndpoint */ + enablePrivateEndpoint?: (boolean|null); + + /** PrivateClusterConfig masterIpv4CidrBlock */ + masterIpv4CidrBlock?: (string|null); + + /** PrivateClusterConfig masterIpv4ReservedRange */ + masterIpv4ReservedRange?: (string|null); + } + + /** Represents a PrivateClusterConfig. */ + class PrivateClusterConfig implements IPrivateClusterConfig { + + /** + * Constructs a new PrivateClusterConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig); + + /** PrivateClusterConfig enablePrivateEndpoint. */ + public enablePrivateEndpoint: boolean; + + /** PrivateClusterConfig masterIpv4CidrBlock. */ + public masterIpv4CidrBlock: string; + + /** PrivateClusterConfig masterIpv4ReservedRange. */ + public masterIpv4ReservedRange: string; + + /** + * Creates a new PrivateClusterConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateClusterConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig): google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig; + + /** + * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.verify|verify} messages. + * @param message PrivateClusterConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.verify|verify} messages. + * @param message PrivateClusterConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig; + + /** + * Verifies a PrivateClusterConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateClusterConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig; + + /** + * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. + * @param message PrivateClusterConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateClusterConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateClusterConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkingConfig. */ + interface INetworkingConfig { + + /** NetworkingConfig connectionType */ + connectionType?: (google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType|keyof typeof google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType|null); + } + + /** Represents a NetworkingConfig. */ + class NetworkingConfig implements INetworkingConfig { + + /** + * Constructs a new NetworkingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.INetworkingConfig); + + /** NetworkingConfig connectionType. */ + public connectionType: (google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType|keyof typeof google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType); + + /** + * Creates a new NetworkingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkingConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.INetworkingConfig): google.cloud.orchestration.airflow.service.v1.NetworkingConfig; + + /** + * Encodes the specified NetworkingConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NetworkingConfig.verify|verify} messages. + * @param message NetworkingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.INetworkingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkingConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NetworkingConfig.verify|verify} messages. + * @param message NetworkingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.INetworkingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.NetworkingConfig; + + /** + * Decodes a NetworkingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.NetworkingConfig; + + /** + * Verifies a NetworkingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.NetworkingConfig; + + /** + * Creates a plain object from a NetworkingConfig message. Also converts values to other types if specified. + * @param message NetworkingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.NetworkingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkingConfig { + + /** ConnectionType enum. */ + enum ConnectionType { + CONNECTION_TYPE_UNSPECIFIED = 0, + VPC_PEERING = 1, + PRIVATE_SERVICE_CONNECT = 2 + } + } + + /** Properties of a PrivateEnvironmentConfig. */ + interface IPrivateEnvironmentConfig { + + /** PrivateEnvironmentConfig enablePrivateEnvironment */ + enablePrivateEnvironment?: (boolean|null); + + /** PrivateEnvironmentConfig enablePrivateBuildsOnly */ + enablePrivateBuildsOnly?: (boolean|null); + + /** PrivateEnvironmentConfig privateClusterConfig */ + privateClusterConfig?: (google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig|null); + + /** PrivateEnvironmentConfig webServerIpv4CidrBlock */ + webServerIpv4CidrBlock?: (string|null); + + /** PrivateEnvironmentConfig cloudSqlIpv4CidrBlock */ + cloudSqlIpv4CidrBlock?: (string|null); + + /** PrivateEnvironmentConfig webServerIpv4ReservedRange */ + webServerIpv4ReservedRange?: (string|null); + + /** PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock */ + cloudComposerNetworkIpv4CidrBlock?: (string|null); + + /** PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange */ + cloudComposerNetworkIpv4ReservedRange?: (string|null); + + /** PrivateEnvironmentConfig enablePrivatelyUsedPublicIps */ + enablePrivatelyUsedPublicIps?: (boolean|null); + + /** PrivateEnvironmentConfig cloudComposerConnectionSubnetwork */ + cloudComposerConnectionSubnetwork?: (string|null); + + /** PrivateEnvironmentConfig networkingConfig */ + networkingConfig?: (google.cloud.orchestration.airflow.service.v1.INetworkingConfig|null); + } + + /** Represents a PrivateEnvironmentConfig. */ + class PrivateEnvironmentConfig implements IPrivateEnvironmentConfig { + + /** + * Constructs a new PrivateEnvironmentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig); + + /** PrivateEnvironmentConfig enablePrivateEnvironment. */ + public enablePrivateEnvironment: boolean; + + /** PrivateEnvironmentConfig enablePrivateBuildsOnly. */ + public enablePrivateBuildsOnly: boolean; + + /** PrivateEnvironmentConfig privateClusterConfig. */ + public privateClusterConfig?: (google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig|null); + + /** PrivateEnvironmentConfig webServerIpv4CidrBlock. */ + public webServerIpv4CidrBlock: string; + + /** PrivateEnvironmentConfig cloudSqlIpv4CidrBlock. */ + public cloudSqlIpv4CidrBlock: string; + + /** PrivateEnvironmentConfig webServerIpv4ReservedRange. */ + public webServerIpv4ReservedRange: string; + + /** PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock. */ + public cloudComposerNetworkIpv4CidrBlock: string; + + /** PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange. */ + public cloudComposerNetworkIpv4ReservedRange: string; + + /** PrivateEnvironmentConfig enablePrivatelyUsedPublicIps. */ + public enablePrivatelyUsedPublicIps: boolean; + + /** PrivateEnvironmentConfig cloudComposerConnectionSubnetwork. */ + public cloudComposerConnectionSubnetwork: string; + + /** PrivateEnvironmentConfig networkingConfig. */ + public networkingConfig?: (google.cloud.orchestration.airflow.service.v1.INetworkingConfig|null); + + /** + * Creates a new PrivateEnvironmentConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateEnvironmentConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig): google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig; + + /** + * Encodes the specified PrivateEnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.verify|verify} messages. + * @param message PrivateEnvironmentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateEnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.verify|verify} messages. + * @param message PrivateEnvironmentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateEnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig; + + /** + * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateEnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig; + + /** + * Verifies a PrivateEnvironmentConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateEnvironmentConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateEnvironmentConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig; + + /** + * Creates a plain object from a PrivateEnvironmentConfig message. Also converts values to other types if specified. + * @param message PrivateEnvironmentConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateEnvironmentConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateEnvironmentConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkloadsConfig. */ + interface IWorkloadsConfig { + + /** WorkloadsConfig scheduler */ + scheduler?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource|null); + + /** WorkloadsConfig webServer */ + webServer?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource|null); + + /** WorkloadsConfig worker */ + worker?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource|null); + + /** WorkloadsConfig triggerer */ + triggerer?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource|null); + + /** WorkloadsConfig dagProcessor */ + dagProcessor?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource|null); + } + + /** Represents a WorkloadsConfig. */ + class WorkloadsConfig implements IWorkloadsConfig { + + /** + * Constructs a new WorkloadsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig); + + /** WorkloadsConfig scheduler. */ + public scheduler?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource|null); + + /** WorkloadsConfig webServer. */ + public webServer?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource|null); + + /** WorkloadsConfig worker. */ + public worker?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource|null); + + /** WorkloadsConfig triggerer. */ + public triggerer?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource|null); + + /** WorkloadsConfig dagProcessor. */ + public dagProcessor?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource|null); + + /** + * Creates a new WorkloadsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkloadsConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig; + + /** + * Encodes the specified WorkloadsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.verify|verify} messages. + * @param message WorkloadsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkloadsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.verify|verify} messages. + * @param message WorkloadsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkloadsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkloadsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig; + + /** + * Decodes a WorkloadsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkloadsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig; + + /** + * Verifies a WorkloadsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkloadsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkloadsConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig; + + /** + * Creates a plain object from a WorkloadsConfig message. Also converts values to other types if specified. + * @param message WorkloadsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkloadsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkloadsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WorkloadsConfig { + + /** Properties of a SchedulerResource. */ + interface ISchedulerResource { + + /** SchedulerResource cpu */ + cpu?: (number|null); + + /** SchedulerResource memoryGb */ + memoryGb?: (number|null); + + /** SchedulerResource storageGb */ + storageGb?: (number|null); + + /** SchedulerResource count */ + count?: (number|null); + } + + /** Represents a SchedulerResource. */ + class SchedulerResource implements ISchedulerResource { + + /** + * Constructs a new SchedulerResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource); + + /** SchedulerResource cpu. */ + public cpu: number; + + /** SchedulerResource memoryGb. */ + public memoryGb: number; + + /** SchedulerResource storageGb. */ + public storageGb: number; + + /** SchedulerResource count. */ + public count: number; + + /** + * Creates a new SchedulerResource instance using the specified properties. + * @param [properties] Properties to set + * @returns SchedulerResource instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource; + + /** + * Encodes the specified SchedulerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.verify|verify} messages. + * @param message SchedulerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchedulerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.verify|verify} messages. + * @param message SchedulerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchedulerResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchedulerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource; + + /** + * Decodes a SchedulerResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchedulerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource; + + /** + * Verifies a SchedulerResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchedulerResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchedulerResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource; + + /** + * Creates a plain object from a SchedulerResource message. Also converts values to other types if specified. + * @param message SchedulerResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchedulerResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchedulerResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WebServerResource. */ + interface IWebServerResource { + + /** WebServerResource cpu */ + cpu?: (number|null); + + /** WebServerResource memoryGb */ + memoryGb?: (number|null); + + /** WebServerResource storageGb */ + storageGb?: (number|null); + } + + /** Represents a WebServerResource. */ + class WebServerResource implements IWebServerResource { + + /** + * Constructs a new WebServerResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource); + + /** WebServerResource cpu. */ + public cpu: number; + + /** WebServerResource memoryGb. */ + public memoryGb: number; + + /** WebServerResource storageGb. */ + public storageGb: number; + + /** + * Creates a new WebServerResource instance using the specified properties. + * @param [properties] Properties to set + * @returns WebServerResource instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource; + + /** + * Encodes the specified WebServerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.verify|verify} messages. + * @param message WebServerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebServerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.verify|verify} messages. + * @param message WebServerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebServerResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebServerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource; + + /** + * Decodes a WebServerResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebServerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource; + + /** + * Verifies a WebServerResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebServerResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebServerResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource; + + /** + * Creates a plain object from a WebServerResource message. Also converts values to other types if specified. + * @param message WebServerResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebServerResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebServerResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkerResource. */ + interface IWorkerResource { + + /** WorkerResource cpu */ + cpu?: (number|null); + + /** WorkerResource memoryGb */ + memoryGb?: (number|null); + + /** WorkerResource storageGb */ + storageGb?: (number|null); + + /** WorkerResource minCount */ + minCount?: (number|null); + + /** WorkerResource maxCount */ + maxCount?: (number|null); + } + + /** Represents a WorkerResource. */ + class WorkerResource implements IWorkerResource { + + /** + * Constructs a new WorkerResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource); + + /** WorkerResource cpu. */ + public cpu: number; + + /** WorkerResource memoryGb. */ + public memoryGb: number; + + /** WorkerResource storageGb. */ + public storageGb: number; + + /** WorkerResource minCount. */ + public minCount: number; + + /** WorkerResource maxCount. */ + public maxCount: number; + + /** + * Creates a new WorkerResource instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkerResource instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource; + + /** + * Encodes the specified WorkerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.verify|verify} messages. + * @param message WorkerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.verify|verify} messages. + * @param message WorkerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkerResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource; + + /** + * Decodes a WorkerResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource; + + /** + * Verifies a WorkerResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkerResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkerResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource; + + /** + * Creates a plain object from a WorkerResource message. Also converts values to other types if specified. + * @param message WorkerResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkerResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkerResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TriggererResource. */ + interface ITriggererResource { + + /** TriggererResource count */ + count?: (number|null); + + /** TriggererResource cpu */ + cpu?: (number|null); + + /** TriggererResource memoryGb */ + memoryGb?: (number|null); + } + + /** Represents a TriggererResource. */ + class TriggererResource implements ITriggererResource { + + /** + * Constructs a new TriggererResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource); + + /** TriggererResource count. */ + public count: number; + + /** TriggererResource cpu. */ + public cpu: number; + + /** TriggererResource memoryGb. */ + public memoryGb: number; + + /** + * Creates a new TriggererResource instance using the specified properties. + * @param [properties] Properties to set + * @returns TriggererResource instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource; + + /** + * Encodes the specified TriggererResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.verify|verify} messages. + * @param message TriggererResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TriggererResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.verify|verify} messages. + * @param message TriggererResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TriggererResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TriggererResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource; + + /** + * Decodes a TriggererResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TriggererResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource; + + /** + * Verifies a TriggererResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TriggererResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TriggererResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource; + + /** + * Creates a plain object from a TriggererResource message. Also converts values to other types if specified. + * @param message TriggererResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TriggererResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TriggererResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DagProcessorResource. */ + interface IDagProcessorResource { + + /** DagProcessorResource cpu */ + cpu?: (number|null); + + /** DagProcessorResource memoryGb */ + memoryGb?: (number|null); + + /** DagProcessorResource storageGb */ + storageGb?: (number|null); + + /** DagProcessorResource count */ + count?: (number|null); + } + + /** Represents a DagProcessorResource. */ + class DagProcessorResource implements IDagProcessorResource { + + /** + * Constructs a new DagProcessorResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource); + + /** DagProcessorResource cpu. */ + public cpu: number; + + /** DagProcessorResource memoryGb. */ + public memoryGb: number; + + /** DagProcessorResource storageGb. */ + public storageGb: number; + + /** DagProcessorResource count. */ + public count: number; + + /** + * Creates a new DagProcessorResource instance using the specified properties. + * @param [properties] Properties to set + * @returns DagProcessorResource instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource; + + /** + * Encodes the specified DagProcessorResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.verify|verify} messages. + * @param message DagProcessorResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DagProcessorResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.verify|verify} messages. + * @param message DagProcessorResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DagProcessorResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DagProcessorResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource; + + /** + * Decodes a DagProcessorResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DagProcessorResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource; + + /** + * Verifies a DagProcessorResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DagProcessorResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DagProcessorResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource; + + /** + * Creates a plain object from a DagProcessorResource message. Also converts values to other types if specified. + * @param message DagProcessorResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DagProcessorResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DagProcessorResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a RecoveryConfig. */ + interface IRecoveryConfig { + + /** RecoveryConfig scheduledSnapshotsConfig */ + scheduledSnapshotsConfig?: (google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig|null); + } + + /** Represents a RecoveryConfig. */ + class RecoveryConfig implements IRecoveryConfig { + + /** + * Constructs a new RecoveryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IRecoveryConfig); + + /** RecoveryConfig scheduledSnapshotsConfig. */ + public scheduledSnapshotsConfig?: (google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig|null); + + /** + * Creates a new RecoveryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns RecoveryConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IRecoveryConfig): google.cloud.orchestration.airflow.service.v1.RecoveryConfig; + + /** + * Encodes the specified RecoveryConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.RecoveryConfig.verify|verify} messages. + * @param message RecoveryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IRecoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecoveryConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.RecoveryConfig.verify|verify} messages. + * @param message RecoveryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IRecoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecoveryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.RecoveryConfig; + + /** + * Decodes a RecoveryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.RecoveryConfig; + + /** + * Verifies a RecoveryConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecoveryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecoveryConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.RecoveryConfig; + + /** + * Creates a plain object from a RecoveryConfig message. Also converts values to other types if specified. + * @param message RecoveryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.RecoveryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecoveryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecoveryConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ScheduledSnapshotsConfig. */ + interface IScheduledSnapshotsConfig { + + /** ScheduledSnapshotsConfig enabled */ + enabled?: (boolean|null); + + /** ScheduledSnapshotsConfig snapshotLocation */ + snapshotLocation?: (string|null); + + /** ScheduledSnapshotsConfig snapshotCreationSchedule */ + snapshotCreationSchedule?: (string|null); + + /** ScheduledSnapshotsConfig timeZone */ + timeZone?: (string|null); + } + + /** Represents a ScheduledSnapshotsConfig. */ + class ScheduledSnapshotsConfig implements IScheduledSnapshotsConfig { + + /** + * Constructs a new ScheduledSnapshotsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig); + + /** ScheduledSnapshotsConfig enabled. */ + public enabled: boolean; + + /** ScheduledSnapshotsConfig snapshotLocation. */ + public snapshotLocation: string; + + /** ScheduledSnapshotsConfig snapshotCreationSchedule. */ + public snapshotCreationSchedule: string; + + /** ScheduledSnapshotsConfig timeZone. */ + public timeZone: string; + + /** + * Creates a new ScheduledSnapshotsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ScheduledSnapshotsConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig): google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig; + + /** + * Encodes the specified ScheduledSnapshotsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.verify|verify} messages. + * @param message ScheduledSnapshotsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScheduledSnapshotsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.verify|verify} messages. + * @param message ScheduledSnapshotsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScheduledSnapshotsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScheduledSnapshotsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig; + + /** + * Decodes a ScheduledSnapshotsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScheduledSnapshotsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig; + + /** + * Verifies a ScheduledSnapshotsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ScheduledSnapshotsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScheduledSnapshotsConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig; + + /** + * Creates a plain object from a ScheduledSnapshotsConfig message. Also converts values to other types if specified. + * @param message ScheduledSnapshotsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScheduledSnapshotsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScheduledSnapshotsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MasterAuthorizedNetworksConfig. */ + interface IMasterAuthorizedNetworksConfig { + + /** MasterAuthorizedNetworksConfig enabled */ + enabled?: (boolean|null); + + /** MasterAuthorizedNetworksConfig cidrBlocks */ + cidrBlocks?: (google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock[]|null); + } + + /** Represents a MasterAuthorizedNetworksConfig. */ + class MasterAuthorizedNetworksConfig implements IMasterAuthorizedNetworksConfig { + + /** + * Constructs a new MasterAuthorizedNetworksConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig); + + /** MasterAuthorizedNetworksConfig enabled. */ + public enabled: boolean; + + /** MasterAuthorizedNetworksConfig cidrBlocks. */ + public cidrBlocks: google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock[]; + + /** + * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MasterAuthorizedNetworksConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig): google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig; + + /** + * Encodes the specified MasterAuthorizedNetworksConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.verify|verify} messages. + * @param message MasterAuthorizedNetworksConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MasterAuthorizedNetworksConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.verify|verify} messages. + * @param message MasterAuthorizedNetworksConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MasterAuthorizedNetworksConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig; + + /** + * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MasterAuthorizedNetworksConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig; + + /** + * Verifies a MasterAuthorizedNetworksConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MasterAuthorizedNetworksConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MasterAuthorizedNetworksConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig; + + /** + * Creates a plain object from a MasterAuthorizedNetworksConfig message. Also converts values to other types if specified. + * @param message MasterAuthorizedNetworksConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MasterAuthorizedNetworksConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MasterAuthorizedNetworksConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MasterAuthorizedNetworksConfig { + + /** Properties of a CidrBlock. */ + interface ICidrBlock { + + /** CidrBlock displayName */ + displayName?: (string|null); + + /** CidrBlock cidrBlock */ + cidrBlock?: (string|null); + } + + /** Represents a CidrBlock. */ + class CidrBlock implements ICidrBlock { + + /** + * Constructs a new CidrBlock. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock); + + /** CidrBlock displayName. */ + public displayName: string; + + /** CidrBlock cidrBlock. */ + public cidrBlock: string; + + /** + * Creates a new CidrBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns CidrBlock instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock): google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock; + + /** + * Encodes the specified CidrBlock message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. + * @param message CidrBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CidrBlock message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. + * @param message CidrBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CidrBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CidrBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock; + + /** + * Decodes a CidrBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CidrBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock; + + /** + * Verifies a CidrBlock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CidrBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CidrBlock + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock; + + /** + * Creates a plain object from a CidrBlock message. Also converts values to other types if specified. + * @param message CidrBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CidrBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CidrBlock + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CloudDataLineageIntegration. */ + interface ICloudDataLineageIntegration { + + /** CloudDataLineageIntegration enabled */ + enabled?: (boolean|null); + } + + /** Represents a CloudDataLineageIntegration. */ + class CloudDataLineageIntegration implements ICloudDataLineageIntegration { + + /** + * Constructs a new CloudDataLineageIntegration. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration); + + /** CloudDataLineageIntegration enabled. */ + public enabled: boolean; + + /** + * Creates a new CloudDataLineageIntegration instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudDataLineageIntegration instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration): google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration; + + /** + * Encodes the specified CloudDataLineageIntegration message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.verify|verify} messages. + * @param message CloudDataLineageIntegration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudDataLineageIntegration message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.verify|verify} messages. + * @param message CloudDataLineageIntegration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudDataLineageIntegration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudDataLineageIntegration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration; + + /** + * Decodes a CloudDataLineageIntegration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudDataLineageIntegration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration; + + /** + * Verifies a CloudDataLineageIntegration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudDataLineageIntegration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudDataLineageIntegration + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration; + + /** + * Creates a plain object from a CloudDataLineageIntegration message. Also converts values to other types if specified. + * @param message CloudDataLineageIntegration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudDataLineageIntegration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudDataLineageIntegration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Environment. */ + interface IEnvironment { + + /** Environment name */ + name?: (string|null); + + /** Environment config */ + config?: (google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig|null); + + /** Environment uuid */ + uuid?: (string|null); + + /** Environment state */ + state?: (google.cloud.orchestration.airflow.service.v1.Environment.State|keyof typeof google.cloud.orchestration.airflow.service.v1.Environment.State|null); + + /** Environment createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Environment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Environment labels */ + labels?: ({ [k: string]: string }|null); + + /** Environment satisfiesPzs */ + satisfiesPzs?: (boolean|null); + + /** Environment satisfiesPzi */ + satisfiesPzi?: (boolean|null); + + /** Environment storageConfig */ + storageConfig?: (google.cloud.orchestration.airflow.service.v1.IStorageConfig|null); + } + + /** Represents an Environment. */ + class Environment implements IEnvironment { + + /** + * Constructs a new Environment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IEnvironment); + + /** Environment name. */ + public name: string; + + /** Environment config. */ + public config?: (google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig|null); + + /** Environment uuid. */ + public uuid: string; + + /** Environment state. */ + public state: (google.cloud.orchestration.airflow.service.v1.Environment.State|keyof typeof google.cloud.orchestration.airflow.service.v1.Environment.State); + + /** Environment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Environment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Environment labels. */ + public labels: { [k: string]: string }; + + /** Environment satisfiesPzs. */ + public satisfiesPzs: boolean; + + /** Environment satisfiesPzi. */ + public satisfiesPzi: boolean; + + /** Environment storageConfig. */ + public storageConfig?: (google.cloud.orchestration.airflow.service.v1.IStorageConfig|null); + + /** + * Creates a new Environment instance using the specified properties. + * @param [properties] Properties to set + * @returns Environment instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IEnvironment): google.cloud.orchestration.airflow.service.v1.Environment; + + /** + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.Environment.verify|verify} messages. + * @param message Environment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.Environment.verify|verify} messages. + * @param message Environment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Environment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.Environment; + + /** + * Decodes an Environment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.Environment; + + /** + * Verifies an Environment message. + * @param message Plain 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 Environment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Environment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.Environment; + + /** + * Creates a plain object from an Environment message. Also converts values to other types if specified. + * @param message Environment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.Environment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Environment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Environment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Environment { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + RUNNING = 2, + UPDATING = 3, + DELETING = 4, + ERROR = 5 + } + } + + /** Properties of a CheckUpgradeRequest. */ + interface ICheckUpgradeRequest { + + /** CheckUpgradeRequest environment */ + environment?: (string|null); + + /** CheckUpgradeRequest imageVersion */ + imageVersion?: (string|null); + } + + /** Represents a CheckUpgradeRequest. */ + class CheckUpgradeRequest implements ICheckUpgradeRequest { + + /** + * Constructs a new CheckUpgradeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest); + + /** CheckUpgradeRequest environment. */ + public environment: string; + + /** CheckUpgradeRequest imageVersion. */ + public imageVersion: string; + + /** + * Creates a new CheckUpgradeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckUpgradeRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest): google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest; + + /** + * Encodes the specified CheckUpgradeRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest.verify|verify} messages. + * @param message CheckUpgradeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckUpgradeRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest.verify|verify} messages. + * @param message CheckUpgradeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckUpgradeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest; + + /** + * Decodes a CheckUpgradeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest; + + /** + * Verifies a CheckUpgradeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckUpgradeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckUpgradeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest; + + /** + * Creates a plain object from a CheckUpgradeRequest message. Also converts values to other types if specified. + * @param message CheckUpgradeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckUpgradeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckUpgradeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckUpgradeResponse. */ + interface ICheckUpgradeResponse { + + /** CheckUpgradeResponse buildLogUri */ + buildLogUri?: (string|null); + + /** CheckUpgradeResponse containsPypiModulesConflict */ + containsPypiModulesConflict?: (google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult|keyof typeof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult|null); + + /** CheckUpgradeResponse pypiConflictBuildLogExtract */ + pypiConflictBuildLogExtract?: (string|null); + + /** CheckUpgradeResponse imageVersion */ + imageVersion?: (string|null); + + /** CheckUpgradeResponse pypiDependencies */ + pypiDependencies?: ({ [k: string]: string }|null); + } + + /** Represents a CheckUpgradeResponse. */ + class CheckUpgradeResponse implements ICheckUpgradeResponse { + + /** + * Constructs a new CheckUpgradeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse); + + /** CheckUpgradeResponse buildLogUri. */ + public buildLogUri: string; + + /** CheckUpgradeResponse containsPypiModulesConflict. */ + public containsPypiModulesConflict: (google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult|keyof typeof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult); + + /** CheckUpgradeResponse pypiConflictBuildLogExtract. */ + public pypiConflictBuildLogExtract: string; + + /** CheckUpgradeResponse imageVersion. */ + public imageVersion: string; + + /** CheckUpgradeResponse pypiDependencies. */ + public pypiDependencies: { [k: string]: string }; + + /** + * Creates a new CheckUpgradeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckUpgradeResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse): google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse; + + /** + * Encodes the specified CheckUpgradeResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.verify|verify} messages. + * @param message CheckUpgradeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckUpgradeResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.verify|verify} messages. + * @param message CheckUpgradeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckUpgradeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse; + + /** + * Decodes a CheckUpgradeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse; + + /** + * Verifies a CheckUpgradeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckUpgradeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckUpgradeResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse; + + /** + * Creates a plain object from a CheckUpgradeResponse message. Also converts values to other types if specified. + * @param message CheckUpgradeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckUpgradeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckUpgradeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CheckUpgradeResponse { + + /** ConflictResult enum. */ + enum ConflictResult { + CONFLICT_RESULT_UNSPECIFIED = 0, + CONFLICT = 1, + NO_CONFLICT = 2 + } + } + + /** Properties of a DataRetentionConfig. */ + interface IDataRetentionConfig { + + /** DataRetentionConfig airflowMetadataRetentionConfig */ + airflowMetadataRetentionConfig?: (google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig|null); + + /** DataRetentionConfig taskLogsRetentionConfig */ + taskLogsRetentionConfig?: (google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig|null); + } + + /** Represents a DataRetentionConfig. */ + class DataRetentionConfig implements IDataRetentionConfig { + + /** + * Constructs a new DataRetentionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig); + + /** DataRetentionConfig airflowMetadataRetentionConfig. */ + public airflowMetadataRetentionConfig?: (google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig|null); + + /** DataRetentionConfig taskLogsRetentionConfig. */ + public taskLogsRetentionConfig?: (google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig|null); + + /** + * Creates a new DataRetentionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DataRetentionConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig): google.cloud.orchestration.airflow.service.v1.DataRetentionConfig; + + /** + * Encodes the specified DataRetentionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.verify|verify} messages. + * @param message DataRetentionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataRetentionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.verify|verify} messages. + * @param message DataRetentionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataRetentionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataRetentionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.DataRetentionConfig; + + /** + * Decodes a DataRetentionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataRetentionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.DataRetentionConfig; + + /** + * Verifies a DataRetentionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataRetentionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataRetentionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.DataRetentionConfig; + + /** + * Creates a plain object from a DataRetentionConfig message. Also converts values to other types if specified. + * @param message DataRetentionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.DataRetentionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataRetentionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataRetentionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TaskLogsRetentionConfig. */ + interface ITaskLogsRetentionConfig { + + /** TaskLogsRetentionConfig storageMode */ + storageMode?: (google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode|keyof typeof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode|null); + } + + /** Represents a TaskLogsRetentionConfig. */ + class TaskLogsRetentionConfig implements ITaskLogsRetentionConfig { + + /** + * Constructs a new TaskLogsRetentionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig); + + /** TaskLogsRetentionConfig storageMode. */ + public storageMode: (google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode|keyof typeof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode); + + /** + * Creates a new TaskLogsRetentionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TaskLogsRetentionConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig): google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig; + + /** + * Encodes the specified TaskLogsRetentionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.verify|verify} messages. + * @param message TaskLogsRetentionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TaskLogsRetentionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.verify|verify} messages. + * @param message TaskLogsRetentionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TaskLogsRetentionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TaskLogsRetentionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig; + + /** + * Decodes a TaskLogsRetentionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TaskLogsRetentionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig; + + /** + * Verifies a TaskLogsRetentionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TaskLogsRetentionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TaskLogsRetentionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig; + + /** + * Creates a plain object from a TaskLogsRetentionConfig message. Also converts values to other types if specified. + * @param message TaskLogsRetentionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TaskLogsRetentionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TaskLogsRetentionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TaskLogsRetentionConfig { + + /** TaskLogsStorageMode enum. */ + enum TaskLogsStorageMode { + TASK_LOGS_STORAGE_MODE_UNSPECIFIED = 0, + CLOUD_LOGGING_AND_CLOUD_STORAGE = 1, + CLOUD_LOGGING_ONLY = 2 + } + } + + /** Properties of an AirflowMetadataRetentionPolicyConfig. */ + interface IAirflowMetadataRetentionPolicyConfig { + + /** AirflowMetadataRetentionPolicyConfig retentionMode */ + retentionMode?: (google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode|keyof typeof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode|null); + + /** AirflowMetadataRetentionPolicyConfig retentionDays */ + retentionDays?: (number|null); + } + + /** Represents an AirflowMetadataRetentionPolicyConfig. */ + class AirflowMetadataRetentionPolicyConfig implements IAirflowMetadataRetentionPolicyConfig { + + /** + * Constructs a new AirflowMetadataRetentionPolicyConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig); + + /** AirflowMetadataRetentionPolicyConfig retentionMode. */ + public retentionMode: (google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode|keyof typeof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode); + + /** AirflowMetadataRetentionPolicyConfig retentionDays. */ + public retentionDays: number; + + /** + * Creates a new AirflowMetadataRetentionPolicyConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AirflowMetadataRetentionPolicyConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig): google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig; + + /** + * Encodes the specified AirflowMetadataRetentionPolicyConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.verify|verify} messages. + * @param message AirflowMetadataRetentionPolicyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AirflowMetadataRetentionPolicyConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.verify|verify} messages. + * @param message AirflowMetadataRetentionPolicyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AirflowMetadataRetentionPolicyConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AirflowMetadataRetentionPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig; + + /** + * Decodes an AirflowMetadataRetentionPolicyConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AirflowMetadataRetentionPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig; + + /** + * Verifies an AirflowMetadataRetentionPolicyConfig message. + * @param message Plain 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 AirflowMetadataRetentionPolicyConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AirflowMetadataRetentionPolicyConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig; + + /** + * Creates a plain object from an AirflowMetadataRetentionPolicyConfig message. Also converts values to other types if specified. + * @param message AirflowMetadataRetentionPolicyConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AirflowMetadataRetentionPolicyConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AirflowMetadataRetentionPolicyConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AirflowMetadataRetentionPolicyConfig { + + /** RetentionMode enum. */ + enum RetentionMode { + RETENTION_MODE_UNSPECIFIED = 0, + RETENTION_MODE_ENABLED = 1, + RETENTION_MODE_DISABLED = 2 + } + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata state */ + state?: (google.cloud.orchestration.airflow.service.v1.OperationMetadata.State|keyof typeof google.cloud.orchestration.airflow.service.v1.OperationMetadata.State|null); + + /** OperationMetadata operationType */ + operationType?: (google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type|keyof typeof google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type|null); + + /** OperationMetadata resource */ + resource?: (string|null); + + /** OperationMetadata resourceUuid */ + resourceUuid?: (string|null); + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IOperationMetadata); + + /** OperationMetadata state. */ + public state: (google.cloud.orchestration.airflow.service.v1.OperationMetadata.State|keyof typeof google.cloud.orchestration.airflow.service.v1.OperationMetadata.State); + + /** OperationMetadata operationType. */ + public operationType: (google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type|keyof typeof google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type); + + /** OperationMetadata resource. */ + public resource: string; + + /** OperationMetadata resourceUuid. */ + public resourceUuid: string; + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IOperationMetadata): google.cloud.orchestration.airflow.service.v1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.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.orchestration.airflow.service.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.orchestration.airflow.service.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.orchestration.airflow.service.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.orchestration.airflow.service.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; + } + + namespace OperationMetadata { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PENDING = 1, + RUNNING = 2, + SUCCEEDED = 3, + SUCCESSFUL = 3, + FAILED = 4 + } + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + CREATE = 1, + DELETE = 2, + UPDATE = 3, + CHECK = 4, + SAVE_SNAPSHOT = 5, + LOAD_SNAPSHOT = 6, + DATABASE_FAILOVER = 7 + } + } + + /** Represents an ImageVersions */ + class ImageVersions extends $protobuf.rpc.Service { + + /** + * Constructs a new ImageVersions 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 ImageVersions 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): ImageVersions; + + /** + * Calls ListImageVersions. + * @param request ListImageVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListImageVersionsResponse + */ + public listImageVersions(request: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, callback: google.cloud.orchestration.airflow.service.v1.ImageVersions.ListImageVersionsCallback): void; + + /** + * Calls ListImageVersions. + * @param request ListImageVersionsRequest message or plain object + * @returns Promise + */ + public listImageVersions(request: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest): Promise; + } + + namespace ImageVersions { + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.ImageVersions|listImageVersions}. + * @param error Error, if any + * @param [response] ListImageVersionsResponse + */ + type ListImageVersionsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse) => void; + } + + /** Properties of a ListImageVersionsRequest. */ + interface IListImageVersionsRequest { + + /** ListImageVersionsRequest parent */ + parent?: (string|null); + + /** ListImageVersionsRequest pageSize */ + pageSize?: (number|null); + + /** ListImageVersionsRequest pageToken */ + pageToken?: (string|null); + + /** ListImageVersionsRequest includePastReleases */ + includePastReleases?: (boolean|null); + } + + /** Represents a ListImageVersionsRequest. */ + class ListImageVersionsRequest implements IListImageVersionsRequest { + + /** + * Constructs a new ListImageVersionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest); + + /** ListImageVersionsRequest parent. */ + public parent: string; + + /** ListImageVersionsRequest pageSize. */ + public pageSize: number; + + /** ListImageVersionsRequest pageToken. */ + public pageToken: string; + + /** ListImageVersionsRequest includePastReleases. */ + public includePastReleases: boolean; + + /** + * Creates a new ListImageVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListImageVersionsRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest): google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest; + + /** + * Encodes the specified ListImageVersionsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.verify|verify} messages. + * @param message ListImageVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListImageVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.verify|verify} messages. + * @param message ListImageVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListImageVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListImageVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest; + + /** + * Decodes a ListImageVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListImageVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest; + + /** + * Verifies a ListImageVersionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListImageVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListImageVersionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest; + + /** + * Creates a plain object from a ListImageVersionsRequest message. Also converts values to other types if specified. + * @param message ListImageVersionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListImageVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListImageVersionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListImageVersionsResponse. */ + interface IListImageVersionsResponse { + + /** ListImageVersionsResponse imageVersions */ + imageVersions?: (google.cloud.orchestration.airflow.service.v1.IImageVersion[]|null); + + /** ListImageVersionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListImageVersionsResponse. */ + class ListImageVersionsResponse implements IListImageVersionsResponse { + + /** + * Constructs a new ListImageVersionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse); + + /** ListImageVersionsResponse imageVersions. */ + public imageVersions: google.cloud.orchestration.airflow.service.v1.IImageVersion[]; + + /** ListImageVersionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListImageVersionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListImageVersionsResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse): google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse; + + /** + * Encodes the specified ListImageVersionsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.verify|verify} messages. + * @param message ListImageVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListImageVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.verify|verify} messages. + * @param message ListImageVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListImageVersionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListImageVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse; + + /** + * Decodes a ListImageVersionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListImageVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse; + + /** + * Verifies a ListImageVersionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListImageVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListImageVersionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse; + + /** + * Creates a plain object from a ListImageVersionsResponse message. Also converts values to other types if specified. + * @param message ListImageVersionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListImageVersionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListImageVersionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImageVersion. */ + interface IImageVersion { + + /** ImageVersion imageVersionId */ + imageVersionId?: (string|null); + + /** ImageVersion isDefault */ + isDefault?: (boolean|null); + + /** ImageVersion supportedPythonVersions */ + supportedPythonVersions?: (string[]|null); + + /** ImageVersion releaseDate */ + releaseDate?: (google.type.IDate|null); + + /** ImageVersion creationDisabled */ + creationDisabled?: (boolean|null); + + /** ImageVersion upgradeDisabled */ + upgradeDisabled?: (boolean|null); + } + + /** Represents an ImageVersion. */ + class ImageVersion implements IImageVersion { + + /** + * Constructs a new ImageVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1.IImageVersion); + + /** ImageVersion imageVersionId. */ + public imageVersionId: string; + + /** ImageVersion isDefault. */ + public isDefault: boolean; + + /** ImageVersion supportedPythonVersions. */ + public supportedPythonVersions: string[]; + + /** ImageVersion releaseDate. */ + public releaseDate?: (google.type.IDate|null); + + /** ImageVersion creationDisabled. */ + public creationDisabled: boolean; + + /** ImageVersion upgradeDisabled. */ + public upgradeDisabled: boolean; + + /** + * Creates a new ImageVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageVersion instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1.IImageVersion): google.cloud.orchestration.airflow.service.v1.ImageVersion; + + /** + * Encodes the specified ImageVersion message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ImageVersion.verify|verify} messages. + * @param message ImageVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1.IImageVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageVersion message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ImageVersion.verify|verify} messages. + * @param message ImageVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IImageVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ImageVersion; + + /** + * Decodes an ImageVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ImageVersion; + + /** + * Verifies an ImageVersion message. + * @param message Plain 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 ImageVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageVersion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ImageVersion; + + /** + * Creates a plain object from an ImageVersion message. Also converts values to other types if specified. + * @param message ImageVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1.ImageVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** 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 + } + + /** 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; + } + } + + /** 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); + } + + /** 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|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|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 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 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 an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|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|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; + } + + /** 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; + } + } + + /** 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; + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of a Date. */ + interface IDate { + + /** Date year */ + year?: (number|null); + + /** Date month */ + month?: (number|null); + + /** Date day */ + day?: (number|null); + } + + /** Represents a Date. */ + class Date implements IDate { + + /** + * Constructs a new Date. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IDate); + + /** Date year. */ + public year: number; + + /** Date month. */ + public month: number; + + /** Date day. */ + public day: number; + + /** + * Creates a new Date instance using the specified properties. + * @param [properties] Properties to set + * @returns Date instance + */ + public static create(properties?: google.type.IDate): google.type.Date; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Date message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; + + /** + * Verifies a Date message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Date + */ + public static fromObject(object: { [k: string]: any }): google.type.Date; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Date to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Date + * @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-orchestration-airflow-service/v1/protos/protos.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.js new file mode 100644 index 00000000000..510419b44a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.js @@ -0,0 +1,42770 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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_orchestration_airflow_protos || ($protobuf.roots._google_cloud_orchestration_airflow_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.orchestration = (function() { + + /** + * Namespace orchestration. + * @memberof google.cloud + * @namespace + */ + var orchestration = {}; + + orchestration.airflow = (function() { + + /** + * Namespace airflow. + * @memberof google.cloud.orchestration + * @namespace + */ + var airflow = {}; + + airflow.service = (function() { + + /** + * Namespace service. + * @memberof google.cloud.orchestration.airflow + * @namespace + */ + var service = {}; + + service.v1 = (function() { + + /** + * Namespace v1. + * @memberof google.cloud.orchestration.airflow.service + * @namespace + */ + var v1 = {}; + + v1.Environments = (function() { + + /** + * Constructs a new Environments service. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an Environments + * @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 Environments(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Environments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Environments; + + /** + * Creates new Environments service using the specified rpc implementation. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @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 {Environments} RPC service. Useful where requests and/or responses are streamed. + */ + Environments.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|createEnvironment}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef CreateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.createEnvironment = function createEnvironment(request, callback) { + return this.rpcCall(createEnvironment, $root.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateEnvironment" }); + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|getEnvironment}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef GetEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.Environment} [response] Environment + */ + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.getEnvironment = function getEnvironment(request, callback) { + return this.rpcCall(getEnvironment, $root.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest, $root.google.cloud.orchestration.airflow.service.v1.Environment, request, callback); + }, "name", { value: "GetEnvironment" }); + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listEnvironments}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef ListEnvironmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse + */ + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.listEnvironments = function listEnvironments(request, callback) { + return this.rpcCall(listEnvironments, $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest, $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse, request, callback); + }, "name", { value: "ListEnvironments" }); + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|updateEnvironment}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef UpdateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.updateEnvironment = function updateEnvironment(request, callback) { + return this.rpcCall(updateEnvironment, $root.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateEnvironment" }); + + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|deleteEnvironment}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef DeleteEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { + return this.rpcCall(deleteEnvironment, $root.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteEnvironment" }); + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|executeAirflowCommand}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef ExecuteAirflowCommandCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse} [response] ExecuteAirflowCommandResponse + */ + + /** + * Calls ExecuteAirflowCommand. + * @function executeAirflowCommand + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest} request ExecuteAirflowCommandRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.ExecuteAirflowCommandCallback} callback Node-style callback called with the error, if any, and ExecuteAirflowCommandResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.executeAirflowCommand = function executeAirflowCommand(request, callback) { + return this.rpcCall(executeAirflowCommand, $root.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest, $root.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse, request, callback); + }, "name", { value: "ExecuteAirflowCommand" }); + + /** + * Calls ExecuteAirflowCommand. + * @function executeAirflowCommand + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest} request ExecuteAirflowCommandRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|stopAirflowCommand}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef StopAirflowCommandCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse} [response] StopAirflowCommandResponse + */ + + /** + * Calls StopAirflowCommand. + * @function stopAirflowCommand + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest} request StopAirflowCommandRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.StopAirflowCommandCallback} callback Node-style callback called with the error, if any, and StopAirflowCommandResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.stopAirflowCommand = function stopAirflowCommand(request, callback) { + return this.rpcCall(stopAirflowCommand, $root.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest, $root.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse, request, callback); + }, "name", { value: "StopAirflowCommand" }); + + /** + * Calls StopAirflowCommand. + * @function stopAirflowCommand + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest} request StopAirflowCommandRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|pollAirflowCommand}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef PollAirflowCommandCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse} [response] PollAirflowCommandResponse + */ + + /** + * Calls PollAirflowCommand. + * @function pollAirflowCommand + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest} request PollAirflowCommandRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.PollAirflowCommandCallback} callback Node-style callback called with the error, if any, and PollAirflowCommandResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.pollAirflowCommand = function pollAirflowCommand(request, callback) { + return this.rpcCall(pollAirflowCommand, $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest, $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse, request, callback); + }, "name", { value: "PollAirflowCommand" }); + + /** + * Calls PollAirflowCommand. + * @function pollAirflowCommand + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest} request PollAirflowCommandRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listWorkloads}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef ListWorkloadsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse} [response] ListWorkloadsResponse + */ + + /** + * Calls ListWorkloads. + * @function listWorkloads + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest} request ListWorkloadsRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.ListWorkloadsCallback} callback Node-style callback called with the error, if any, and ListWorkloadsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.listWorkloads = function listWorkloads(request, callback) { + return this.rpcCall(listWorkloads, $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest, $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse, request, callback); + }, "name", { value: "ListWorkloads" }); + + /** + * Calls ListWorkloads. + * @function listWorkloads + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest} request ListWorkloadsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|checkUpgrade}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef CheckUpgradeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CheckUpgrade. + * @function checkUpgrade + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest} request CheckUpgradeRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.CheckUpgradeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.checkUpgrade = function checkUpgrade(request, callback) { + return this.rpcCall(checkUpgrade, $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CheckUpgrade" }); + + /** + * Calls CheckUpgrade. + * @function checkUpgrade + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest} request CheckUpgradeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|createUserWorkloadsSecret}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef CreateUserWorkloadsSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} [response] UserWorkloadsSecret + */ + + /** + * Calls CreateUserWorkloadsSecret. + * @function createUserWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest} request CreateUserWorkloadsSecretRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.CreateUserWorkloadsSecretCallback} callback Node-style callback called with the error, if any, and UserWorkloadsSecret + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.createUserWorkloadsSecret = function createUserWorkloadsSecret(request, callback) { + return this.rpcCall(createUserWorkloadsSecret, $root.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest, $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret, request, callback); + }, "name", { value: "CreateUserWorkloadsSecret" }); + + /** + * Calls CreateUserWorkloadsSecret. + * @function createUserWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest} request CreateUserWorkloadsSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|getUserWorkloadsSecret}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef GetUserWorkloadsSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} [response] UserWorkloadsSecret + */ + + /** + * Calls GetUserWorkloadsSecret. + * @function getUserWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest} request GetUserWorkloadsSecretRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.GetUserWorkloadsSecretCallback} callback Node-style callback called with the error, if any, and UserWorkloadsSecret + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.getUserWorkloadsSecret = function getUserWorkloadsSecret(request, callback) { + return this.rpcCall(getUserWorkloadsSecret, $root.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest, $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret, request, callback); + }, "name", { value: "GetUserWorkloadsSecret" }); + + /** + * Calls GetUserWorkloadsSecret. + * @function getUserWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest} request GetUserWorkloadsSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listUserWorkloadsSecrets}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef ListUserWorkloadsSecretsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse} [response] ListUserWorkloadsSecretsResponse + */ + + /** + * Calls ListUserWorkloadsSecrets. + * @function listUserWorkloadsSecrets + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest} request ListUserWorkloadsSecretsRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.ListUserWorkloadsSecretsCallback} callback Node-style callback called with the error, if any, and ListUserWorkloadsSecretsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.listUserWorkloadsSecrets = function listUserWorkloadsSecrets(request, callback) { + return this.rpcCall(listUserWorkloadsSecrets, $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest, $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse, request, callback); + }, "name", { value: "ListUserWorkloadsSecrets" }); + + /** + * Calls ListUserWorkloadsSecrets. + * @function listUserWorkloadsSecrets + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest} request ListUserWorkloadsSecretsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|updateUserWorkloadsSecret}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef UpdateUserWorkloadsSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} [response] UserWorkloadsSecret + */ + + /** + * Calls UpdateUserWorkloadsSecret. + * @function updateUserWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest} request UpdateUserWorkloadsSecretRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.UpdateUserWorkloadsSecretCallback} callback Node-style callback called with the error, if any, and UserWorkloadsSecret + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.updateUserWorkloadsSecret = function updateUserWorkloadsSecret(request, callback) { + return this.rpcCall(updateUserWorkloadsSecret, $root.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest, $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret, request, callback); + }, "name", { value: "UpdateUserWorkloadsSecret" }); + + /** + * Calls UpdateUserWorkloadsSecret. + * @function updateUserWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest} request UpdateUserWorkloadsSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|deleteUserWorkloadsSecret}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef DeleteUserWorkloadsSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteUserWorkloadsSecret. + * @function deleteUserWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest} request DeleteUserWorkloadsSecretRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.DeleteUserWorkloadsSecretCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.deleteUserWorkloadsSecret = function deleteUserWorkloadsSecret(request, callback) { + return this.rpcCall(deleteUserWorkloadsSecret, $root.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteUserWorkloadsSecret" }); + + /** + * Calls DeleteUserWorkloadsSecret. + * @function deleteUserWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest} request DeleteUserWorkloadsSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|createUserWorkloadsConfigMap}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef CreateUserWorkloadsConfigMapCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} [response] UserWorkloadsConfigMap + */ + + /** + * Calls CreateUserWorkloadsConfigMap. + * @function createUserWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest} request CreateUserWorkloadsConfigMapRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.CreateUserWorkloadsConfigMapCallback} callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.createUserWorkloadsConfigMap = function createUserWorkloadsConfigMap(request, callback) { + return this.rpcCall(createUserWorkloadsConfigMap, $root.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest, $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap, request, callback); + }, "name", { value: "CreateUserWorkloadsConfigMap" }); + + /** + * Calls CreateUserWorkloadsConfigMap. + * @function createUserWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest} request CreateUserWorkloadsConfigMapRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|getUserWorkloadsConfigMap}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef GetUserWorkloadsConfigMapCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} [response] UserWorkloadsConfigMap + */ + + /** + * Calls GetUserWorkloadsConfigMap. + * @function getUserWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest} request GetUserWorkloadsConfigMapRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.GetUserWorkloadsConfigMapCallback} callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.getUserWorkloadsConfigMap = function getUserWorkloadsConfigMap(request, callback) { + return this.rpcCall(getUserWorkloadsConfigMap, $root.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest, $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap, request, callback); + }, "name", { value: "GetUserWorkloadsConfigMap" }); + + /** + * Calls GetUserWorkloadsConfigMap. + * @function getUserWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest} request GetUserWorkloadsConfigMapRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listUserWorkloadsConfigMaps}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef ListUserWorkloadsConfigMapsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse} [response] ListUserWorkloadsConfigMapsResponse + */ + + /** + * Calls ListUserWorkloadsConfigMaps. + * @function listUserWorkloadsConfigMaps + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest} request ListUserWorkloadsConfigMapsRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.ListUserWorkloadsConfigMapsCallback} callback Node-style callback called with the error, if any, and ListUserWorkloadsConfigMapsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.listUserWorkloadsConfigMaps = function listUserWorkloadsConfigMaps(request, callback) { + return this.rpcCall(listUserWorkloadsConfigMaps, $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest, $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse, request, callback); + }, "name", { value: "ListUserWorkloadsConfigMaps" }); + + /** + * Calls ListUserWorkloadsConfigMaps. + * @function listUserWorkloadsConfigMaps + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest} request ListUserWorkloadsConfigMapsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|updateUserWorkloadsConfigMap}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef UpdateUserWorkloadsConfigMapCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} [response] UserWorkloadsConfigMap + */ + + /** + * Calls UpdateUserWorkloadsConfigMap. + * @function updateUserWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest} request UpdateUserWorkloadsConfigMapRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.UpdateUserWorkloadsConfigMapCallback} callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.updateUserWorkloadsConfigMap = function updateUserWorkloadsConfigMap(request, callback) { + return this.rpcCall(updateUserWorkloadsConfigMap, $root.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest, $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap, request, callback); + }, "name", { value: "UpdateUserWorkloadsConfigMap" }); + + /** + * Calls UpdateUserWorkloadsConfigMap. + * @function updateUserWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest} request UpdateUserWorkloadsConfigMapRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|deleteUserWorkloadsConfigMap}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef DeleteUserWorkloadsConfigMapCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteUserWorkloadsConfigMap. + * @function deleteUserWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest} request DeleteUserWorkloadsConfigMapRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.DeleteUserWorkloadsConfigMapCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.deleteUserWorkloadsConfigMap = function deleteUserWorkloadsConfigMap(request, callback) { + return this.rpcCall(deleteUserWorkloadsConfigMap, $root.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteUserWorkloadsConfigMap" }); + + /** + * Calls DeleteUserWorkloadsConfigMap. + * @function deleteUserWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest} request DeleteUserWorkloadsConfigMapRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|saveSnapshot}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef SaveSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls SaveSnapshot. + * @function saveSnapshot + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest} request SaveSnapshotRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.SaveSnapshotCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.saveSnapshot = function saveSnapshot(request, callback) { + return this.rpcCall(saveSnapshot, $root.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "SaveSnapshot" }); + + /** + * Calls SaveSnapshot. + * @function saveSnapshot + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest} request SaveSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|loadSnapshot}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef LoadSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls LoadSnapshot. + * @function loadSnapshot + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest} request LoadSnapshotRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.LoadSnapshotCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.loadSnapshot = function loadSnapshot(request, callback) { + return this.rpcCall(loadSnapshot, $root.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "LoadSnapshot" }); + + /** + * Calls LoadSnapshot. + * @function loadSnapshot + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest} request LoadSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|databaseFailover}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef DatabaseFailoverCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DatabaseFailover. + * @function databaseFailover + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest} request DatabaseFailoverRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.DatabaseFailoverCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.databaseFailover = function databaseFailover(request, callback) { + return this.rpcCall(databaseFailover, $root.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DatabaseFailover" }); + + /** + * Calls DatabaseFailover. + * @function databaseFailover + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest} request DatabaseFailoverRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|fetchDatabaseProperties}. + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @typedef FetchDatabasePropertiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse} [response] FetchDatabasePropertiesResponse + */ + + /** + * Calls FetchDatabaseProperties. + * @function fetchDatabaseProperties + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest} request FetchDatabasePropertiesRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.Environments.FetchDatabasePropertiesCallback} callback Node-style callback called with the error, if any, and FetchDatabasePropertiesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.fetchDatabaseProperties = function fetchDatabaseProperties(request, callback) { + return this.rpcCall(fetchDatabaseProperties, $root.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest, $root.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse, request, callback); + }, "name", { value: "FetchDatabaseProperties" }); + + /** + * Calls FetchDatabaseProperties. + * @function fetchDatabaseProperties + * @memberof google.cloud.orchestration.airflow.service.v1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest} request FetchDatabasePropertiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Environments; + })(); + + v1.CreateEnvironmentRequest = (function() { + + /** + * Properties of a CreateEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface ICreateEnvironmentRequest + * @property {string|null} [parent] CreateEnvironmentRequest parent + * @property {google.cloud.orchestration.airflow.service.v1.IEnvironment|null} [environment] CreateEnvironmentRequest environment + */ + + /** + * Constructs a new CreateEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a CreateEnvironmentRequest. + * @implements ICreateEnvironmentRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest=} [properties] Properties to set + */ + function CreateEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateEnvironmentRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.parent = ""; + + /** + * CreateEnvironmentRequest environment. + * @member {google.cloud.orchestration.airflow.service.v1.IEnvironment|null|undefined} environment + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.environment = null; + + /** + * Creates a new CreateEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} CreateEnvironmentRequest instance + */ + CreateEnvironmentRequest.create = function create(properties) { + return new CreateEnvironmentRequest(properties); + }; + + /** + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEnvironmentRequest.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.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.orchestration.airflow.service.v1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateEnvironmentRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateEnvironmentRequest.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.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + return null; + }; + + /** + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} CreateEnvironmentRequest + */ + CreateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.fromObject(object.environment); + } + return message; + }; + + /** + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} message CreateEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.environment = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.toObject(message.environment, options); + return object; + }; + + /** + * Converts this CreateEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest"; + }; + + return CreateEnvironmentRequest; + })(); + + v1.GetEnvironmentRequest = (function() { + + /** + * Properties of a GetEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IGetEnvironmentRequest + * @property {string|null} [name] GetEnvironmentRequest name + */ + + /** + * Constructs a new GetEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a GetEnvironmentRequest. + * @implements IGetEnvironmentRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest=} [properties] Properties to set + */ + function GetEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @instance + */ + GetEnvironmentRequest.prototype.name = ""; + + /** + * Creates a new GetEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} GetEnvironmentRequest instance + */ + GetEnvironmentRequest.create = function create(properties) { + return new GetEnvironmentRequest(properties); + }; + + /** + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnvironmentRequest.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 GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEnvironmentRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEnvironmentRequest.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 GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} GetEnvironmentRequest + */ + GetEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} message GetEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEnvironmentRequest.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 GetEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + GetEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest"; + }; + + return GetEnvironmentRequest; + })(); + + v1.ListEnvironmentsRequest = (function() { + + /** + * Properties of a ListEnvironmentsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IListEnvironmentsRequest + * @property {string|null} [parent] ListEnvironmentsRequest parent + * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize + * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken + */ + + /** + * Constructs a new ListEnvironmentsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a ListEnvironmentsRequest. + * @implements IListEnvironmentsRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest=} [properties] Properties to set + */ + function ListEnvironmentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEnvironmentsRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.parent = ""; + + /** + * ListEnvironmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.pageSize = 0; + + /** + * ListEnvironmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListEnvironmentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} ListEnvironmentsRequest instance + */ + ListEnvironmentsRequest.create = function create(properties) { + return new ListEnvironmentsRequest(properties); + }; + + /** + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEnvironmentsRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEnvironmentsRequest.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"; + return null; + }; + + /** + * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} ListEnvironmentsRequest + */ + ListEnvironmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} message ListEnvironmentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEnvironmentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListEnvironmentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListEnvironmentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEnvironmentsRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEnvironmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest"; + }; + + return ListEnvironmentsRequest; + })(); + + v1.ListEnvironmentsResponse = (function() { + + /** + * Properties of a ListEnvironmentsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IListEnvironmentsResponse + * @property {Array.|null} [environments] ListEnvironmentsResponse environments + * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken + */ + + /** + * Constructs a new ListEnvironmentsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a ListEnvironmentsResponse. + * @implements IListEnvironmentsResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse=} [properties] Properties to set + */ + function ListEnvironmentsResponse(properties) { + this.environments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEnvironmentsResponse environments. + * @member {Array.} environments + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @instance + */ + ListEnvironmentsResponse.prototype.environments = $util.emptyArray; + + /** + * ListEnvironmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @instance + */ + ListEnvironmentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEnvironmentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} ListEnvironmentsResponse instance + */ + ListEnvironmentsResponse.create = function create(properties) { + return new ListEnvironmentsResponse(properties); + }; + + /** + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environments != null && message.environments.length) + for (var i = 0; i < message.environments.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1.Environment.encode(message.environments[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 ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.environments && message.environments.length)) + message.environments = []; + message.environments.push($root.google.cloud.orchestration.airflow.service.v1.Environment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEnvironmentsResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEnvironmentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environments != null && message.hasOwnProperty("environments")) { + if (!Array.isArray(message.environments)) + return "environments: array expected"; + for (var i = 0; i < message.environments.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1.Environment.verify(message.environments[i]); + if (error) + return "environments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} ListEnvironmentsResponse + */ + ListEnvironmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse(); + if (object.environments) { + if (!Array.isArray(object.environments)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.environments: array expected"); + message.environments = []; + for (var i = 0; i < object.environments.length; ++i) { + if (typeof object.environments[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.environments: object expected"); + message.environments[i] = $root.google.cloud.orchestration.airflow.service.v1.Environment.fromObject(object.environments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} message ListEnvironmentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEnvironmentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.environments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.environments && message.environments.length) { + object.environments = []; + for (var j = 0; j < message.environments.length; ++j) + object.environments[j] = $root.google.cloud.orchestration.airflow.service.v1.Environment.toObject(message.environments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListEnvironmentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListEnvironmentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEnvironmentsResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEnvironmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse"; + }; + + return ListEnvironmentsResponse; + })(); + + v1.DeleteEnvironmentRequest = (function() { + + /** + * Properties of a DeleteEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IDeleteEnvironmentRequest + * @property {string|null} [name] DeleteEnvironmentRequest name + */ + + /** + * Constructs a new DeleteEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a DeleteEnvironmentRequest. + * @implements IDeleteEnvironmentRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest=} [properties] Properties to set + */ + function DeleteEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @instance + */ + DeleteEnvironmentRequest.prototype.name = ""; + + /** + * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance + */ + DeleteEnvironmentRequest.create = function create(properties) { + return new DeleteEnvironmentRequest(properties); + }; + + /** + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEnvironmentRequest.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 DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteEnvironmentRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteEnvironmentRequest.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 DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + */ + DeleteEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteEnvironmentRequest.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 DeleteEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest"; + }; + + return DeleteEnvironmentRequest; + })(); + + v1.UpdateEnvironmentRequest = (function() { + + /** + * Properties of an UpdateEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IUpdateEnvironmentRequest + * @property {string|null} [name] UpdateEnvironmentRequest name + * @property {google.cloud.orchestration.airflow.service.v1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask + */ + + /** + * Constructs a new UpdateEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an UpdateEnvironmentRequest. + * @implements IUpdateEnvironmentRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest=} [properties] Properties to set + */ + function UpdateEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.name = ""; + + /** + * UpdateEnvironmentRequest environment. + * @member {google.cloud.orchestration.airflow.service.v1.IEnvironment|null|undefined} environment + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.environment = null; + + /** + * UpdateEnvironmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance + */ + UpdateEnvironmentRequest.create = function create(properties) { + return new UpdateEnvironmentRequest(properties); + }; + + /** + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.orchestration.airflow.service.v1.Environment.encode(message.environment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.name = reader.string(); + break; + } + case 1: { + message.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEnvironmentRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEnvironmentRequest.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.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.Environment.verify(message.environment); + if (error) + return "environment." + 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 UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + */ + UpdateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.fromObject(object.environment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = null; + object.name = ""; + object.updateMask = null; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.toObject(message.environment, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest"; + }; + + return UpdateEnvironmentRequest; + })(); + + v1.ExecuteAirflowCommandRequest = (function() { + + /** + * Properties of an ExecuteAirflowCommandRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IExecuteAirflowCommandRequest + * @property {string|null} [environment] ExecuteAirflowCommandRequest environment + * @property {string|null} [command] ExecuteAirflowCommandRequest command + * @property {string|null} [subcommand] ExecuteAirflowCommandRequest subcommand + * @property {Array.|null} [parameters] ExecuteAirflowCommandRequest parameters + */ + + /** + * Constructs a new ExecuteAirflowCommandRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an ExecuteAirflowCommandRequest. + * @implements IExecuteAirflowCommandRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest=} [properties] Properties to set + */ + function ExecuteAirflowCommandRequest(properties) { + this.parameters = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecuteAirflowCommandRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + * @instance + */ + ExecuteAirflowCommandRequest.prototype.environment = ""; + + /** + * ExecuteAirflowCommandRequest command. + * @member {string} command + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + * @instance + */ + ExecuteAirflowCommandRequest.prototype.command = ""; + + /** + * ExecuteAirflowCommandRequest subcommand. + * @member {string} subcommand + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + * @instance + */ + ExecuteAirflowCommandRequest.prototype.subcommand = ""; + + /** + * ExecuteAirflowCommandRequest parameters. + * @member {Array.} parameters + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + * @instance + */ + ExecuteAirflowCommandRequest.prototype.parameters = $util.emptyArray; + + /** + * Creates a new ExecuteAirflowCommandRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest} ExecuteAirflowCommandRequest instance + */ + ExecuteAirflowCommandRequest.create = function create(properties) { + return new ExecuteAirflowCommandRequest(properties); + }; + + /** + * Encodes the specified ExecuteAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest} message ExecuteAirflowCommandRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteAirflowCommandRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.command != null && Object.hasOwnProperty.call(message, "command")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.command); + if (message.subcommand != null && Object.hasOwnProperty.call(message, "subcommand")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.subcommand); + if (message.parameters != null && message.parameters.length) + for (var i = 0; i < message.parameters.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parameters[i]); + return writer; + }; + + /** + * Encodes the specified ExecuteAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest} message ExecuteAirflowCommandRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteAirflowCommandRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecuteAirflowCommandRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest} ExecuteAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteAirflowCommandRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); + break; + } + case 2: { + message.command = reader.string(); + break; + } + case 3: { + message.subcommand = reader.string(); + break; + } + case 4: { + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecuteAirflowCommandRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest} ExecuteAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteAirflowCommandRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecuteAirflowCommandRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecuteAirflowCommandRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.command != null && message.hasOwnProperty("command")) + if (!$util.isString(message.command)) + return "command: string expected"; + if (message.subcommand != null && message.hasOwnProperty("subcommand")) + if (!$util.isString(message.subcommand)) + return "subcommand: string expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!Array.isArray(message.parameters)) + return "parameters: array expected"; + for (var i = 0; i < message.parameters.length; ++i) + if (!$util.isString(message.parameters[i])) + return "parameters: string[] expected"; + } + return null; + }; + + /** + * Creates an ExecuteAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest} ExecuteAirflowCommandRequest + */ + ExecuteAirflowCommandRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.command != null) + message.command = String(object.command); + if (object.subcommand != null) + message.subcommand = String(object.subcommand); + if (object.parameters) { + if (!Array.isArray(object.parameters)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest.parameters: array expected"); + message.parameters = []; + for (var i = 0; i < object.parameters.length; ++i) + message.parameters[i] = String(object.parameters[i]); + } + return message; + }; + + /** + * Creates a plain object from an ExecuteAirflowCommandRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest} message ExecuteAirflowCommandRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecuteAirflowCommandRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.parameters = []; + if (options.defaults) { + object.environment = ""; + object.command = ""; + object.subcommand = ""; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.command != null && message.hasOwnProperty("command")) + object.command = message.command; + if (message.subcommand != null && message.hasOwnProperty("subcommand")) + object.subcommand = message.subcommand; + if (message.parameters && message.parameters.length) { + object.parameters = []; + for (var j = 0; j < message.parameters.length; ++j) + object.parameters[j] = message.parameters[j]; + } + return object; + }; + + /** + * Converts this ExecuteAirflowCommandRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + * @instance + * @returns {Object.} JSON object + */ + ExecuteAirflowCommandRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecuteAirflowCommandRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecuteAirflowCommandRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest"; + }; + + return ExecuteAirflowCommandRequest; + })(); + + v1.ExecuteAirflowCommandResponse = (function() { + + /** + * Properties of an ExecuteAirflowCommandResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IExecuteAirflowCommandResponse + * @property {string|null} [executionId] ExecuteAirflowCommandResponse executionId + * @property {string|null} [pod] ExecuteAirflowCommandResponse pod + * @property {string|null} [podNamespace] ExecuteAirflowCommandResponse podNamespace + * @property {string|null} [error] ExecuteAirflowCommandResponse error + */ + + /** + * Constructs a new ExecuteAirflowCommandResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an ExecuteAirflowCommandResponse. + * @implements IExecuteAirflowCommandResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse=} [properties] Properties to set + */ + function ExecuteAirflowCommandResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecuteAirflowCommandResponse executionId. + * @member {string} executionId + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + * @instance + */ + ExecuteAirflowCommandResponse.prototype.executionId = ""; + + /** + * ExecuteAirflowCommandResponse pod. + * @member {string} pod + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + * @instance + */ + ExecuteAirflowCommandResponse.prototype.pod = ""; + + /** + * ExecuteAirflowCommandResponse podNamespace. + * @member {string} podNamespace + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + * @instance + */ + ExecuteAirflowCommandResponse.prototype.podNamespace = ""; + + /** + * ExecuteAirflowCommandResponse error. + * @member {string} error + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + * @instance + */ + ExecuteAirflowCommandResponse.prototype.error = ""; + + /** + * Creates a new ExecuteAirflowCommandResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse} ExecuteAirflowCommandResponse instance + */ + ExecuteAirflowCommandResponse.create = function create(properties) { + return new ExecuteAirflowCommandResponse(properties); + }; + + /** + * Encodes the specified ExecuteAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse} message ExecuteAirflowCommandResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteAirflowCommandResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.executionId != null && Object.hasOwnProperty.call(message, "executionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.executionId); + if (message.pod != null && Object.hasOwnProperty.call(message, "pod")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pod); + if (message.podNamespace != null && Object.hasOwnProperty.call(message, "podNamespace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.podNamespace); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.error); + return writer; + }; + + /** + * Encodes the specified ExecuteAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse} message ExecuteAirflowCommandResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteAirflowCommandResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecuteAirflowCommandResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse} ExecuteAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteAirflowCommandResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.executionId = reader.string(); + break; + } + case 2: { + message.pod = reader.string(); + break; + } + case 3: { + message.podNamespace = reader.string(); + break; + } + case 4: { + message.error = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecuteAirflowCommandResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse} ExecuteAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteAirflowCommandResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecuteAirflowCommandResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecuteAirflowCommandResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.executionId != null && message.hasOwnProperty("executionId")) + if (!$util.isString(message.executionId)) + return "executionId: string expected"; + if (message.pod != null && message.hasOwnProperty("pod")) + if (!$util.isString(message.pod)) + return "pod: string expected"; + if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) + if (!$util.isString(message.podNamespace)) + return "podNamespace: string expected"; + if (message.error != null && message.hasOwnProperty("error")) + if (!$util.isString(message.error)) + return "error: string expected"; + return null; + }; + + /** + * Creates an ExecuteAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse} ExecuteAirflowCommandResponse + */ + ExecuteAirflowCommandResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse(); + if (object.executionId != null) + message.executionId = String(object.executionId); + if (object.pod != null) + message.pod = String(object.pod); + if (object.podNamespace != null) + message.podNamespace = String(object.podNamespace); + if (object.error != null) + message.error = String(object.error); + return message; + }; + + /** + * Creates a plain object from an ExecuteAirflowCommandResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse} message ExecuteAirflowCommandResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecuteAirflowCommandResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.executionId = ""; + object.pod = ""; + object.podNamespace = ""; + object.error = ""; + } + if (message.executionId != null && message.hasOwnProperty("executionId")) + object.executionId = message.executionId; + if (message.pod != null && message.hasOwnProperty("pod")) + object.pod = message.pod; + if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) + object.podNamespace = message.podNamespace; + if (message.error != null && message.hasOwnProperty("error")) + object.error = message.error; + return object; + }; + + /** + * Converts this ExecuteAirflowCommandResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + * @instance + * @returns {Object.} JSON object + */ + ExecuteAirflowCommandResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecuteAirflowCommandResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecuteAirflowCommandResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse"; + }; + + return ExecuteAirflowCommandResponse; + })(); + + v1.StopAirflowCommandRequest = (function() { + + /** + * Properties of a StopAirflowCommandRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IStopAirflowCommandRequest + * @property {string|null} [environment] StopAirflowCommandRequest environment + * @property {string|null} [executionId] StopAirflowCommandRequest executionId + * @property {string|null} [pod] StopAirflowCommandRequest pod + * @property {string|null} [podNamespace] StopAirflowCommandRequest podNamespace + * @property {boolean|null} [force] StopAirflowCommandRequest force + */ + + /** + * Constructs a new StopAirflowCommandRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a StopAirflowCommandRequest. + * @implements IStopAirflowCommandRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest=} [properties] Properties to set + */ + function StopAirflowCommandRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StopAirflowCommandRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + * @instance + */ + StopAirflowCommandRequest.prototype.environment = ""; + + /** + * StopAirflowCommandRequest executionId. + * @member {string} executionId + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + * @instance + */ + StopAirflowCommandRequest.prototype.executionId = ""; + + /** + * StopAirflowCommandRequest pod. + * @member {string} pod + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + * @instance + */ + StopAirflowCommandRequest.prototype.pod = ""; + + /** + * StopAirflowCommandRequest podNamespace. + * @member {string} podNamespace + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + * @instance + */ + StopAirflowCommandRequest.prototype.podNamespace = ""; + + /** + * StopAirflowCommandRequest force. + * @member {boolean} force + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + * @instance + */ + StopAirflowCommandRequest.prototype.force = false; + + /** + * Creates a new StopAirflowCommandRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest} StopAirflowCommandRequest instance + */ + StopAirflowCommandRequest.create = function create(properties) { + return new StopAirflowCommandRequest(properties); + }; + + /** + * Encodes the specified StopAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest} message StopAirflowCommandRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopAirflowCommandRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.executionId != null && Object.hasOwnProperty.call(message, "executionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.executionId); + if (message.pod != null && Object.hasOwnProperty.call(message, "pod")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pod); + if (message.podNamespace != null && Object.hasOwnProperty.call(message, "podNamespace")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.podNamespace); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); + return writer; + }; + + /** + * Encodes the specified StopAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest} message StopAirflowCommandRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopAirflowCommandRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StopAirflowCommandRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest} StopAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopAirflowCommandRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); + break; + } + case 2: { + message.executionId = reader.string(); + break; + } + case 3: { + message.pod = reader.string(); + break; + } + case 4: { + message.podNamespace = reader.string(); + break; + } + case 5: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StopAirflowCommandRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest} StopAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopAirflowCommandRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StopAirflowCommandRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StopAirflowCommandRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.executionId != null && message.hasOwnProperty("executionId")) + if (!$util.isString(message.executionId)) + return "executionId: string expected"; + if (message.pod != null && message.hasOwnProperty("pod")) + if (!$util.isString(message.pod)) + return "pod: string expected"; + if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) + if (!$util.isString(message.podNamespace)) + return "podNamespace: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a StopAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest} StopAirflowCommandRequest + */ + StopAirflowCommandRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.executionId != null) + message.executionId = String(object.executionId); + if (object.pod != null) + message.pod = String(object.pod); + if (object.podNamespace != null) + message.podNamespace = String(object.podNamespace); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a StopAirflowCommandRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest} message StopAirflowCommandRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StopAirflowCommandRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = ""; + object.executionId = ""; + object.pod = ""; + object.podNamespace = ""; + object.force = false; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.executionId != null && message.hasOwnProperty("executionId")) + object.executionId = message.executionId; + if (message.pod != null && message.hasOwnProperty("pod")) + object.pod = message.pod; + if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) + object.podNamespace = message.podNamespace; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this StopAirflowCommandRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + * @instance + * @returns {Object.} JSON object + */ + StopAirflowCommandRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StopAirflowCommandRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StopAirflowCommandRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest"; + }; + + return StopAirflowCommandRequest; + })(); + + v1.StopAirflowCommandResponse = (function() { + + /** + * Properties of a StopAirflowCommandResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IStopAirflowCommandResponse + * @property {boolean|null} [isDone] StopAirflowCommandResponse isDone + * @property {Array.|null} [output] StopAirflowCommandResponse output + */ + + /** + * Constructs a new StopAirflowCommandResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a StopAirflowCommandResponse. + * @implements IStopAirflowCommandResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse=} [properties] Properties to set + */ + function StopAirflowCommandResponse(properties) { + this.output = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StopAirflowCommandResponse isDone. + * @member {boolean} isDone + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + * @instance + */ + StopAirflowCommandResponse.prototype.isDone = false; + + /** + * StopAirflowCommandResponse output. + * @member {Array.} output + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + * @instance + */ + StopAirflowCommandResponse.prototype.output = $util.emptyArray; + + /** + * Creates a new StopAirflowCommandResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse} StopAirflowCommandResponse instance + */ + StopAirflowCommandResponse.create = function create(properties) { + return new StopAirflowCommandResponse(properties); + }; + + /** + * Encodes the specified StopAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse} message StopAirflowCommandResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopAirflowCommandResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isDone != null && Object.hasOwnProperty.call(message, "isDone")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isDone); + if (message.output != null && message.output.length) + for (var i = 0; i < message.output.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.output[i]); + return writer; + }; + + /** + * Encodes the specified StopAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse} message StopAirflowCommandResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopAirflowCommandResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StopAirflowCommandResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse} StopAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopAirflowCommandResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.isDone = reader.bool(); + break; + } + case 2: { + if (!(message.output && message.output.length)) + message.output = []; + message.output.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StopAirflowCommandResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse} StopAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopAirflowCommandResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StopAirflowCommandResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StopAirflowCommandResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.isDone != null && message.hasOwnProperty("isDone")) + if (typeof message.isDone !== "boolean") + return "isDone: boolean expected"; + if (message.output != null && message.hasOwnProperty("output")) { + if (!Array.isArray(message.output)) + return "output: array expected"; + for (var i = 0; i < message.output.length; ++i) + if (!$util.isString(message.output[i])) + return "output: string[] expected"; + } + return null; + }; + + /** + * Creates a StopAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse} StopAirflowCommandResponse + */ + StopAirflowCommandResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse(); + if (object.isDone != null) + message.isDone = Boolean(object.isDone); + if (object.output) { + if (!Array.isArray(object.output)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse.output: array expected"); + message.output = []; + for (var i = 0; i < object.output.length; ++i) + message.output[i] = String(object.output[i]); + } + return message; + }; + + /** + * Creates a plain object from a StopAirflowCommandResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse} message StopAirflowCommandResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StopAirflowCommandResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.output = []; + if (options.defaults) + object.isDone = false; + if (message.isDone != null && message.hasOwnProperty("isDone")) + object.isDone = message.isDone; + if (message.output && message.output.length) { + object.output = []; + for (var j = 0; j < message.output.length; ++j) + object.output[j] = message.output[j]; + } + return object; + }; + + /** + * Converts this StopAirflowCommandResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + * @instance + * @returns {Object.} JSON object + */ + StopAirflowCommandResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StopAirflowCommandResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StopAirflowCommandResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse"; + }; + + return StopAirflowCommandResponse; + })(); + + v1.PollAirflowCommandRequest = (function() { + + /** + * Properties of a PollAirflowCommandRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IPollAirflowCommandRequest + * @property {string|null} [environment] PollAirflowCommandRequest environment + * @property {string|null} [executionId] PollAirflowCommandRequest executionId + * @property {string|null} [pod] PollAirflowCommandRequest pod + * @property {string|null} [podNamespace] PollAirflowCommandRequest podNamespace + * @property {number|null} [nextLineNumber] PollAirflowCommandRequest nextLineNumber + */ + + /** + * Constructs a new PollAirflowCommandRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a PollAirflowCommandRequest. + * @implements IPollAirflowCommandRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest=} [properties] Properties to set + */ + function PollAirflowCommandRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PollAirflowCommandRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + * @instance + */ + PollAirflowCommandRequest.prototype.environment = ""; + + /** + * PollAirflowCommandRequest executionId. + * @member {string} executionId + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + * @instance + */ + PollAirflowCommandRequest.prototype.executionId = ""; + + /** + * PollAirflowCommandRequest pod. + * @member {string} pod + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + * @instance + */ + PollAirflowCommandRequest.prototype.pod = ""; + + /** + * PollAirflowCommandRequest podNamespace. + * @member {string} podNamespace + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + * @instance + */ + PollAirflowCommandRequest.prototype.podNamespace = ""; + + /** + * PollAirflowCommandRequest nextLineNumber. + * @member {number} nextLineNumber + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + * @instance + */ + PollAirflowCommandRequest.prototype.nextLineNumber = 0; + + /** + * Creates a new PollAirflowCommandRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest} PollAirflowCommandRequest instance + */ + PollAirflowCommandRequest.create = function create(properties) { + return new PollAirflowCommandRequest(properties); + }; + + /** + * Encodes the specified PollAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest} message PollAirflowCommandRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollAirflowCommandRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.executionId != null && Object.hasOwnProperty.call(message, "executionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.executionId); + if (message.pod != null && Object.hasOwnProperty.call(message, "pod")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pod); + if (message.podNamespace != null && Object.hasOwnProperty.call(message, "podNamespace")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.podNamespace); + if (message.nextLineNumber != null && Object.hasOwnProperty.call(message, "nextLineNumber")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.nextLineNumber); + return writer; + }; + + /** + * Encodes the specified PollAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest} message PollAirflowCommandRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollAirflowCommandRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollAirflowCommandRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest} PollAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollAirflowCommandRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); + break; + } + case 2: { + message.executionId = reader.string(); + break; + } + case 3: { + message.pod = reader.string(); + break; + } + case 4: { + message.podNamespace = reader.string(); + break; + } + case 5: { + message.nextLineNumber = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollAirflowCommandRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest} PollAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollAirflowCommandRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollAirflowCommandRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollAirflowCommandRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.executionId != null && message.hasOwnProperty("executionId")) + if (!$util.isString(message.executionId)) + return "executionId: string expected"; + if (message.pod != null && message.hasOwnProperty("pod")) + if (!$util.isString(message.pod)) + return "pod: string expected"; + if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) + if (!$util.isString(message.podNamespace)) + return "podNamespace: string expected"; + if (message.nextLineNumber != null && message.hasOwnProperty("nextLineNumber")) + if (!$util.isInteger(message.nextLineNumber)) + return "nextLineNumber: integer expected"; + return null; + }; + + /** + * Creates a PollAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest} PollAirflowCommandRequest + */ + PollAirflowCommandRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.executionId != null) + message.executionId = String(object.executionId); + if (object.pod != null) + message.pod = String(object.pod); + if (object.podNamespace != null) + message.podNamespace = String(object.podNamespace); + if (object.nextLineNumber != null) + message.nextLineNumber = object.nextLineNumber | 0; + return message; + }; + + /** + * Creates a plain object from a PollAirflowCommandRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest} message PollAirflowCommandRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollAirflowCommandRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = ""; + object.executionId = ""; + object.pod = ""; + object.podNamespace = ""; + object.nextLineNumber = 0; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.executionId != null && message.hasOwnProperty("executionId")) + object.executionId = message.executionId; + if (message.pod != null && message.hasOwnProperty("pod")) + object.pod = message.pod; + if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) + object.podNamespace = message.podNamespace; + if (message.nextLineNumber != null && message.hasOwnProperty("nextLineNumber")) + object.nextLineNumber = message.nextLineNumber; + return object; + }; + + /** + * Converts this PollAirflowCommandRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + * @instance + * @returns {Object.} JSON object + */ + PollAirflowCommandRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PollAirflowCommandRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollAirflowCommandRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest"; + }; + + return PollAirflowCommandRequest; + })(); + + v1.PollAirflowCommandResponse = (function() { + + /** + * Properties of a PollAirflowCommandResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IPollAirflowCommandResponse + * @property {Array.|null} [output] PollAirflowCommandResponse output + * @property {boolean|null} [outputEnd] PollAirflowCommandResponse outputEnd + * @property {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo|null} [exitInfo] PollAirflowCommandResponse exitInfo + */ + + /** + * Constructs a new PollAirflowCommandResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a PollAirflowCommandResponse. + * @implements IPollAirflowCommandResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse=} [properties] Properties to set + */ + function PollAirflowCommandResponse(properties) { + this.output = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PollAirflowCommandResponse output. + * @member {Array.} output + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @instance + */ + PollAirflowCommandResponse.prototype.output = $util.emptyArray; + + /** + * PollAirflowCommandResponse outputEnd. + * @member {boolean} outputEnd + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @instance + */ + PollAirflowCommandResponse.prototype.outputEnd = false; + + /** + * PollAirflowCommandResponse exitInfo. + * @member {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo|null|undefined} exitInfo + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @instance + */ + PollAirflowCommandResponse.prototype.exitInfo = null; + + /** + * Creates a new PollAirflowCommandResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse} PollAirflowCommandResponse instance + */ + PollAirflowCommandResponse.create = function create(properties) { + return new PollAirflowCommandResponse(properties); + }; + + /** + * Encodes the specified PollAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse} message PollAirflowCommandResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollAirflowCommandResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.output != null && message.output.length) + for (var i = 0; i < message.output.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.encode(message.output[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.outputEnd != null && Object.hasOwnProperty.call(message, "outputEnd")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.outputEnd); + if (message.exitInfo != null && Object.hasOwnProperty.call(message, "exitInfo")) + $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.encode(message.exitInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PollAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse} message PollAirflowCommandResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollAirflowCommandResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollAirflowCommandResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse} PollAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollAirflowCommandResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.output && message.output.length)) + message.output = []; + message.output.push($root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.decode(reader, reader.uint32())); + break; + } + case 2: { + message.outputEnd = reader.bool(); + break; + } + case 3: { + message.exitInfo = $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollAirflowCommandResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse} PollAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollAirflowCommandResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollAirflowCommandResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollAirflowCommandResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.output != null && message.hasOwnProperty("output")) { + if (!Array.isArray(message.output)) + return "output: array expected"; + for (var i = 0; i < message.output.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.verify(message.output[i]); + if (error) + return "output." + error; + } + } + if (message.outputEnd != null && message.hasOwnProperty("outputEnd")) + if (typeof message.outputEnd !== "boolean") + return "outputEnd: boolean expected"; + if (message.exitInfo != null && message.hasOwnProperty("exitInfo")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.verify(message.exitInfo); + if (error) + return "exitInfo." + error; + } + return null; + }; + + /** + * Creates a PollAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse} PollAirflowCommandResponse + */ + PollAirflowCommandResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse(); + if (object.output) { + if (!Array.isArray(object.output)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.output: array expected"); + message.output = []; + for (var i = 0; i < object.output.length; ++i) { + if (typeof object.output[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.output: object expected"); + message.output[i] = $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.fromObject(object.output[i]); + } + } + if (object.outputEnd != null) + message.outputEnd = Boolean(object.outputEnd); + if (object.exitInfo != null) { + if (typeof object.exitInfo !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.exitInfo: object expected"); + message.exitInfo = $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.fromObject(object.exitInfo); + } + return message; + }; + + /** + * Creates a plain object from a PollAirflowCommandResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse} message PollAirflowCommandResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollAirflowCommandResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.output = []; + if (options.defaults) { + object.outputEnd = false; + object.exitInfo = null; + } + if (message.output && message.output.length) { + object.output = []; + for (var j = 0; j < message.output.length; ++j) + object.output[j] = $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.toObject(message.output[j], options); + } + if (message.outputEnd != null && message.hasOwnProperty("outputEnd")) + object.outputEnd = message.outputEnd; + if (message.exitInfo != null && message.hasOwnProperty("exitInfo")) + object.exitInfo = $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.toObject(message.exitInfo, options); + return object; + }; + + /** + * Converts this PollAirflowCommandResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @instance + * @returns {Object.} JSON object + */ + PollAirflowCommandResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PollAirflowCommandResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollAirflowCommandResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse"; + }; + + PollAirflowCommandResponse.Line = (function() { + + /** + * Properties of a Line. + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @interface ILine + * @property {number|null} [lineNumber] Line lineNumber + * @property {string|null} [content] Line content + */ + + /** + * Constructs a new Line. + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @classdesc Represents a Line. + * @implements ILine + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine=} [properties] Properties to set + */ + function Line(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Line lineNumber. + * @member {number} lineNumber + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + * @instance + */ + Line.prototype.lineNumber = 0; + + /** + * Line content. + * @member {string} content + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + * @instance + */ + Line.prototype.content = ""; + + /** + * Creates a new Line instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + * @static + * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line} Line instance + */ + Line.create = function create(properties) { + return new Line(properties); + }; + + /** + * Encodes the specified Line message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + * @static + * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine} message Line message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Line.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lineNumber != null && Object.hasOwnProperty.call(message, "lineNumber")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.lineNumber); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); + return writer; + }; + + /** + * Encodes the specified Line message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + * @static + * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine} message Line message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Line.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Line message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line} Line + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Line.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lineNumber = reader.int32(); + break; + } + case 2: { + message.content = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Line message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line} Line + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Line.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Line message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Line.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lineNumber != null && message.hasOwnProperty("lineNumber")) + if (!$util.isInteger(message.lineNumber)) + return "lineNumber: integer expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + return null; + }; + + /** + * Creates a Line message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line} Line + */ + Line.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line(); + if (object.lineNumber != null) + message.lineNumber = object.lineNumber | 0; + if (object.content != null) + message.content = String(object.content); + return message; + }; + + /** + * Creates a plain object from a Line message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + * @static + * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line} message Line + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Line.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lineNumber = 0; + object.content = ""; + } + if (message.lineNumber != null && message.hasOwnProperty("lineNumber")) + object.lineNumber = message.lineNumber; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + return object; + }; + + /** + * Converts this Line to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + * @instance + * @returns {Object.} JSON object + */ + Line.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Line + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Line.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line"; + }; + + return Line; + })(); + + PollAirflowCommandResponse.ExitInfo = (function() { + + /** + * Properties of an ExitInfo. + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @interface IExitInfo + * @property {number|null} [exitCode] ExitInfo exitCode + * @property {string|null} [error] ExitInfo error + */ + + /** + * Constructs a new ExitInfo. + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse + * @classdesc Represents an ExitInfo. + * @implements IExitInfo + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo=} [properties] Properties to set + */ + function ExitInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExitInfo exitCode. + * @member {number} exitCode + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + * @instance + */ + ExitInfo.prototype.exitCode = 0; + + /** + * ExitInfo error. + * @member {string} error + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + * @instance + */ + ExitInfo.prototype.error = ""; + + /** + * Creates a new ExitInfo instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo} ExitInfo instance + */ + ExitInfo.create = function create(properties) { + return new ExitInfo(properties); + }; + + /** + * Encodes the specified ExitInfo message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo} message ExitInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExitInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exitCode != null && Object.hasOwnProperty.call(message, "exitCode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.exitCode); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.error); + return writer; + }; + + /** + * Encodes the specified ExitInfo message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo} message ExitInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExitInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExitInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo} ExitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExitInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.exitCode = reader.int32(); + break; + } + case 2: { + message.error = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExitInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo} ExitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExitInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExitInfo message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExitInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.exitCode != null && message.hasOwnProperty("exitCode")) + if (!$util.isInteger(message.exitCode)) + return "exitCode: integer expected"; + if (message.error != null && message.hasOwnProperty("error")) + if (!$util.isString(message.error)) + return "error: string expected"; + return null; + }; + + /** + * Creates an ExitInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo} ExitInfo + */ + ExitInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo(); + if (object.exitCode != null) + message.exitCode = object.exitCode | 0; + if (object.error != null) + message.error = String(object.error); + return message; + }; + + /** + * Creates a plain object from an ExitInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo} message ExitInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExitInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.exitCode = 0; + object.error = ""; + } + if (message.exitCode != null && message.hasOwnProperty("exitCode")) + object.exitCode = message.exitCode; + if (message.error != null && message.hasOwnProperty("error")) + object.error = message.error; + return object; + }; + + /** + * Converts this ExitInfo to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + * @instance + * @returns {Object.} JSON object + */ + ExitInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExitInfo + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExitInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo"; + }; + + return ExitInfo; + })(); + + return PollAirflowCommandResponse; + })(); + + v1.CreateUserWorkloadsSecretRequest = (function() { + + /** + * Properties of a CreateUserWorkloadsSecretRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface ICreateUserWorkloadsSecretRequest + * @property {string|null} [parent] CreateUserWorkloadsSecretRequest parent + * @property {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null} [userWorkloadsSecret] CreateUserWorkloadsSecretRequest userWorkloadsSecret + */ + + /** + * Constructs a new CreateUserWorkloadsSecretRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a CreateUserWorkloadsSecretRequest. + * @implements ICreateUserWorkloadsSecretRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest=} [properties] Properties to set + */ + function CreateUserWorkloadsSecretRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserWorkloadsSecretRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest + * @instance + */ + CreateUserWorkloadsSecretRequest.prototype.parent = ""; + + /** + * CreateUserWorkloadsSecretRequest userWorkloadsSecret. + * @member {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null|undefined} userWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest + * @instance + */ + CreateUserWorkloadsSecretRequest.prototype.userWorkloadsSecret = null; + + /** + * Creates a new CreateUserWorkloadsSecretRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest} CreateUserWorkloadsSecretRequest instance + */ + CreateUserWorkloadsSecretRequest.create = function create(properties) { + return new CreateUserWorkloadsSecretRequest(properties); + }; + + /** + * Encodes the specified CreateUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest} message CreateUserWorkloadsSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserWorkloadsSecretRequest.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.userWorkloadsSecret != null && Object.hasOwnProperty.call(message, "userWorkloadsSecret")) + $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.encode(message.userWorkloadsSecret, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest} message CreateUserWorkloadsSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserWorkloadsSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserWorkloadsSecretRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest} CreateUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserWorkloadsSecretRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest} CreateUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserWorkloadsSecretRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserWorkloadsSecretRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserWorkloadsSecretRequest.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.userWorkloadsSecret != null && message.hasOwnProperty("userWorkloadsSecret")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.verify(message.userWorkloadsSecret); + if (error) + return "userWorkloadsSecret." + error; + } + return null; + }; + + /** + * Creates a CreateUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest} CreateUserWorkloadsSecretRequest + */ + CreateUserWorkloadsSecretRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.userWorkloadsSecret != null) { + if (typeof object.userWorkloadsSecret !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest.userWorkloadsSecret: object expected"); + message.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.fromObject(object.userWorkloadsSecret); + } + return message; + }; + + /** + * Creates a plain object from a CreateUserWorkloadsSecretRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest} message CreateUserWorkloadsSecretRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserWorkloadsSecretRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.userWorkloadsSecret = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.userWorkloadsSecret != null && message.hasOwnProperty("userWorkloadsSecret")) + object.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.toObject(message.userWorkloadsSecret, options); + return object; + }; + + /** + * Converts this CreateUserWorkloadsSecretRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest + * @instance + * @returns {Object.} JSON object + */ + CreateUserWorkloadsSecretRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserWorkloadsSecretRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserWorkloadsSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest"; + }; + + return CreateUserWorkloadsSecretRequest; + })(); + + v1.GetUserWorkloadsSecretRequest = (function() { + + /** + * Properties of a GetUserWorkloadsSecretRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IGetUserWorkloadsSecretRequest + * @property {string|null} [name] GetUserWorkloadsSecretRequest name + */ + + /** + * Constructs a new GetUserWorkloadsSecretRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a GetUserWorkloadsSecretRequest. + * @implements IGetUserWorkloadsSecretRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest=} [properties] Properties to set + */ + function GetUserWorkloadsSecretRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetUserWorkloadsSecretRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest + * @instance + */ + GetUserWorkloadsSecretRequest.prototype.name = ""; + + /** + * Creates a new GetUserWorkloadsSecretRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest} GetUserWorkloadsSecretRequest instance + */ + GetUserWorkloadsSecretRequest.create = function create(properties) { + return new GetUserWorkloadsSecretRequest(properties); + }; + + /** + * Encodes the specified GetUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest} message GetUserWorkloadsSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserWorkloadsSecretRequest.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 GetUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest} message GetUserWorkloadsSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserWorkloadsSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetUserWorkloadsSecretRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest} GetUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserWorkloadsSecretRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest} GetUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserWorkloadsSecretRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetUserWorkloadsSecretRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetUserWorkloadsSecretRequest.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 GetUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest} GetUserWorkloadsSecretRequest + */ + GetUserWorkloadsSecretRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetUserWorkloadsSecretRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest} message GetUserWorkloadsSecretRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetUserWorkloadsSecretRequest.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 GetUserWorkloadsSecretRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest + * @instance + * @returns {Object.} JSON object + */ + GetUserWorkloadsSecretRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetUserWorkloadsSecretRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetUserWorkloadsSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest"; + }; + + return GetUserWorkloadsSecretRequest; + })(); + + v1.ListUserWorkloadsSecretsRequest = (function() { + + /** + * Properties of a ListUserWorkloadsSecretsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IListUserWorkloadsSecretsRequest + * @property {string|null} [parent] ListUserWorkloadsSecretsRequest parent + * @property {number|null} [pageSize] ListUserWorkloadsSecretsRequest pageSize + * @property {string|null} [pageToken] ListUserWorkloadsSecretsRequest pageToken + */ + + /** + * Constructs a new ListUserWorkloadsSecretsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a ListUserWorkloadsSecretsRequest. + * @implements IListUserWorkloadsSecretsRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest=} [properties] Properties to set + */ + function ListUserWorkloadsSecretsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserWorkloadsSecretsRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest + * @instance + */ + ListUserWorkloadsSecretsRequest.prototype.parent = ""; + + /** + * ListUserWorkloadsSecretsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest + * @instance + */ + ListUserWorkloadsSecretsRequest.prototype.pageSize = 0; + + /** + * ListUserWorkloadsSecretsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest + * @instance + */ + ListUserWorkloadsSecretsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListUserWorkloadsSecretsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest} ListUserWorkloadsSecretsRequest instance + */ + ListUserWorkloadsSecretsRequest.create = function create(properties) { + return new ListUserWorkloadsSecretsRequest(properties); + }; + + /** + * Encodes the specified ListUserWorkloadsSecretsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest} message ListUserWorkloadsSecretsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserWorkloadsSecretsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListUserWorkloadsSecretsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest} message ListUserWorkloadsSecretsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserWorkloadsSecretsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserWorkloadsSecretsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest} ListUserWorkloadsSecretsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserWorkloadsSecretsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserWorkloadsSecretsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest} ListUserWorkloadsSecretsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserWorkloadsSecretsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserWorkloadsSecretsRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserWorkloadsSecretsRequest.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"; + return null; + }; + + /** + * Creates a ListUserWorkloadsSecretsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest} ListUserWorkloadsSecretsRequest + */ + ListUserWorkloadsSecretsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserWorkloadsSecretsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest} message ListUserWorkloadsSecretsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserWorkloadsSecretsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListUserWorkloadsSecretsRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest + * @instance + * @returns {Object.} JSON object + */ + ListUserWorkloadsSecretsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserWorkloadsSecretsRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserWorkloadsSecretsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest"; + }; + + return ListUserWorkloadsSecretsRequest; + })(); + + v1.UpdateUserWorkloadsSecretRequest = (function() { + + /** + * Properties of an UpdateUserWorkloadsSecretRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IUpdateUserWorkloadsSecretRequest + * @property {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null} [userWorkloadsSecret] UpdateUserWorkloadsSecretRequest userWorkloadsSecret + */ + + /** + * Constructs a new UpdateUserWorkloadsSecretRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an UpdateUserWorkloadsSecretRequest. + * @implements IUpdateUserWorkloadsSecretRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest=} [properties] Properties to set + */ + function UpdateUserWorkloadsSecretRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserWorkloadsSecretRequest userWorkloadsSecret. + * @member {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null|undefined} userWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest + * @instance + */ + UpdateUserWorkloadsSecretRequest.prototype.userWorkloadsSecret = null; + + /** + * Creates a new UpdateUserWorkloadsSecretRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest} UpdateUserWorkloadsSecretRequest instance + */ + UpdateUserWorkloadsSecretRequest.create = function create(properties) { + return new UpdateUserWorkloadsSecretRequest(properties); + }; + + /** + * Encodes the specified UpdateUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest} message UpdateUserWorkloadsSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserWorkloadsSecretRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userWorkloadsSecret != null && Object.hasOwnProperty.call(message, "userWorkloadsSecret")) + $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.encode(message.userWorkloadsSecret, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest} message UpdateUserWorkloadsSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserWorkloadsSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserWorkloadsSecretRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest} UpdateUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserWorkloadsSecretRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest} UpdateUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserWorkloadsSecretRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserWorkloadsSecretRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserWorkloadsSecretRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userWorkloadsSecret != null && message.hasOwnProperty("userWorkloadsSecret")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.verify(message.userWorkloadsSecret); + if (error) + return "userWorkloadsSecret." + error; + } + return null; + }; + + /** + * Creates an UpdateUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest} UpdateUserWorkloadsSecretRequest + */ + UpdateUserWorkloadsSecretRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest(); + if (object.userWorkloadsSecret != null) { + if (typeof object.userWorkloadsSecret !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest.userWorkloadsSecret: object expected"); + message.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.fromObject(object.userWorkloadsSecret); + } + return message; + }; + + /** + * Creates a plain object from an UpdateUserWorkloadsSecretRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest} message UpdateUserWorkloadsSecretRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserWorkloadsSecretRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.userWorkloadsSecret = null; + if (message.userWorkloadsSecret != null && message.hasOwnProperty("userWorkloadsSecret")) + object.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.toObject(message.userWorkloadsSecret, options); + return object; + }; + + /** + * Converts this UpdateUserWorkloadsSecretRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateUserWorkloadsSecretRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserWorkloadsSecretRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserWorkloadsSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest"; + }; + + return UpdateUserWorkloadsSecretRequest; + })(); + + v1.DeleteUserWorkloadsSecretRequest = (function() { + + /** + * Properties of a DeleteUserWorkloadsSecretRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IDeleteUserWorkloadsSecretRequest + * @property {string|null} [name] DeleteUserWorkloadsSecretRequest name + */ + + /** + * Constructs a new DeleteUserWorkloadsSecretRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a DeleteUserWorkloadsSecretRequest. + * @implements IDeleteUserWorkloadsSecretRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest=} [properties] Properties to set + */ + function DeleteUserWorkloadsSecretRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteUserWorkloadsSecretRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest + * @instance + */ + DeleteUserWorkloadsSecretRequest.prototype.name = ""; + + /** + * Creates a new DeleteUserWorkloadsSecretRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest} DeleteUserWorkloadsSecretRequest instance + */ + DeleteUserWorkloadsSecretRequest.create = function create(properties) { + return new DeleteUserWorkloadsSecretRequest(properties); + }; + + /** + * Encodes the specified DeleteUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest} message DeleteUserWorkloadsSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteUserWorkloadsSecretRequest.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 DeleteUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest} message DeleteUserWorkloadsSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteUserWorkloadsSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteUserWorkloadsSecretRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest} DeleteUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteUserWorkloadsSecretRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest} DeleteUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteUserWorkloadsSecretRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteUserWorkloadsSecretRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteUserWorkloadsSecretRequest.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 DeleteUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest} DeleteUserWorkloadsSecretRequest + */ + DeleteUserWorkloadsSecretRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteUserWorkloadsSecretRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest} message DeleteUserWorkloadsSecretRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteUserWorkloadsSecretRequest.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 DeleteUserWorkloadsSecretRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteUserWorkloadsSecretRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteUserWorkloadsSecretRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteUserWorkloadsSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest"; + }; + + return DeleteUserWorkloadsSecretRequest; + })(); + + v1.CreateUserWorkloadsConfigMapRequest = (function() { + + /** + * Properties of a CreateUserWorkloadsConfigMapRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface ICreateUserWorkloadsConfigMapRequest + * @property {string|null} [parent] CreateUserWorkloadsConfigMapRequest parent + * @property {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null} [userWorkloadsConfigMap] CreateUserWorkloadsConfigMapRequest userWorkloadsConfigMap + */ + + /** + * Constructs a new CreateUserWorkloadsConfigMapRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a CreateUserWorkloadsConfigMapRequest. + * @implements ICreateUserWorkloadsConfigMapRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest=} [properties] Properties to set + */ + function CreateUserWorkloadsConfigMapRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserWorkloadsConfigMapRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest + * @instance + */ + CreateUserWorkloadsConfigMapRequest.prototype.parent = ""; + + /** + * CreateUserWorkloadsConfigMapRequest userWorkloadsConfigMap. + * @member {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null|undefined} userWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest + * @instance + */ + CreateUserWorkloadsConfigMapRequest.prototype.userWorkloadsConfigMap = null; + + /** + * Creates a new CreateUserWorkloadsConfigMapRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest} CreateUserWorkloadsConfigMapRequest instance + */ + CreateUserWorkloadsConfigMapRequest.create = function create(properties) { + return new CreateUserWorkloadsConfigMapRequest(properties); + }; + + /** + * Encodes the specified CreateUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest} message CreateUserWorkloadsConfigMapRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserWorkloadsConfigMapRequest.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.userWorkloadsConfigMap != null && Object.hasOwnProperty.call(message, "userWorkloadsConfigMap")) + $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.encode(message.userWorkloadsConfigMap, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest} message CreateUserWorkloadsConfigMapRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserWorkloadsConfigMapRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserWorkloadsConfigMapRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest} CreateUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserWorkloadsConfigMapRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest} CreateUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserWorkloadsConfigMapRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserWorkloadsConfigMapRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserWorkloadsConfigMapRequest.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.userWorkloadsConfigMap != null && message.hasOwnProperty("userWorkloadsConfigMap")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.verify(message.userWorkloadsConfigMap); + if (error) + return "userWorkloadsConfigMap." + error; + } + return null; + }; + + /** + * Creates a CreateUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest} CreateUserWorkloadsConfigMapRequest + */ + CreateUserWorkloadsConfigMapRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.userWorkloadsConfigMap != null) { + if (typeof object.userWorkloadsConfigMap !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest.userWorkloadsConfigMap: object expected"); + message.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.fromObject(object.userWorkloadsConfigMap); + } + return message; + }; + + /** + * Creates a plain object from a CreateUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest} message CreateUserWorkloadsConfigMapRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserWorkloadsConfigMapRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.userWorkloadsConfigMap = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.userWorkloadsConfigMap != null && message.hasOwnProperty("userWorkloadsConfigMap")) + object.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.toObject(message.userWorkloadsConfigMap, options); + return object; + }; + + /** + * Converts this CreateUserWorkloadsConfigMapRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest + * @instance + * @returns {Object.} JSON object + */ + CreateUserWorkloadsConfigMapRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserWorkloadsConfigMapRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserWorkloadsConfigMapRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest"; + }; + + return CreateUserWorkloadsConfigMapRequest; + })(); + + v1.GetUserWorkloadsConfigMapRequest = (function() { + + /** + * Properties of a GetUserWorkloadsConfigMapRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IGetUserWorkloadsConfigMapRequest + * @property {string|null} [name] GetUserWorkloadsConfigMapRequest name + */ + + /** + * Constructs a new GetUserWorkloadsConfigMapRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a GetUserWorkloadsConfigMapRequest. + * @implements IGetUserWorkloadsConfigMapRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest=} [properties] Properties to set + */ + function GetUserWorkloadsConfigMapRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetUserWorkloadsConfigMapRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest + * @instance + */ + GetUserWorkloadsConfigMapRequest.prototype.name = ""; + + /** + * Creates a new GetUserWorkloadsConfigMapRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest} GetUserWorkloadsConfigMapRequest instance + */ + GetUserWorkloadsConfigMapRequest.create = function create(properties) { + return new GetUserWorkloadsConfigMapRequest(properties); + }; + + /** + * Encodes the specified GetUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest} message GetUserWorkloadsConfigMapRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserWorkloadsConfigMapRequest.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 GetUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest} message GetUserWorkloadsConfigMapRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserWorkloadsConfigMapRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetUserWorkloadsConfigMapRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest} GetUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserWorkloadsConfigMapRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest} GetUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserWorkloadsConfigMapRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetUserWorkloadsConfigMapRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetUserWorkloadsConfigMapRequest.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 GetUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest} GetUserWorkloadsConfigMapRequest + */ + GetUserWorkloadsConfigMapRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest} message GetUserWorkloadsConfigMapRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetUserWorkloadsConfigMapRequest.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 GetUserWorkloadsConfigMapRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest + * @instance + * @returns {Object.} JSON object + */ + GetUserWorkloadsConfigMapRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetUserWorkloadsConfigMapRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetUserWorkloadsConfigMapRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest"; + }; + + return GetUserWorkloadsConfigMapRequest; + })(); + + v1.ListUserWorkloadsConfigMapsRequest = (function() { + + /** + * Properties of a ListUserWorkloadsConfigMapsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IListUserWorkloadsConfigMapsRequest + * @property {string|null} [parent] ListUserWorkloadsConfigMapsRequest parent + * @property {number|null} [pageSize] ListUserWorkloadsConfigMapsRequest pageSize + * @property {string|null} [pageToken] ListUserWorkloadsConfigMapsRequest pageToken + */ + + /** + * Constructs a new ListUserWorkloadsConfigMapsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a ListUserWorkloadsConfigMapsRequest. + * @implements IListUserWorkloadsConfigMapsRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest=} [properties] Properties to set + */ + function ListUserWorkloadsConfigMapsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserWorkloadsConfigMapsRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest + * @instance + */ + ListUserWorkloadsConfigMapsRequest.prototype.parent = ""; + + /** + * ListUserWorkloadsConfigMapsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest + * @instance + */ + ListUserWorkloadsConfigMapsRequest.prototype.pageSize = 0; + + /** + * ListUserWorkloadsConfigMapsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest + * @instance + */ + ListUserWorkloadsConfigMapsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListUserWorkloadsConfigMapsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest} ListUserWorkloadsConfigMapsRequest instance + */ + ListUserWorkloadsConfigMapsRequest.create = function create(properties) { + return new ListUserWorkloadsConfigMapsRequest(properties); + }; + + /** + * Encodes the specified ListUserWorkloadsConfigMapsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest} message ListUserWorkloadsConfigMapsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserWorkloadsConfigMapsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListUserWorkloadsConfigMapsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest} message ListUserWorkloadsConfigMapsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserWorkloadsConfigMapsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserWorkloadsConfigMapsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest} ListUserWorkloadsConfigMapsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserWorkloadsConfigMapsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserWorkloadsConfigMapsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest} ListUserWorkloadsConfigMapsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserWorkloadsConfigMapsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserWorkloadsConfigMapsRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserWorkloadsConfigMapsRequest.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"; + return null; + }; + + /** + * Creates a ListUserWorkloadsConfigMapsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest} ListUserWorkloadsConfigMapsRequest + */ + ListUserWorkloadsConfigMapsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserWorkloadsConfigMapsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest} message ListUserWorkloadsConfigMapsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserWorkloadsConfigMapsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListUserWorkloadsConfigMapsRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest + * @instance + * @returns {Object.} JSON object + */ + ListUserWorkloadsConfigMapsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserWorkloadsConfigMapsRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserWorkloadsConfigMapsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest"; + }; + + return ListUserWorkloadsConfigMapsRequest; + })(); + + v1.UpdateUserWorkloadsConfigMapRequest = (function() { + + /** + * Properties of an UpdateUserWorkloadsConfigMapRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IUpdateUserWorkloadsConfigMapRequest + * @property {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null} [userWorkloadsConfigMap] UpdateUserWorkloadsConfigMapRequest userWorkloadsConfigMap + */ + + /** + * Constructs a new UpdateUserWorkloadsConfigMapRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an UpdateUserWorkloadsConfigMapRequest. + * @implements IUpdateUserWorkloadsConfigMapRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest=} [properties] Properties to set + */ + function UpdateUserWorkloadsConfigMapRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserWorkloadsConfigMapRequest userWorkloadsConfigMap. + * @member {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null|undefined} userWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest + * @instance + */ + UpdateUserWorkloadsConfigMapRequest.prototype.userWorkloadsConfigMap = null; + + /** + * Creates a new UpdateUserWorkloadsConfigMapRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest} UpdateUserWorkloadsConfigMapRequest instance + */ + UpdateUserWorkloadsConfigMapRequest.create = function create(properties) { + return new UpdateUserWorkloadsConfigMapRequest(properties); + }; + + /** + * Encodes the specified UpdateUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest} message UpdateUserWorkloadsConfigMapRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserWorkloadsConfigMapRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userWorkloadsConfigMap != null && Object.hasOwnProperty.call(message, "userWorkloadsConfigMap")) + $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.encode(message.userWorkloadsConfigMap, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest} message UpdateUserWorkloadsConfigMapRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserWorkloadsConfigMapRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserWorkloadsConfigMapRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest} UpdateUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserWorkloadsConfigMapRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest} UpdateUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserWorkloadsConfigMapRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserWorkloadsConfigMapRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserWorkloadsConfigMapRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userWorkloadsConfigMap != null && message.hasOwnProperty("userWorkloadsConfigMap")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.verify(message.userWorkloadsConfigMap); + if (error) + return "userWorkloadsConfigMap." + error; + } + return null; + }; + + /** + * Creates an UpdateUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest} UpdateUserWorkloadsConfigMapRequest + */ + UpdateUserWorkloadsConfigMapRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest(); + if (object.userWorkloadsConfigMap != null) { + if (typeof object.userWorkloadsConfigMap !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest.userWorkloadsConfigMap: object expected"); + message.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.fromObject(object.userWorkloadsConfigMap); + } + return message; + }; + + /** + * Creates a plain object from an UpdateUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest} message UpdateUserWorkloadsConfigMapRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserWorkloadsConfigMapRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.userWorkloadsConfigMap = null; + if (message.userWorkloadsConfigMap != null && message.hasOwnProperty("userWorkloadsConfigMap")) + object.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.toObject(message.userWorkloadsConfigMap, options); + return object; + }; + + /** + * Converts this UpdateUserWorkloadsConfigMapRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateUserWorkloadsConfigMapRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserWorkloadsConfigMapRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserWorkloadsConfigMapRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest"; + }; + + return UpdateUserWorkloadsConfigMapRequest; + })(); + + v1.DeleteUserWorkloadsConfigMapRequest = (function() { + + /** + * Properties of a DeleteUserWorkloadsConfigMapRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IDeleteUserWorkloadsConfigMapRequest + * @property {string|null} [name] DeleteUserWorkloadsConfigMapRequest name + */ + + /** + * Constructs a new DeleteUserWorkloadsConfigMapRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a DeleteUserWorkloadsConfigMapRequest. + * @implements IDeleteUserWorkloadsConfigMapRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest=} [properties] Properties to set + */ + function DeleteUserWorkloadsConfigMapRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteUserWorkloadsConfigMapRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest + * @instance + */ + DeleteUserWorkloadsConfigMapRequest.prototype.name = ""; + + /** + * Creates a new DeleteUserWorkloadsConfigMapRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest} DeleteUserWorkloadsConfigMapRequest instance + */ + DeleteUserWorkloadsConfigMapRequest.create = function create(properties) { + return new DeleteUserWorkloadsConfigMapRequest(properties); + }; + + /** + * Encodes the specified DeleteUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest} message DeleteUserWorkloadsConfigMapRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteUserWorkloadsConfigMapRequest.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 DeleteUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest} message DeleteUserWorkloadsConfigMapRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteUserWorkloadsConfigMapRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteUserWorkloadsConfigMapRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest} DeleteUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteUserWorkloadsConfigMapRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest} DeleteUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteUserWorkloadsConfigMapRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteUserWorkloadsConfigMapRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteUserWorkloadsConfigMapRequest.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 DeleteUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest} DeleteUserWorkloadsConfigMapRequest + */ + DeleteUserWorkloadsConfigMapRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest} message DeleteUserWorkloadsConfigMapRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteUserWorkloadsConfigMapRequest.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 DeleteUserWorkloadsConfigMapRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteUserWorkloadsConfigMapRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteUserWorkloadsConfigMapRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteUserWorkloadsConfigMapRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest"; + }; + + return DeleteUserWorkloadsConfigMapRequest; + })(); + + v1.UserWorkloadsSecret = (function() { + + /** + * Properties of a UserWorkloadsSecret. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IUserWorkloadsSecret + * @property {string|null} [name] UserWorkloadsSecret name + * @property {Object.|null} [data] UserWorkloadsSecret data + */ + + /** + * Constructs a new UserWorkloadsSecret. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a UserWorkloadsSecret. + * @implements IUserWorkloadsSecret + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret=} [properties] Properties to set + */ + function UserWorkloadsSecret(properties) { + this.data = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserWorkloadsSecret name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret + * @instance + */ + UserWorkloadsSecret.prototype.name = ""; + + /** + * UserWorkloadsSecret data. + * @member {Object.} data + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret + * @instance + */ + UserWorkloadsSecret.prototype.data = $util.emptyObject; + + /** + * Creates a new UserWorkloadsSecret instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} UserWorkloadsSecret instance + */ + UserWorkloadsSecret.create = function create(properties) { + return new UserWorkloadsSecret(properties); + }; + + /** + * Encodes the specified UserWorkloadsSecret message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret} message UserWorkloadsSecret message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserWorkloadsSecret.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.data != null && Object.hasOwnProperty.call(message, "data")) + for (var keys = Object.keys(message.data), 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.data[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserWorkloadsSecret message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret} message UserWorkloadsSecret message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserWorkloadsSecret.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserWorkloadsSecret message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} UserWorkloadsSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserWorkloadsSecret.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (message.data === $util.emptyObject) + message.data = {}; + 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.data[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserWorkloadsSecret message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} UserWorkloadsSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserWorkloadsSecret.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserWorkloadsSecret message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserWorkloadsSecret.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.data != null && message.hasOwnProperty("data")) { + if (!$util.isObject(message.data)) + return "data: object expected"; + var key = Object.keys(message.data); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.data[key[i]])) + return "data: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a UserWorkloadsSecret message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} UserWorkloadsSecret + */ + UserWorkloadsSecret.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret(); + if (object.name != null) + message.name = String(object.name); + if (object.data) { + if (typeof object.data !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.data: object expected"); + message.data = {}; + for (var keys = Object.keys(object.data), i = 0; i < keys.length; ++i) + message.data[keys[i]] = String(object.data[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a UserWorkloadsSecret message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret + * @static + * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} message UserWorkloadsSecret + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserWorkloadsSecret.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.data = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + var keys2; + if (message.data && (keys2 = Object.keys(message.data)).length) { + object.data = {}; + for (var j = 0; j < keys2.length; ++j) + object.data[keys2[j]] = message.data[keys2[j]]; + } + return object; + }; + + /** + * Converts this UserWorkloadsSecret to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret + * @instance + * @returns {Object.} JSON object + */ + UserWorkloadsSecret.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserWorkloadsSecret + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserWorkloadsSecret.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret"; + }; + + return UserWorkloadsSecret; + })(); + + v1.ListUserWorkloadsSecretsResponse = (function() { + + /** + * Properties of a ListUserWorkloadsSecretsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IListUserWorkloadsSecretsResponse + * @property {Array.|null} [userWorkloadsSecrets] ListUserWorkloadsSecretsResponse userWorkloadsSecrets + * @property {string|null} [nextPageToken] ListUserWorkloadsSecretsResponse nextPageToken + */ + + /** + * Constructs a new ListUserWorkloadsSecretsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a ListUserWorkloadsSecretsResponse. + * @implements IListUserWorkloadsSecretsResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse=} [properties] Properties to set + */ + function ListUserWorkloadsSecretsResponse(properties) { + this.userWorkloadsSecrets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserWorkloadsSecretsResponse userWorkloadsSecrets. + * @member {Array.} userWorkloadsSecrets + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse + * @instance + */ + ListUserWorkloadsSecretsResponse.prototype.userWorkloadsSecrets = $util.emptyArray; + + /** + * ListUserWorkloadsSecretsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse + * @instance + */ + ListUserWorkloadsSecretsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListUserWorkloadsSecretsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse} ListUserWorkloadsSecretsResponse instance + */ + ListUserWorkloadsSecretsResponse.create = function create(properties) { + return new ListUserWorkloadsSecretsResponse(properties); + }; + + /** + * Encodes the specified ListUserWorkloadsSecretsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse} message ListUserWorkloadsSecretsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserWorkloadsSecretsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userWorkloadsSecrets != null && message.userWorkloadsSecrets.length) + for (var i = 0; i < message.userWorkloadsSecrets.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.encode(message.userWorkloadsSecrets[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 ListUserWorkloadsSecretsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse} message ListUserWorkloadsSecretsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserWorkloadsSecretsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserWorkloadsSecretsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse} ListUserWorkloadsSecretsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserWorkloadsSecretsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.userWorkloadsSecrets && message.userWorkloadsSecrets.length)) + message.userWorkloadsSecrets = []; + message.userWorkloadsSecrets.push($root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserWorkloadsSecretsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse} ListUserWorkloadsSecretsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserWorkloadsSecretsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserWorkloadsSecretsResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserWorkloadsSecretsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userWorkloadsSecrets != null && message.hasOwnProperty("userWorkloadsSecrets")) { + if (!Array.isArray(message.userWorkloadsSecrets)) + return "userWorkloadsSecrets: array expected"; + for (var i = 0; i < message.userWorkloadsSecrets.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.verify(message.userWorkloadsSecrets[i]); + if (error) + return "userWorkloadsSecrets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListUserWorkloadsSecretsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse} ListUserWorkloadsSecretsResponse + */ + ListUserWorkloadsSecretsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse(); + if (object.userWorkloadsSecrets) { + if (!Array.isArray(object.userWorkloadsSecrets)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse.userWorkloadsSecrets: array expected"); + message.userWorkloadsSecrets = []; + for (var i = 0; i < object.userWorkloadsSecrets.length; ++i) { + if (typeof object.userWorkloadsSecrets[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse.userWorkloadsSecrets: object expected"); + message.userWorkloadsSecrets[i] = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.fromObject(object.userWorkloadsSecrets[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserWorkloadsSecretsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse} message ListUserWorkloadsSecretsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserWorkloadsSecretsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userWorkloadsSecrets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.userWorkloadsSecrets && message.userWorkloadsSecrets.length) { + object.userWorkloadsSecrets = []; + for (var j = 0; j < message.userWorkloadsSecrets.length; ++j) + object.userWorkloadsSecrets[j] = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.toObject(message.userWorkloadsSecrets[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListUserWorkloadsSecretsResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse + * @instance + * @returns {Object.} JSON object + */ + ListUserWorkloadsSecretsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserWorkloadsSecretsResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserWorkloadsSecretsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse"; + }; + + return ListUserWorkloadsSecretsResponse; + })(); + + v1.UserWorkloadsConfigMap = (function() { + + /** + * Properties of a UserWorkloadsConfigMap. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IUserWorkloadsConfigMap + * @property {string|null} [name] UserWorkloadsConfigMap name + * @property {Object.|null} [data] UserWorkloadsConfigMap data + */ + + /** + * Constructs a new UserWorkloadsConfigMap. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a UserWorkloadsConfigMap. + * @implements IUserWorkloadsConfigMap + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap=} [properties] Properties to set + */ + function UserWorkloadsConfigMap(properties) { + this.data = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserWorkloadsConfigMap name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap + * @instance + */ + UserWorkloadsConfigMap.prototype.name = ""; + + /** + * UserWorkloadsConfigMap data. + * @member {Object.} data + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap + * @instance + */ + UserWorkloadsConfigMap.prototype.data = $util.emptyObject; + + /** + * Creates a new UserWorkloadsConfigMap instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} UserWorkloadsConfigMap instance + */ + UserWorkloadsConfigMap.create = function create(properties) { + return new UserWorkloadsConfigMap(properties); + }; + + /** + * Encodes the specified UserWorkloadsConfigMap message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap} message UserWorkloadsConfigMap message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserWorkloadsConfigMap.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.data != null && Object.hasOwnProperty.call(message, "data")) + for (var keys = Object.keys(message.data), 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.data[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserWorkloadsConfigMap message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap} message UserWorkloadsConfigMap message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserWorkloadsConfigMap.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserWorkloadsConfigMap message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} UserWorkloadsConfigMap + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserWorkloadsConfigMap.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (message.data === $util.emptyObject) + message.data = {}; + 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.data[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserWorkloadsConfigMap message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} UserWorkloadsConfigMap + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserWorkloadsConfigMap.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserWorkloadsConfigMap message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserWorkloadsConfigMap.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.data != null && message.hasOwnProperty("data")) { + if (!$util.isObject(message.data)) + return "data: object expected"; + var key = Object.keys(message.data); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.data[key[i]])) + return "data: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a UserWorkloadsConfigMap message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} UserWorkloadsConfigMap + */ + UserWorkloadsConfigMap.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap(); + if (object.name != null) + message.name = String(object.name); + if (object.data) { + if (typeof object.data !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.data: object expected"); + message.data = {}; + for (var keys = Object.keys(object.data), i = 0; i < keys.length; ++i) + message.data[keys[i]] = String(object.data[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a UserWorkloadsConfigMap message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap + * @static + * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} message UserWorkloadsConfigMap + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserWorkloadsConfigMap.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.data = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + var keys2; + if (message.data && (keys2 = Object.keys(message.data)).length) { + object.data = {}; + for (var j = 0; j < keys2.length; ++j) + object.data[keys2[j]] = message.data[keys2[j]]; + } + return object; + }; + + /** + * Converts this UserWorkloadsConfigMap to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap + * @instance + * @returns {Object.} JSON object + */ + UserWorkloadsConfigMap.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserWorkloadsConfigMap + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserWorkloadsConfigMap.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap"; + }; + + return UserWorkloadsConfigMap; + })(); + + v1.ListUserWorkloadsConfigMapsResponse = (function() { + + /** + * Properties of a ListUserWorkloadsConfigMapsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IListUserWorkloadsConfigMapsResponse + * @property {Array.|null} [userWorkloadsConfigMaps] ListUserWorkloadsConfigMapsResponse userWorkloadsConfigMaps + * @property {string|null} [nextPageToken] ListUserWorkloadsConfigMapsResponse nextPageToken + */ + + /** + * Constructs a new ListUserWorkloadsConfigMapsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a ListUserWorkloadsConfigMapsResponse. + * @implements IListUserWorkloadsConfigMapsResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse=} [properties] Properties to set + */ + function ListUserWorkloadsConfigMapsResponse(properties) { + this.userWorkloadsConfigMaps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserWorkloadsConfigMapsResponse userWorkloadsConfigMaps. + * @member {Array.} userWorkloadsConfigMaps + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse + * @instance + */ + ListUserWorkloadsConfigMapsResponse.prototype.userWorkloadsConfigMaps = $util.emptyArray; + + /** + * ListUserWorkloadsConfigMapsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse + * @instance + */ + ListUserWorkloadsConfigMapsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListUserWorkloadsConfigMapsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse} ListUserWorkloadsConfigMapsResponse instance + */ + ListUserWorkloadsConfigMapsResponse.create = function create(properties) { + return new ListUserWorkloadsConfigMapsResponse(properties); + }; + + /** + * Encodes the specified ListUserWorkloadsConfigMapsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse} message ListUserWorkloadsConfigMapsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserWorkloadsConfigMapsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userWorkloadsConfigMaps != null && message.userWorkloadsConfigMaps.length) + for (var i = 0; i < message.userWorkloadsConfigMaps.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.encode(message.userWorkloadsConfigMaps[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 ListUserWorkloadsConfigMapsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse} message ListUserWorkloadsConfigMapsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserWorkloadsConfigMapsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserWorkloadsConfigMapsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse} ListUserWorkloadsConfigMapsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserWorkloadsConfigMapsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.userWorkloadsConfigMaps && message.userWorkloadsConfigMaps.length)) + message.userWorkloadsConfigMaps = []; + message.userWorkloadsConfigMaps.push($root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserWorkloadsConfigMapsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse} ListUserWorkloadsConfigMapsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserWorkloadsConfigMapsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserWorkloadsConfigMapsResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserWorkloadsConfigMapsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userWorkloadsConfigMaps != null && message.hasOwnProperty("userWorkloadsConfigMaps")) { + if (!Array.isArray(message.userWorkloadsConfigMaps)) + return "userWorkloadsConfigMaps: array expected"; + for (var i = 0; i < message.userWorkloadsConfigMaps.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.verify(message.userWorkloadsConfigMaps[i]); + if (error) + return "userWorkloadsConfigMaps." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListUserWorkloadsConfigMapsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse} ListUserWorkloadsConfigMapsResponse + */ + ListUserWorkloadsConfigMapsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse(); + if (object.userWorkloadsConfigMaps) { + if (!Array.isArray(object.userWorkloadsConfigMaps)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse.userWorkloadsConfigMaps: array expected"); + message.userWorkloadsConfigMaps = []; + for (var i = 0; i < object.userWorkloadsConfigMaps.length; ++i) { + if (typeof object.userWorkloadsConfigMaps[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse.userWorkloadsConfigMaps: object expected"); + message.userWorkloadsConfigMaps[i] = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.fromObject(object.userWorkloadsConfigMaps[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserWorkloadsConfigMapsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse} message ListUserWorkloadsConfigMapsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserWorkloadsConfigMapsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userWorkloadsConfigMaps = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.userWorkloadsConfigMaps && message.userWorkloadsConfigMaps.length) { + object.userWorkloadsConfigMaps = []; + for (var j = 0; j < message.userWorkloadsConfigMaps.length; ++j) + object.userWorkloadsConfigMaps[j] = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.toObject(message.userWorkloadsConfigMaps[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListUserWorkloadsConfigMapsResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse + * @instance + * @returns {Object.} JSON object + */ + ListUserWorkloadsConfigMapsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserWorkloadsConfigMapsResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserWorkloadsConfigMapsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse"; + }; + + return ListUserWorkloadsConfigMapsResponse; + })(); + + v1.ListWorkloadsRequest = (function() { + + /** + * Properties of a ListWorkloadsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IListWorkloadsRequest + * @property {string|null} [parent] ListWorkloadsRequest parent + * @property {number|null} [pageSize] ListWorkloadsRequest pageSize + * @property {string|null} [pageToken] ListWorkloadsRequest pageToken + * @property {string|null} [filter] ListWorkloadsRequest filter + */ + + /** + * Constructs a new ListWorkloadsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a ListWorkloadsRequest. + * @implements IListWorkloadsRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest=} [properties] Properties to set + */ + function ListWorkloadsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkloadsRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest + * @instance + */ + ListWorkloadsRequest.prototype.parent = ""; + + /** + * ListWorkloadsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest + * @instance + */ + ListWorkloadsRequest.prototype.pageSize = 0; + + /** + * ListWorkloadsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest + * @instance + */ + ListWorkloadsRequest.prototype.pageToken = ""; + + /** + * ListWorkloadsRequest filter. + * @member {string} filter + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest + * @instance + */ + ListWorkloadsRequest.prototype.filter = ""; + + /** + * Creates a new ListWorkloadsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest} ListWorkloadsRequest instance + */ + ListWorkloadsRequest.create = function create(properties) { + return new ListWorkloadsRequest(properties); + }; + + /** + * Encodes the specified ListWorkloadsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest} message ListWorkloadsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkloadsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListWorkloadsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest} message ListWorkloadsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkloadsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkloadsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest} ListWorkloadsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkloadsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkloadsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest} ListWorkloadsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkloadsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkloadsRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkloadsRequest.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"; + return null; + }; + + /** + * Creates a ListWorkloadsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest} ListWorkloadsRequest + */ + ListWorkloadsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListWorkloadsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest} message ListWorkloadsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkloadsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListWorkloadsRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest + * @instance + * @returns {Object.} JSON object + */ + ListWorkloadsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListWorkloadsRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkloadsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest"; + }; + + return ListWorkloadsRequest; + })(); + + v1.ListWorkloadsResponse = (function() { + + /** + * Properties of a ListWorkloadsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IListWorkloadsResponse + * @property {Array.|null} [workloads] ListWorkloadsResponse workloads + * @property {string|null} [nextPageToken] ListWorkloadsResponse nextPageToken + */ + + /** + * Constructs a new ListWorkloadsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a ListWorkloadsResponse. + * @implements IListWorkloadsResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse=} [properties] Properties to set + */ + function ListWorkloadsResponse(properties) { + this.workloads = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkloadsResponse workloads. + * @member {Array.} workloads + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + * @instance + */ + ListWorkloadsResponse.prototype.workloads = $util.emptyArray; + + /** + * ListWorkloadsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + * @instance + */ + ListWorkloadsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListWorkloadsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse} ListWorkloadsResponse instance + */ + ListWorkloadsResponse.create = function create(properties) { + return new ListWorkloadsResponse(properties); + }; + + /** + * Encodes the specified ListWorkloadsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse} message ListWorkloadsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkloadsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workloads != null && message.workloads.length) + for (var i = 0; i < message.workloads.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.encode(message.workloads[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 ListWorkloadsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse} message ListWorkloadsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkloadsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkloadsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse} ListWorkloadsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkloadsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.workloads && message.workloads.length)) + message.workloads = []; + message.workloads.push($root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkloadsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse} ListWorkloadsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkloadsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkloadsResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkloadsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workloads != null && message.hasOwnProperty("workloads")) { + if (!Array.isArray(message.workloads)) + return "workloads: array expected"; + for (var i = 0; i < message.workloads.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.verify(message.workloads[i]); + if (error) + return "workloads." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListWorkloadsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse} ListWorkloadsResponse + */ + ListWorkloadsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse(); + if (object.workloads) { + if (!Array.isArray(object.workloads)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.workloads: array expected"); + message.workloads = []; + for (var i = 0; i < object.workloads.length; ++i) { + if (typeof object.workloads[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.workloads: object expected"); + message.workloads[i] = $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.fromObject(object.workloads[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListWorkloadsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse} message ListWorkloadsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkloadsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.workloads = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.workloads && message.workloads.length) { + object.workloads = []; + for (var j = 0; j < message.workloads.length; ++j) + object.workloads[j] = $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.toObject(message.workloads[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListWorkloadsResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + * @instance + * @returns {Object.} JSON object + */ + ListWorkloadsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListWorkloadsResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkloadsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse"; + }; + + ListWorkloadsResponse.ComposerWorkload = (function() { + + /** + * Properties of a ComposerWorkload. + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + * @interface IComposerWorkload + * @property {string|null} [name] ComposerWorkload name + * @property {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType|null} [type] ComposerWorkload type + * @property {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus|null} [status] ComposerWorkload status + */ + + /** + * Constructs a new ComposerWorkload. + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + * @classdesc Represents a ComposerWorkload. + * @implements IComposerWorkload + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload=} [properties] Properties to set + */ + function ComposerWorkload(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComposerWorkload name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload + * @instance + */ + ComposerWorkload.prototype.name = ""; + + /** + * ComposerWorkload type. + * @member {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType} type + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload + * @instance + */ + ComposerWorkload.prototype.type = 0; + + /** + * ComposerWorkload status. + * @member {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus|null|undefined} status + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload + * @instance + */ + ComposerWorkload.prototype.status = null; + + /** + * Creates a new ComposerWorkload instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload} ComposerWorkload instance + */ + ComposerWorkload.create = function create(properties) { + return new ComposerWorkload(properties); + }; + + /** + * Encodes the specified ComposerWorkload message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload} message ComposerWorkload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComposerWorkload.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.status != null && Object.hasOwnProperty.call(message, "status")) + $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.encode(message.status, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ComposerWorkload message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload} message ComposerWorkload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComposerWorkload.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComposerWorkload message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload} ComposerWorkload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComposerWorkload.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.status = $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComposerWorkload message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload} ComposerWorkload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComposerWorkload.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComposerWorkload message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComposerWorkload.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: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.verify(message.status); + if (error) + return "status." + error; + } + return null; + }; + + /** + * Creates a ComposerWorkload message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload} ComposerWorkload + */ + ComposerWorkload.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload(); + 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 "COMPOSER_WORKLOAD_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "CELERY_WORKER": + case 1: + message.type = 1; + break; + case "KUBERNETES_WORKER": + case 2: + message.type = 2; + break; + case "KUBERNETES_OPERATOR_POD": + case 3: + message.type = 3; + break; + case "SCHEDULER": + case 4: + message.type = 4; + break; + case "DAG_PROCESSOR": + case 5: + message.type = 5; + break; + case "TRIGGERER": + case 6: + message.type = 6; + break; + case "WEB_SERVER": + case 7: + message.type = 7; + break; + case "REDIS": + case 8: + message.type = 8; + break; + } + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.status: object expected"); + message.status = $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.fromObject(object.status); + } + return message; + }; + + /** + * Creates a plain object from a ComposerWorkload message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload} message ComposerWorkload + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComposerWorkload.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "COMPOSER_WORKLOAD_TYPE_UNSPECIFIED" : 0; + object.status = null; + } + 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.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType[message.type] === undefined ? message.type : $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType[message.type] : message.type; + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.toObject(message.status, options); + return object; + }; + + /** + * Converts this ComposerWorkload to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload + * @instance + * @returns {Object.} JSON object + */ + ComposerWorkload.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComposerWorkload + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComposerWorkload.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload"; + }; + + return ComposerWorkload; + })(); + + /** + * ComposerWorkloadType enum. + * @name google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType + * @enum {number} + * @property {number} COMPOSER_WORKLOAD_TYPE_UNSPECIFIED=0 COMPOSER_WORKLOAD_TYPE_UNSPECIFIED value + * @property {number} CELERY_WORKER=1 CELERY_WORKER value + * @property {number} KUBERNETES_WORKER=2 KUBERNETES_WORKER value + * @property {number} KUBERNETES_OPERATOR_POD=3 KUBERNETES_OPERATOR_POD value + * @property {number} SCHEDULER=4 SCHEDULER value + * @property {number} DAG_PROCESSOR=5 DAG_PROCESSOR value + * @property {number} TRIGGERER=6 TRIGGERER value + * @property {number} WEB_SERVER=7 WEB_SERVER value + * @property {number} REDIS=8 REDIS value + */ + ListWorkloadsResponse.ComposerWorkloadType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPOSER_WORKLOAD_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CELERY_WORKER"] = 1; + values[valuesById[2] = "KUBERNETES_WORKER"] = 2; + values[valuesById[3] = "KUBERNETES_OPERATOR_POD"] = 3; + values[valuesById[4] = "SCHEDULER"] = 4; + values[valuesById[5] = "DAG_PROCESSOR"] = 5; + values[valuesById[6] = "TRIGGERER"] = 6; + values[valuesById[7] = "WEB_SERVER"] = 7; + values[valuesById[8] = "REDIS"] = 8; + return values; + })(); + + ListWorkloadsResponse.ComposerWorkloadStatus = (function() { + + /** + * Properties of a ComposerWorkloadStatus. + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + * @interface IComposerWorkloadStatus + * @property {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState|null} [state] ComposerWorkloadStatus state + * @property {string|null} [statusMessage] ComposerWorkloadStatus statusMessage + * @property {string|null} [detailedStatusMessage] ComposerWorkloadStatus detailedStatusMessage + */ + + /** + * Constructs a new ComposerWorkloadStatus. + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse + * @classdesc Represents a ComposerWorkloadStatus. + * @implements IComposerWorkloadStatus + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus=} [properties] Properties to set + */ + function ComposerWorkloadStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComposerWorkloadStatus state. + * @member {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState} state + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus + * @instance + */ + ComposerWorkloadStatus.prototype.state = 0; + + /** + * ComposerWorkloadStatus statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus + * @instance + */ + ComposerWorkloadStatus.prototype.statusMessage = ""; + + /** + * ComposerWorkloadStatus detailedStatusMessage. + * @member {string} detailedStatusMessage + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus + * @instance + */ + ComposerWorkloadStatus.prototype.detailedStatusMessage = ""; + + /** + * Creates a new ComposerWorkloadStatus instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus} ComposerWorkloadStatus instance + */ + ComposerWorkloadStatus.create = function create(properties) { + return new ComposerWorkloadStatus(properties); + }; + + /** + * Encodes the specified ComposerWorkloadStatus message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus} message ComposerWorkloadStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComposerWorkloadStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.statusMessage); + if (message.detailedStatusMessage != null && Object.hasOwnProperty.call(message, "detailedStatusMessage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.detailedStatusMessage); + return writer; + }; + + /** + * Encodes the specified ComposerWorkloadStatus message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus} message ComposerWorkloadStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComposerWorkloadStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComposerWorkloadStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus} ComposerWorkloadStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComposerWorkloadStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.statusMessage = reader.string(); + break; + } + case 3: { + message.detailedStatusMessage = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComposerWorkloadStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus} ComposerWorkloadStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComposerWorkloadStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComposerWorkloadStatus message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComposerWorkloadStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.detailedStatusMessage != null && message.hasOwnProperty("detailedStatusMessage")) + if (!$util.isString(message.detailedStatusMessage)) + return "detailedStatusMessage: string expected"; + return null; + }; + + /** + * Creates a ComposerWorkloadStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus} ComposerWorkloadStatus + */ + ComposerWorkloadStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "COMPOSER_WORKLOAD_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "OK": + case 2: + message.state = 2; + break; + case "WARNING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + case "SUCCEEDED": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + } + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.detailedStatusMessage != null) + message.detailedStatusMessage = String(object.detailedStatusMessage); + return message; + }; + + /** + * Creates a plain object from a ComposerWorkloadStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus} message ComposerWorkloadStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComposerWorkloadStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "COMPOSER_WORKLOAD_STATE_UNSPECIFIED" : 0; + object.statusMessage = ""; + object.detailedStatusMessage = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState[message.state] === undefined ? message.state : $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState[message.state] : message.state; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.detailedStatusMessage != null && message.hasOwnProperty("detailedStatusMessage")) + object.detailedStatusMessage = message.detailedStatusMessage; + return object; + }; + + /** + * Converts this ComposerWorkloadStatus to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus + * @instance + * @returns {Object.} JSON object + */ + ComposerWorkloadStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComposerWorkloadStatus + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComposerWorkloadStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus"; + }; + + return ComposerWorkloadStatus; + })(); + + /** + * ComposerWorkloadState enum. + * @name google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState + * @enum {number} + * @property {number} COMPOSER_WORKLOAD_STATE_UNSPECIFIED=0 COMPOSER_WORKLOAD_STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} OK=2 OK value + * @property {number} WARNING=3 WARNING value + * @property {number} ERROR=4 ERROR value + * @property {number} SUCCEEDED=5 SUCCEEDED value + * @property {number} FAILED=6 FAILED value + */ + ListWorkloadsResponse.ComposerWorkloadState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPOSER_WORKLOAD_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "OK"] = 2; + values[valuesById[3] = "WARNING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + values[valuesById[5] = "SUCCEEDED"] = 5; + values[valuesById[6] = "FAILED"] = 6; + return values; + })(); + + return ListWorkloadsResponse; + })(); + + v1.SaveSnapshotRequest = (function() { + + /** + * Properties of a SaveSnapshotRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface ISaveSnapshotRequest + * @property {string|null} [environment] SaveSnapshotRequest environment + * @property {string|null} [snapshotLocation] SaveSnapshotRequest snapshotLocation + */ + + /** + * Constructs a new SaveSnapshotRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a SaveSnapshotRequest. + * @implements ISaveSnapshotRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest=} [properties] Properties to set + */ + function SaveSnapshotRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveSnapshotRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest + * @instance + */ + SaveSnapshotRequest.prototype.environment = ""; + + /** + * SaveSnapshotRequest snapshotLocation. + * @member {string} snapshotLocation + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest + * @instance + */ + SaveSnapshotRequest.prototype.snapshotLocation = ""; + + /** + * Creates a new SaveSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest} SaveSnapshotRequest instance + */ + SaveSnapshotRequest.create = function create(properties) { + return new SaveSnapshotRequest(properties); + }; + + /** + * Encodes the specified SaveSnapshotRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest} message SaveSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveSnapshotRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.snapshotLocation != null && Object.hasOwnProperty.call(message, "snapshotLocation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.snapshotLocation); + return writer; + }; + + /** + * Encodes the specified SaveSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest} message SaveSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest} SaveSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveSnapshotRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); + break; + } + case 2: { + message.snapshotLocation = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SaveSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest} SaveSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveSnapshotRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveSnapshotRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.snapshotLocation != null && message.hasOwnProperty("snapshotLocation")) + if (!$util.isString(message.snapshotLocation)) + return "snapshotLocation: string expected"; + return null; + }; + + /** + * Creates a SaveSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest} SaveSnapshotRequest + */ + SaveSnapshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.snapshotLocation != null) + message.snapshotLocation = String(object.snapshotLocation); + return message; + }; + + /** + * Creates a plain object from a SaveSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest} message SaveSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveSnapshotRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = ""; + object.snapshotLocation = ""; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.snapshotLocation != null && message.hasOwnProperty("snapshotLocation")) + object.snapshotLocation = message.snapshotLocation; + return object; + }; + + /** + * Converts this SaveSnapshotRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + SaveSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveSnapshotRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest"; + }; + + return SaveSnapshotRequest; + })(); + + v1.SaveSnapshotResponse = (function() { + + /** + * Properties of a SaveSnapshotResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface ISaveSnapshotResponse + * @property {string|null} [snapshotPath] SaveSnapshotResponse snapshotPath + */ + + /** + * Constructs a new SaveSnapshotResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a SaveSnapshotResponse. + * @implements ISaveSnapshotResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse=} [properties] Properties to set + */ + function SaveSnapshotResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveSnapshotResponse snapshotPath. + * @member {string} snapshotPath + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse + * @instance + */ + SaveSnapshotResponse.prototype.snapshotPath = ""; + + /** + * Creates a new SaveSnapshotResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse} SaveSnapshotResponse instance + */ + SaveSnapshotResponse.create = function create(properties) { + return new SaveSnapshotResponse(properties); + }; + + /** + * Encodes the specified SaveSnapshotResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse} message SaveSnapshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveSnapshotResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshotPath != null && Object.hasOwnProperty.call(message, "snapshotPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.snapshotPath); + return writer; + }; + + /** + * Encodes the specified SaveSnapshotResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse} message SaveSnapshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveSnapshotResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveSnapshotResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse} SaveSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveSnapshotResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.snapshotPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SaveSnapshotResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse} SaveSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveSnapshotResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveSnapshotResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveSnapshotResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.snapshotPath != null && message.hasOwnProperty("snapshotPath")) + if (!$util.isString(message.snapshotPath)) + return "snapshotPath: string expected"; + return null; + }; + + /** + * Creates a SaveSnapshotResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse} SaveSnapshotResponse + */ + SaveSnapshotResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse(); + if (object.snapshotPath != null) + message.snapshotPath = String(object.snapshotPath); + return message; + }; + + /** + * Creates a plain object from a SaveSnapshotResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse} message SaveSnapshotResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveSnapshotResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.snapshotPath = ""; + if (message.snapshotPath != null && message.hasOwnProperty("snapshotPath")) + object.snapshotPath = message.snapshotPath; + return object; + }; + + /** + * Converts this SaveSnapshotResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse + * @instance + * @returns {Object.} JSON object + */ + SaveSnapshotResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveSnapshotResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveSnapshotResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse"; + }; + + return SaveSnapshotResponse; + })(); + + v1.LoadSnapshotRequest = (function() { + + /** + * Properties of a LoadSnapshotRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface ILoadSnapshotRequest + * @property {string|null} [environment] LoadSnapshotRequest environment + * @property {string|null} [snapshotPath] LoadSnapshotRequest snapshotPath + * @property {boolean|null} [skipPypiPackagesInstallation] LoadSnapshotRequest skipPypiPackagesInstallation + * @property {boolean|null} [skipEnvironmentVariablesSetting] LoadSnapshotRequest skipEnvironmentVariablesSetting + * @property {boolean|null} [skipAirflowOverridesSetting] LoadSnapshotRequest skipAirflowOverridesSetting + * @property {boolean|null} [skipGcsDataCopying] LoadSnapshotRequest skipGcsDataCopying + */ + + /** + * Constructs a new LoadSnapshotRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a LoadSnapshotRequest. + * @implements ILoadSnapshotRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest=} [properties] Properties to set + */ + function LoadSnapshotRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadSnapshotRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + * @instance + */ + LoadSnapshotRequest.prototype.environment = ""; + + /** + * LoadSnapshotRequest snapshotPath. + * @member {string} snapshotPath + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + * @instance + */ + LoadSnapshotRequest.prototype.snapshotPath = ""; + + /** + * LoadSnapshotRequest skipPypiPackagesInstallation. + * @member {boolean} skipPypiPackagesInstallation + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + * @instance + */ + LoadSnapshotRequest.prototype.skipPypiPackagesInstallation = false; + + /** + * LoadSnapshotRequest skipEnvironmentVariablesSetting. + * @member {boolean} skipEnvironmentVariablesSetting + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + * @instance + */ + LoadSnapshotRequest.prototype.skipEnvironmentVariablesSetting = false; + + /** + * LoadSnapshotRequest skipAirflowOverridesSetting. + * @member {boolean} skipAirflowOverridesSetting + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + * @instance + */ + LoadSnapshotRequest.prototype.skipAirflowOverridesSetting = false; + + /** + * LoadSnapshotRequest skipGcsDataCopying. + * @member {boolean} skipGcsDataCopying + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + * @instance + */ + LoadSnapshotRequest.prototype.skipGcsDataCopying = false; + + /** + * Creates a new LoadSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest} LoadSnapshotRequest instance + */ + LoadSnapshotRequest.create = function create(properties) { + return new LoadSnapshotRequest(properties); + }; + + /** + * Encodes the specified LoadSnapshotRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest} message LoadSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadSnapshotRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.snapshotPath != null && Object.hasOwnProperty.call(message, "snapshotPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.snapshotPath); + if (message.skipPypiPackagesInstallation != null && Object.hasOwnProperty.call(message, "skipPypiPackagesInstallation")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.skipPypiPackagesInstallation); + if (message.skipEnvironmentVariablesSetting != null && Object.hasOwnProperty.call(message, "skipEnvironmentVariablesSetting")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.skipEnvironmentVariablesSetting); + if (message.skipAirflowOverridesSetting != null && Object.hasOwnProperty.call(message, "skipAirflowOverridesSetting")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.skipAirflowOverridesSetting); + if (message.skipGcsDataCopying != null && Object.hasOwnProperty.call(message, "skipGcsDataCopying")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.skipGcsDataCopying); + return writer; + }; + + /** + * Encodes the specified LoadSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest} message LoadSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest} LoadSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadSnapshotRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); + break; + } + case 2: { + message.snapshotPath = reader.string(); + break; + } + case 3: { + message.skipPypiPackagesInstallation = reader.bool(); + break; + } + case 4: { + message.skipEnvironmentVariablesSetting = reader.bool(); + break; + } + case 5: { + message.skipAirflowOverridesSetting = reader.bool(); + break; + } + case 6: { + message.skipGcsDataCopying = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest} LoadSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadSnapshotRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadSnapshotRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.snapshotPath != null && message.hasOwnProperty("snapshotPath")) + if (!$util.isString(message.snapshotPath)) + return "snapshotPath: string expected"; + if (message.skipPypiPackagesInstallation != null && message.hasOwnProperty("skipPypiPackagesInstallation")) + if (typeof message.skipPypiPackagesInstallation !== "boolean") + return "skipPypiPackagesInstallation: boolean expected"; + if (message.skipEnvironmentVariablesSetting != null && message.hasOwnProperty("skipEnvironmentVariablesSetting")) + if (typeof message.skipEnvironmentVariablesSetting !== "boolean") + return "skipEnvironmentVariablesSetting: boolean expected"; + if (message.skipAirflowOverridesSetting != null && message.hasOwnProperty("skipAirflowOverridesSetting")) + if (typeof message.skipAirflowOverridesSetting !== "boolean") + return "skipAirflowOverridesSetting: boolean expected"; + if (message.skipGcsDataCopying != null && message.hasOwnProperty("skipGcsDataCopying")) + if (typeof message.skipGcsDataCopying !== "boolean") + return "skipGcsDataCopying: boolean expected"; + return null; + }; + + /** + * Creates a LoadSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest} LoadSnapshotRequest + */ + LoadSnapshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.snapshotPath != null) + message.snapshotPath = String(object.snapshotPath); + if (object.skipPypiPackagesInstallation != null) + message.skipPypiPackagesInstallation = Boolean(object.skipPypiPackagesInstallation); + if (object.skipEnvironmentVariablesSetting != null) + message.skipEnvironmentVariablesSetting = Boolean(object.skipEnvironmentVariablesSetting); + if (object.skipAirflowOverridesSetting != null) + message.skipAirflowOverridesSetting = Boolean(object.skipAirflowOverridesSetting); + if (object.skipGcsDataCopying != null) + message.skipGcsDataCopying = Boolean(object.skipGcsDataCopying); + return message; + }; + + /** + * Creates a plain object from a LoadSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest} message LoadSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadSnapshotRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = ""; + object.snapshotPath = ""; + object.skipPypiPackagesInstallation = false; + object.skipEnvironmentVariablesSetting = false; + object.skipAirflowOverridesSetting = false; + object.skipGcsDataCopying = false; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.snapshotPath != null && message.hasOwnProperty("snapshotPath")) + object.snapshotPath = message.snapshotPath; + if (message.skipPypiPackagesInstallation != null && message.hasOwnProperty("skipPypiPackagesInstallation")) + object.skipPypiPackagesInstallation = message.skipPypiPackagesInstallation; + if (message.skipEnvironmentVariablesSetting != null && message.hasOwnProperty("skipEnvironmentVariablesSetting")) + object.skipEnvironmentVariablesSetting = message.skipEnvironmentVariablesSetting; + if (message.skipAirflowOverridesSetting != null && message.hasOwnProperty("skipAirflowOverridesSetting")) + object.skipAirflowOverridesSetting = message.skipAirflowOverridesSetting; + if (message.skipGcsDataCopying != null && message.hasOwnProperty("skipGcsDataCopying")) + object.skipGcsDataCopying = message.skipGcsDataCopying; + return object; + }; + + /** + * Converts this LoadSnapshotRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + LoadSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadSnapshotRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest"; + }; + + return LoadSnapshotRequest; + })(); + + v1.LoadSnapshotResponse = (function() { + + /** + * Properties of a LoadSnapshotResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface ILoadSnapshotResponse + */ + + /** + * Constructs a new LoadSnapshotResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a LoadSnapshotResponse. + * @implements ILoadSnapshotResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse=} [properties] Properties to set + */ + function LoadSnapshotResponse(properties) { + if (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 LoadSnapshotResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse} LoadSnapshotResponse instance + */ + LoadSnapshotResponse.create = function create(properties) { + return new LoadSnapshotResponse(properties); + }; + + /** + * Encodes the specified LoadSnapshotResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse} message LoadSnapshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadSnapshotResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified LoadSnapshotResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse} message LoadSnapshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadSnapshotResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadSnapshotResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse} LoadSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadSnapshotResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadSnapshotResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse} LoadSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadSnapshotResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadSnapshotResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadSnapshotResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a LoadSnapshotResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse} LoadSnapshotResponse + */ + LoadSnapshotResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse) + return object; + return new $root.google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse(); + }; + + /** + * Creates a plain object from a LoadSnapshotResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse} message LoadSnapshotResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadSnapshotResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this LoadSnapshotResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse + * @instance + * @returns {Object.} JSON object + */ + LoadSnapshotResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadSnapshotResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadSnapshotResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse"; + }; + + return LoadSnapshotResponse; + })(); + + v1.DatabaseFailoverRequest = (function() { + + /** + * Properties of a DatabaseFailoverRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IDatabaseFailoverRequest + * @property {string|null} [environment] DatabaseFailoverRequest environment + */ + + /** + * Constructs a new DatabaseFailoverRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a DatabaseFailoverRequest. + * @implements IDatabaseFailoverRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest=} [properties] Properties to set + */ + function DatabaseFailoverRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatabaseFailoverRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + * @instance + */ + DatabaseFailoverRequest.prototype.environment = ""; + + /** + * Creates a new DatabaseFailoverRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest} DatabaseFailoverRequest instance + */ + DatabaseFailoverRequest.create = function create(properties) { + return new DatabaseFailoverRequest(properties); + }; + + /** + * Encodes the specified DatabaseFailoverRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest} message DatabaseFailoverRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseFailoverRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + return writer; + }; + + /** + * Encodes the specified DatabaseFailoverRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest} message DatabaseFailoverRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseFailoverRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseFailoverRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest} DatabaseFailoverRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseFailoverRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseFailoverRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest} DatabaseFailoverRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseFailoverRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseFailoverRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseFailoverRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + return null; + }; + + /** + * Creates a DatabaseFailoverRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest} DatabaseFailoverRequest + */ + DatabaseFailoverRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest(); + if (object.environment != null) + message.environment = String(object.environment); + return message; + }; + + /** + * Creates a plain object from a DatabaseFailoverRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest} message DatabaseFailoverRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseFailoverRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.environment = ""; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + return object; + }; + + /** + * Converts this DatabaseFailoverRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + * @instance + * @returns {Object.} JSON object + */ + DatabaseFailoverRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseFailoverRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseFailoverRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest"; + }; + + return DatabaseFailoverRequest; + })(); + + v1.DatabaseFailoverResponse = (function() { + + /** + * Properties of a DatabaseFailoverResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IDatabaseFailoverResponse + */ + + /** + * Constructs a new DatabaseFailoverResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a DatabaseFailoverResponse. + * @implements IDatabaseFailoverResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse=} [properties] Properties to set + */ + function DatabaseFailoverResponse(properties) { + if (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 DatabaseFailoverResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse} DatabaseFailoverResponse instance + */ + DatabaseFailoverResponse.create = function create(properties) { + return new DatabaseFailoverResponse(properties); + }; + + /** + * Encodes the specified DatabaseFailoverResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse} message DatabaseFailoverResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseFailoverResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified DatabaseFailoverResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse} message DatabaseFailoverResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseFailoverResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseFailoverResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse} DatabaseFailoverResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseFailoverResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseFailoverResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse} DatabaseFailoverResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseFailoverResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseFailoverResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseFailoverResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a DatabaseFailoverResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse} DatabaseFailoverResponse + */ + DatabaseFailoverResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse) + return object; + return new $root.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse(); + }; + + /** + * Creates a plain object from a DatabaseFailoverResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse} message DatabaseFailoverResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseFailoverResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DatabaseFailoverResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + * @instance + * @returns {Object.} JSON object + */ + DatabaseFailoverResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseFailoverResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseFailoverResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse"; + }; + + return DatabaseFailoverResponse; + })(); + + v1.FetchDatabasePropertiesRequest = (function() { + + /** + * Properties of a FetchDatabasePropertiesRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IFetchDatabasePropertiesRequest + * @property {string|null} [environment] FetchDatabasePropertiesRequest environment + */ + + /** + * Constructs a new FetchDatabasePropertiesRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a FetchDatabasePropertiesRequest. + * @implements IFetchDatabasePropertiesRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest=} [properties] Properties to set + */ + function FetchDatabasePropertiesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchDatabasePropertiesRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + * @instance + */ + FetchDatabasePropertiesRequest.prototype.environment = ""; + + /** + * Creates a new FetchDatabasePropertiesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest} FetchDatabasePropertiesRequest instance + */ + FetchDatabasePropertiesRequest.create = function create(properties) { + return new FetchDatabasePropertiesRequest(properties); + }; + + /** + * Encodes the specified FetchDatabasePropertiesRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest} message FetchDatabasePropertiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchDatabasePropertiesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + return writer; + }; + + /** + * Encodes the specified FetchDatabasePropertiesRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest} message FetchDatabasePropertiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchDatabasePropertiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchDatabasePropertiesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest} FetchDatabasePropertiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchDatabasePropertiesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchDatabasePropertiesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest} FetchDatabasePropertiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchDatabasePropertiesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchDatabasePropertiesRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchDatabasePropertiesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + return null; + }; + + /** + * Creates a FetchDatabasePropertiesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest} FetchDatabasePropertiesRequest + */ + FetchDatabasePropertiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest(); + if (object.environment != null) + message.environment = String(object.environment); + return message; + }; + + /** + * Creates a plain object from a FetchDatabasePropertiesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest} message FetchDatabasePropertiesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchDatabasePropertiesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.environment = ""; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + return object; + }; + + /** + * Converts this FetchDatabasePropertiesRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + * @instance + * @returns {Object.} JSON object + */ + FetchDatabasePropertiesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchDatabasePropertiesRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchDatabasePropertiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest"; + }; + + return FetchDatabasePropertiesRequest; + })(); + + v1.FetchDatabasePropertiesResponse = (function() { + + /** + * Properties of a FetchDatabasePropertiesResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IFetchDatabasePropertiesResponse + * @property {string|null} [primaryGceZone] FetchDatabasePropertiesResponse primaryGceZone + * @property {string|null} [secondaryGceZone] FetchDatabasePropertiesResponse secondaryGceZone + * @property {boolean|null} [isFailoverReplicaAvailable] FetchDatabasePropertiesResponse isFailoverReplicaAvailable + */ + + /** + * Constructs a new FetchDatabasePropertiesResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a FetchDatabasePropertiesResponse. + * @implements IFetchDatabasePropertiesResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse=} [properties] Properties to set + */ + function FetchDatabasePropertiesResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchDatabasePropertiesResponse primaryGceZone. + * @member {string} primaryGceZone + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + * @instance + */ + FetchDatabasePropertiesResponse.prototype.primaryGceZone = ""; + + /** + * FetchDatabasePropertiesResponse secondaryGceZone. + * @member {string} secondaryGceZone + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + * @instance + */ + FetchDatabasePropertiesResponse.prototype.secondaryGceZone = ""; + + /** + * FetchDatabasePropertiesResponse isFailoverReplicaAvailable. + * @member {boolean} isFailoverReplicaAvailable + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + * @instance + */ + FetchDatabasePropertiesResponse.prototype.isFailoverReplicaAvailable = false; + + /** + * Creates a new FetchDatabasePropertiesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse} FetchDatabasePropertiesResponse instance + */ + FetchDatabasePropertiesResponse.create = function create(properties) { + return new FetchDatabasePropertiesResponse(properties); + }; + + /** + * Encodes the specified FetchDatabasePropertiesResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse} message FetchDatabasePropertiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchDatabasePropertiesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.primaryGceZone != null && Object.hasOwnProperty.call(message, "primaryGceZone")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.primaryGceZone); + if (message.secondaryGceZone != null && Object.hasOwnProperty.call(message, "secondaryGceZone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.secondaryGceZone); + if (message.isFailoverReplicaAvailable != null && Object.hasOwnProperty.call(message, "isFailoverReplicaAvailable")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isFailoverReplicaAvailable); + return writer; + }; + + /** + * Encodes the specified FetchDatabasePropertiesResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse} message FetchDatabasePropertiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchDatabasePropertiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchDatabasePropertiesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse} FetchDatabasePropertiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchDatabasePropertiesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.primaryGceZone = reader.string(); + break; + } + case 2: { + message.secondaryGceZone = reader.string(); + break; + } + case 3: { + message.isFailoverReplicaAvailable = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchDatabasePropertiesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse} FetchDatabasePropertiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchDatabasePropertiesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchDatabasePropertiesResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchDatabasePropertiesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.primaryGceZone != null && message.hasOwnProperty("primaryGceZone")) + if (!$util.isString(message.primaryGceZone)) + return "primaryGceZone: string expected"; + if (message.secondaryGceZone != null && message.hasOwnProperty("secondaryGceZone")) + if (!$util.isString(message.secondaryGceZone)) + return "secondaryGceZone: string expected"; + if (message.isFailoverReplicaAvailable != null && message.hasOwnProperty("isFailoverReplicaAvailable")) + if (typeof message.isFailoverReplicaAvailable !== "boolean") + return "isFailoverReplicaAvailable: boolean expected"; + return null; + }; + + /** + * Creates a FetchDatabasePropertiesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse} FetchDatabasePropertiesResponse + */ + FetchDatabasePropertiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse(); + if (object.primaryGceZone != null) + message.primaryGceZone = String(object.primaryGceZone); + if (object.secondaryGceZone != null) + message.secondaryGceZone = String(object.secondaryGceZone); + if (object.isFailoverReplicaAvailable != null) + message.isFailoverReplicaAvailable = Boolean(object.isFailoverReplicaAvailable); + return message; + }; + + /** + * Creates a plain object from a FetchDatabasePropertiesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse} message FetchDatabasePropertiesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchDatabasePropertiesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.primaryGceZone = ""; + object.secondaryGceZone = ""; + object.isFailoverReplicaAvailable = false; + } + if (message.primaryGceZone != null && message.hasOwnProperty("primaryGceZone")) + object.primaryGceZone = message.primaryGceZone; + if (message.secondaryGceZone != null && message.hasOwnProperty("secondaryGceZone")) + object.secondaryGceZone = message.secondaryGceZone; + if (message.isFailoverReplicaAvailable != null && message.hasOwnProperty("isFailoverReplicaAvailable")) + object.isFailoverReplicaAvailable = message.isFailoverReplicaAvailable; + return object; + }; + + /** + * Converts this FetchDatabasePropertiesResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + * @instance + * @returns {Object.} JSON object + */ + FetchDatabasePropertiesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchDatabasePropertiesResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchDatabasePropertiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse"; + }; + + return FetchDatabasePropertiesResponse; + })(); + + v1.StorageConfig = (function() { + + /** + * Properties of a StorageConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IStorageConfig + * @property {string|null} [bucket] StorageConfig bucket + */ + + /** + * Constructs a new StorageConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a StorageConfig. + * @implements IStorageConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IStorageConfig=} [properties] Properties to set + */ + function StorageConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageConfig bucket. + * @member {string} bucket + * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig + * @instance + */ + StorageConfig.prototype.bucket = ""; + + /** + * Creates a new StorageConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IStorageConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.StorageConfig} StorageConfig instance + */ + StorageConfig.create = function create(properties) { + return new StorageConfig(properties); + }; + + /** + * Encodes the specified StorageConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StorageConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IStorageConfig} message StorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + return writer; + }; + + /** + * Encodes the specified StorageConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StorageConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IStorageConfig} message StorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.StorageConfig} StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.StorageConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bucket = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StorageConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.StorageConfig} StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + return null; + }; + + /** + * Creates a StorageConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.StorageConfig} StorageConfig + */ + StorageConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.StorageConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.StorageConfig(); + if (object.bucket != null) + message.bucket = String(object.bucket); + return message; + }; + + /** + * Creates a plain object from a StorageConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.StorageConfig} message StorageConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bucket = ""; + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + return object; + }; + + /** + * Converts this StorageConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig + * @instance + * @returns {Object.} JSON object + */ + StorageConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StorageConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.StorageConfig"; + }; + + return StorageConfig; + })(); + + v1.EnvironmentConfig = (function() { + + /** + * Properties of an EnvironmentConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IEnvironmentConfig + * @property {string|null} [gkeCluster] EnvironmentConfig gkeCluster + * @property {string|null} [dagGcsPrefix] EnvironmentConfig dagGcsPrefix + * @property {number|null} [nodeCount] EnvironmentConfig nodeCount + * @property {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig|null} [softwareConfig] EnvironmentConfig softwareConfig + * @property {google.cloud.orchestration.airflow.service.v1.INodeConfig|null} [nodeConfig] EnvironmentConfig nodeConfig + * @property {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig|null} [privateEnvironmentConfig] EnvironmentConfig privateEnvironmentConfig + * @property {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl|null} [webServerNetworkAccessControl] EnvironmentConfig webServerNetworkAccessControl + * @property {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig|null} [databaseConfig] EnvironmentConfig databaseConfig + * @property {google.cloud.orchestration.airflow.service.v1.IWebServerConfig|null} [webServerConfig] EnvironmentConfig webServerConfig + * @property {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig|null} [encryptionConfig] EnvironmentConfig encryptionConfig + * @property {google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow|null} [maintenanceWindow] EnvironmentConfig maintenanceWindow + * @property {google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig|null} [workloadsConfig] EnvironmentConfig workloadsConfig + * @property {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize|null} [environmentSize] EnvironmentConfig environmentSize + * @property {string|null} [airflowUri] EnvironmentConfig airflowUri + * @property {string|null} [airflowByoidUri] EnvironmentConfig airflowByoidUri + * @property {google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig|null} [masterAuthorizedNetworksConfig] EnvironmentConfig masterAuthorizedNetworksConfig + * @property {google.cloud.orchestration.airflow.service.v1.IRecoveryConfig|null} [recoveryConfig] EnvironmentConfig recoveryConfig + * @property {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode|null} [resilienceMode] EnvironmentConfig resilienceMode + * @property {google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig|null} [dataRetentionConfig] EnvironmentConfig dataRetentionConfig + */ + + /** + * Constructs a new EnvironmentConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an EnvironmentConfig. + * @implements IEnvironmentConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig=} [properties] Properties to set + */ + function EnvironmentConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnvironmentConfig gkeCluster. + * @member {string} gkeCluster + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.gkeCluster = ""; + + /** + * EnvironmentConfig dagGcsPrefix. + * @member {string} dagGcsPrefix + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.dagGcsPrefix = ""; + + /** + * EnvironmentConfig nodeCount. + * @member {number} nodeCount + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.nodeCount = 0; + + /** + * EnvironmentConfig softwareConfig. + * @member {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig|null|undefined} softwareConfig + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.softwareConfig = null; + + /** + * EnvironmentConfig nodeConfig. + * @member {google.cloud.orchestration.airflow.service.v1.INodeConfig|null|undefined} nodeConfig + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.nodeConfig = null; + + /** + * EnvironmentConfig privateEnvironmentConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig|null|undefined} privateEnvironmentConfig + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.privateEnvironmentConfig = null; + + /** + * EnvironmentConfig webServerNetworkAccessControl. + * @member {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl|null|undefined} webServerNetworkAccessControl + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.webServerNetworkAccessControl = null; + + /** + * EnvironmentConfig databaseConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig|null|undefined} databaseConfig + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.databaseConfig = null; + + /** + * EnvironmentConfig webServerConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IWebServerConfig|null|undefined} webServerConfig + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.webServerConfig = null; + + /** + * EnvironmentConfig encryptionConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig|null|undefined} encryptionConfig + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.encryptionConfig = null; + + /** + * EnvironmentConfig maintenanceWindow. + * @member {google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow|null|undefined} maintenanceWindow + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.maintenanceWindow = null; + + /** + * EnvironmentConfig workloadsConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig|null|undefined} workloadsConfig + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.workloadsConfig = null; + + /** + * EnvironmentConfig environmentSize. + * @member {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize} environmentSize + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.environmentSize = 0; + + /** + * EnvironmentConfig airflowUri. + * @member {string} airflowUri + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.airflowUri = ""; + + /** + * EnvironmentConfig airflowByoidUri. + * @member {string} airflowByoidUri + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.airflowByoidUri = ""; + + /** + * EnvironmentConfig masterAuthorizedNetworksConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig|null|undefined} masterAuthorizedNetworksConfig + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.masterAuthorizedNetworksConfig = null; + + /** + * EnvironmentConfig recoveryConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IRecoveryConfig|null|undefined} recoveryConfig + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.recoveryConfig = null; + + /** + * EnvironmentConfig resilienceMode. + * @member {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode} resilienceMode + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.resilienceMode = 0; + + /** + * EnvironmentConfig dataRetentionConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig|null|undefined} dataRetentionConfig + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.dataRetentionConfig = null; + + /** + * Creates a new EnvironmentConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} EnvironmentConfig instance + */ + EnvironmentConfig.create = function create(properties) { + return new EnvironmentConfig(properties); + }; + + /** + * Encodes the specified EnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig} message EnvironmentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnvironmentConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gkeCluster != null && Object.hasOwnProperty.call(message, "gkeCluster")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gkeCluster); + if (message.dagGcsPrefix != null && Object.hasOwnProperty.call(message, "dagGcsPrefix")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dagGcsPrefix); + if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.nodeCount); + if (message.softwareConfig != null && Object.hasOwnProperty.call(message, "softwareConfig")) + $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.encode(message.softwareConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.nodeConfig != null && Object.hasOwnProperty.call(message, "nodeConfig")) + $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.encode(message.nodeConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.airflowUri != null && Object.hasOwnProperty.call(message, "airflowUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.airflowUri); + if (message.privateEnvironmentConfig != null && Object.hasOwnProperty.call(message, "privateEnvironmentConfig")) + $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.encode(message.privateEnvironmentConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.webServerNetworkAccessControl != null && Object.hasOwnProperty.call(message, "webServerNetworkAccessControl")) + $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.encode(message.webServerNetworkAccessControl, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.databaseConfig != null && Object.hasOwnProperty.call(message, "databaseConfig")) + $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.encode(message.databaseConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.webServerConfig != null && Object.hasOwnProperty.call(message, "webServerConfig")) + $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.encode(message.webServerConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) + $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.maintenanceWindow != null && Object.hasOwnProperty.call(message, "maintenanceWindow")) + $root.google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.encode(message.maintenanceWindow, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.workloadsConfig != null && Object.hasOwnProperty.call(message, "workloadsConfig")) + $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.encode(message.workloadsConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.environmentSize != null && Object.hasOwnProperty.call(message, "environmentSize")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.environmentSize); + if (message.masterAuthorizedNetworksConfig != null && Object.hasOwnProperty.call(message, "masterAuthorizedNetworksConfig")) + $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.encode(message.masterAuthorizedNetworksConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.recoveryConfig != null && Object.hasOwnProperty.call(message, "recoveryConfig")) + $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig.encode(message.recoveryConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.resilienceMode != null && Object.hasOwnProperty.call(message, "resilienceMode")) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.resilienceMode); + if (message.airflowByoidUri != null && Object.hasOwnProperty.call(message, "airflowByoidUri")) + writer.uint32(/* id 20, wireType 2 =*/162).string(message.airflowByoidUri); + if (message.dataRetentionConfig != null && Object.hasOwnProperty.call(message, "dataRetentionConfig")) + $root.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.encode(message.dataRetentionConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig} message EnvironmentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnvironmentConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnvironmentConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} EnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnvironmentConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gkeCluster = reader.string(); + break; + } + case 2: { + message.dagGcsPrefix = reader.string(); + break; + } + case 3: { + message.nodeCount = reader.int32(); + break; + } + case 4: { + message.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.decode(reader, reader.uint32()); + break; + } + case 8: { + message.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.decode(reader, reader.uint32()); + break; + } + case 9: { + message.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.decode(reader, reader.uint32()); + break; + } + case 10: { + message.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.decode(reader, reader.uint32()); + break; + } + case 11: { + message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.decode(reader, reader.uint32()); + break; + } + case 12: { + message.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.decode(reader, reader.uint32()); + break; + } + case 15: { + message.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.decode(reader, reader.uint32()); + break; + } + case 16: { + message.environmentSize = reader.int32(); + break; + } + case 6: { + message.airflowUri = reader.string(); + break; + } + case 20: { + message.airflowByoidUri = reader.string(); + break; + } + case 17: { + message.masterAuthorizedNetworksConfig = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.decode(reader, reader.uint32()); + break; + } + case 18: { + message.recoveryConfig = $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig.decode(reader, reader.uint32()); + break; + } + case 19: { + message.resilienceMode = reader.int32(); + break; + } + case 21: { + message.dataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnvironmentConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} EnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnvironmentConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnvironmentConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnvironmentConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) + if (!$util.isString(message.gkeCluster)) + return "gkeCluster: string expected"; + if (message.dagGcsPrefix != null && message.hasOwnProperty("dagGcsPrefix")) + if (!$util.isString(message.dagGcsPrefix)) + return "dagGcsPrefix: string expected"; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount)) + return "nodeCount: integer expected"; + if (message.softwareConfig != null && message.hasOwnProperty("softwareConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.verify(message.softwareConfig); + if (error) + return "softwareConfig." + error; + } + if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.verify(message.nodeConfig); + if (error) + return "nodeConfig." + error; + } + if (message.privateEnvironmentConfig != null && message.hasOwnProperty("privateEnvironmentConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.verify(message.privateEnvironmentConfig); + if (error) + return "privateEnvironmentConfig." + error; + } + if (message.webServerNetworkAccessControl != null && message.hasOwnProperty("webServerNetworkAccessControl")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.verify(message.webServerNetworkAccessControl); + if (error) + return "webServerNetworkAccessControl." + error; + } + if (message.databaseConfig != null && message.hasOwnProperty("databaseConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.verify(message.databaseConfig); + if (error) + return "databaseConfig." + error; + } + if (message.webServerConfig != null && message.hasOwnProperty("webServerConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.verify(message.webServerConfig); + if (error) + return "webServerConfig." + error; + } + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.verify(message.encryptionConfig); + if (error) + return "encryptionConfig." + error; + } + if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.verify(message.maintenanceWindow); + if (error) + return "maintenanceWindow." + error; + } + if (message.workloadsConfig != null && message.hasOwnProperty("workloadsConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.verify(message.workloadsConfig); + if (error) + return "workloadsConfig." + error; + } + if (message.environmentSize != null && message.hasOwnProperty("environmentSize")) + switch (message.environmentSize) { + default: + return "environmentSize: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.airflowUri != null && message.hasOwnProperty("airflowUri")) + if (!$util.isString(message.airflowUri)) + return "airflowUri: string expected"; + if (message.airflowByoidUri != null && message.hasOwnProperty("airflowByoidUri")) + if (!$util.isString(message.airflowByoidUri)) + return "airflowByoidUri: string expected"; + if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.verify(message.masterAuthorizedNetworksConfig); + if (error) + return "masterAuthorizedNetworksConfig." + error; + } + if (message.recoveryConfig != null && message.hasOwnProperty("recoveryConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig.verify(message.recoveryConfig); + if (error) + return "recoveryConfig." + error; + } + if (message.resilienceMode != null && message.hasOwnProperty("resilienceMode")) + switch (message.resilienceMode) { + default: + return "resilienceMode: enum value expected"; + case 0: + case 1: + break; + } + if (message.dataRetentionConfig != null && message.hasOwnProperty("dataRetentionConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.verify(message.dataRetentionConfig); + if (error) + return "dataRetentionConfig." + error; + } + return null; + }; + + /** + * Creates an EnvironmentConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} EnvironmentConfig + */ + EnvironmentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig(); + if (object.gkeCluster != null) + message.gkeCluster = String(object.gkeCluster); + if (object.dagGcsPrefix != null) + message.dagGcsPrefix = String(object.dagGcsPrefix); + if (object.nodeCount != null) + message.nodeCount = object.nodeCount | 0; + if (object.softwareConfig != null) { + if (typeof object.softwareConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.softwareConfig: object expected"); + message.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.fromObject(object.softwareConfig); + } + if (object.nodeConfig != null) { + if (typeof object.nodeConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.nodeConfig: object expected"); + message.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.fromObject(object.nodeConfig); + } + if (object.privateEnvironmentConfig != null) { + if (typeof object.privateEnvironmentConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.privateEnvironmentConfig: object expected"); + message.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.fromObject(object.privateEnvironmentConfig); + } + if (object.webServerNetworkAccessControl != null) { + if (typeof object.webServerNetworkAccessControl !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.webServerNetworkAccessControl: object expected"); + message.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.fromObject(object.webServerNetworkAccessControl); + } + if (object.databaseConfig != null) { + if (typeof object.databaseConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.databaseConfig: object expected"); + message.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.fromObject(object.databaseConfig); + } + if (object.webServerConfig != null) { + if (typeof object.webServerConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.webServerConfig: object expected"); + message.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.fromObject(object.webServerConfig); + } + if (object.encryptionConfig != null) { + if (typeof object.encryptionConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.encryptionConfig: object expected"); + message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.fromObject(object.encryptionConfig); + } + if (object.maintenanceWindow != null) { + if (typeof object.maintenanceWindow !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.maintenanceWindow: object expected"); + message.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.fromObject(object.maintenanceWindow); + } + if (object.workloadsConfig != null) { + if (typeof object.workloadsConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.workloadsConfig: object expected"); + message.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.fromObject(object.workloadsConfig); + } + switch (object.environmentSize) { + default: + if (typeof object.environmentSize === "number") { + message.environmentSize = object.environmentSize; + break; + } + break; + case "ENVIRONMENT_SIZE_UNSPECIFIED": + case 0: + message.environmentSize = 0; + break; + case "ENVIRONMENT_SIZE_SMALL": + case 1: + message.environmentSize = 1; + break; + case "ENVIRONMENT_SIZE_MEDIUM": + case 2: + message.environmentSize = 2; + break; + case "ENVIRONMENT_SIZE_LARGE": + case 3: + message.environmentSize = 3; + break; + } + if (object.airflowUri != null) + message.airflowUri = String(object.airflowUri); + if (object.airflowByoidUri != null) + message.airflowByoidUri = String(object.airflowByoidUri); + if (object.masterAuthorizedNetworksConfig != null) { + if (typeof object.masterAuthorizedNetworksConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.masterAuthorizedNetworksConfig: object expected"); + message.masterAuthorizedNetworksConfig = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.fromObject(object.masterAuthorizedNetworksConfig); + } + if (object.recoveryConfig != null) { + if (typeof object.recoveryConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.recoveryConfig: object expected"); + message.recoveryConfig = $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig.fromObject(object.recoveryConfig); + } + switch (object.resilienceMode) { + default: + if (typeof object.resilienceMode === "number") { + message.resilienceMode = object.resilienceMode; + break; + } + break; + case "RESILIENCE_MODE_UNSPECIFIED": + case 0: + message.resilienceMode = 0; + break; + case "HIGH_RESILIENCE": + case 1: + message.resilienceMode = 1; + break; + } + if (object.dataRetentionConfig != null) { + if (typeof object.dataRetentionConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.dataRetentionConfig: object expected"); + message.dataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.fromObject(object.dataRetentionConfig); + } + return message; + }; + + /** + * Creates a plain object from an EnvironmentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} message EnvironmentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnvironmentConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gkeCluster = ""; + object.dagGcsPrefix = ""; + object.nodeCount = 0; + object.softwareConfig = null; + object.nodeConfig = null; + object.airflowUri = ""; + object.privateEnvironmentConfig = null; + object.webServerNetworkAccessControl = null; + object.databaseConfig = null; + object.webServerConfig = null; + object.encryptionConfig = null; + object.maintenanceWindow = null; + object.workloadsConfig = null; + object.environmentSize = options.enums === String ? "ENVIRONMENT_SIZE_UNSPECIFIED" : 0; + object.masterAuthorizedNetworksConfig = null; + object.recoveryConfig = null; + object.resilienceMode = options.enums === String ? "RESILIENCE_MODE_UNSPECIFIED" : 0; + object.airflowByoidUri = ""; + object.dataRetentionConfig = null; + } + if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) + object.gkeCluster = message.gkeCluster; + if (message.dagGcsPrefix != null && message.hasOwnProperty("dagGcsPrefix")) + object.dagGcsPrefix = message.dagGcsPrefix; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + object.nodeCount = message.nodeCount; + if (message.softwareConfig != null && message.hasOwnProperty("softwareConfig")) + object.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.toObject(message.softwareConfig, options); + if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) + object.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.toObject(message.nodeConfig, options); + if (message.airflowUri != null && message.hasOwnProperty("airflowUri")) + object.airflowUri = message.airflowUri; + if (message.privateEnvironmentConfig != null && message.hasOwnProperty("privateEnvironmentConfig")) + object.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.toObject(message.privateEnvironmentConfig, options); + if (message.webServerNetworkAccessControl != null && message.hasOwnProperty("webServerNetworkAccessControl")) + object.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.toObject(message.webServerNetworkAccessControl, options); + if (message.databaseConfig != null && message.hasOwnProperty("databaseConfig")) + object.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.toObject(message.databaseConfig, options); + if (message.webServerConfig != null && message.hasOwnProperty("webServerConfig")) + object.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.toObject(message.webServerConfig, options); + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) + object.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.toObject(message.encryptionConfig, options); + if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) + object.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.toObject(message.maintenanceWindow, options); + if (message.workloadsConfig != null && message.hasOwnProperty("workloadsConfig")) + object.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.toObject(message.workloadsConfig, options); + if (message.environmentSize != null && message.hasOwnProperty("environmentSize")) + object.environmentSize = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize[message.environmentSize] === undefined ? message.environmentSize : $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize[message.environmentSize] : message.environmentSize; + if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) + object.masterAuthorizedNetworksConfig = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.toObject(message.masterAuthorizedNetworksConfig, options); + if (message.recoveryConfig != null && message.hasOwnProperty("recoveryConfig")) + object.recoveryConfig = $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig.toObject(message.recoveryConfig, options); + if (message.resilienceMode != null && message.hasOwnProperty("resilienceMode")) + object.resilienceMode = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode[message.resilienceMode] === undefined ? message.resilienceMode : $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode[message.resilienceMode] : message.resilienceMode; + if (message.airflowByoidUri != null && message.hasOwnProperty("airflowByoidUri")) + object.airflowByoidUri = message.airflowByoidUri; + if (message.dataRetentionConfig != null && message.hasOwnProperty("dataRetentionConfig")) + object.dataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.toObject(message.dataRetentionConfig, options); + return object; + }; + + /** + * Converts this EnvironmentConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @instance + * @returns {Object.} JSON object + */ + EnvironmentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnvironmentConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnvironmentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.EnvironmentConfig"; + }; + + /** + * EnvironmentSize enum. + * @name google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize + * @enum {number} + * @property {number} ENVIRONMENT_SIZE_UNSPECIFIED=0 ENVIRONMENT_SIZE_UNSPECIFIED value + * @property {number} ENVIRONMENT_SIZE_SMALL=1 ENVIRONMENT_SIZE_SMALL value + * @property {number} ENVIRONMENT_SIZE_MEDIUM=2 ENVIRONMENT_SIZE_MEDIUM value + * @property {number} ENVIRONMENT_SIZE_LARGE=3 ENVIRONMENT_SIZE_LARGE value + */ + EnvironmentConfig.EnvironmentSize = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENVIRONMENT_SIZE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENVIRONMENT_SIZE_SMALL"] = 1; + values[valuesById[2] = "ENVIRONMENT_SIZE_MEDIUM"] = 2; + values[valuesById[3] = "ENVIRONMENT_SIZE_LARGE"] = 3; + return values; + })(); + + /** + * ResilienceMode enum. + * @name google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode + * @enum {number} + * @property {number} RESILIENCE_MODE_UNSPECIFIED=0 RESILIENCE_MODE_UNSPECIFIED value + * @property {number} HIGH_RESILIENCE=1 HIGH_RESILIENCE value + */ + EnvironmentConfig.ResilienceMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESILIENCE_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HIGH_RESILIENCE"] = 1; + return values; + })(); + + return EnvironmentConfig; + })(); + + v1.WebServerNetworkAccessControl = (function() { + + /** + * Properties of a WebServerNetworkAccessControl. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IWebServerNetworkAccessControl + * @property {Array.|null} [allowedIpRanges] WebServerNetworkAccessControl allowedIpRanges + */ + + /** + * Constructs a new WebServerNetworkAccessControl. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a WebServerNetworkAccessControl. + * @implements IWebServerNetworkAccessControl + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl=} [properties] Properties to set + */ + function WebServerNetworkAccessControl(properties) { + this.allowedIpRanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebServerNetworkAccessControl allowedIpRanges. + * @member {Array.} allowedIpRanges + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @instance + */ + WebServerNetworkAccessControl.prototype.allowedIpRanges = $util.emptyArray; + + /** + * Creates a new WebServerNetworkAccessControl instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} WebServerNetworkAccessControl instance + */ + WebServerNetworkAccessControl.create = function create(properties) { + return new WebServerNetworkAccessControl(properties); + }; + + /** + * Encodes the specified WebServerNetworkAccessControl message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl} message WebServerNetworkAccessControl message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerNetworkAccessControl.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowedIpRanges != null && message.allowedIpRanges.length) + for (var i = 0; i < message.allowedIpRanges.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.encode(message.allowedIpRanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WebServerNetworkAccessControl message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl} message WebServerNetworkAccessControl message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerNetworkAccessControl.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} WebServerNetworkAccessControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerNetworkAccessControl.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.allowedIpRanges && message.allowedIpRanges.length)) + message.allowedIpRanges = []; + message.allowedIpRanges.push($root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} WebServerNetworkAccessControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerNetworkAccessControl.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebServerNetworkAccessControl message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebServerNetworkAccessControl.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowedIpRanges != null && message.hasOwnProperty("allowedIpRanges")) { + if (!Array.isArray(message.allowedIpRanges)) + return "allowedIpRanges: array expected"; + for (var i = 0; i < message.allowedIpRanges.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.verify(message.allowedIpRanges[i]); + if (error) + return "allowedIpRanges." + error; + } + } + return null; + }; + + /** + * Creates a WebServerNetworkAccessControl message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} WebServerNetworkAccessControl + */ + WebServerNetworkAccessControl.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl(); + if (object.allowedIpRanges) { + if (!Array.isArray(object.allowedIpRanges)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.allowedIpRanges: array expected"); + message.allowedIpRanges = []; + for (var i = 0; i < object.allowedIpRanges.length; ++i) { + if (typeof object.allowedIpRanges[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.allowedIpRanges: object expected"); + message.allowedIpRanges[i] = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.fromObject(object.allowedIpRanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a WebServerNetworkAccessControl message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} message WebServerNetworkAccessControl + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebServerNetworkAccessControl.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.allowedIpRanges = []; + if (message.allowedIpRanges && message.allowedIpRanges.length) { + object.allowedIpRanges = []; + for (var j = 0; j < message.allowedIpRanges.length; ++j) + object.allowedIpRanges[j] = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.toObject(message.allowedIpRanges[j], options); + } + return object; + }; + + /** + * Converts this WebServerNetworkAccessControl to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @instance + * @returns {Object.} JSON object + */ + WebServerNetworkAccessControl.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WebServerNetworkAccessControl + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebServerNetworkAccessControl.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl"; + }; + + WebServerNetworkAccessControl.AllowedIpRange = (function() { + + /** + * Properties of an AllowedIpRange. + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @interface IAllowedIpRange + * @property {string|null} [value] AllowedIpRange value + * @property {string|null} [description] AllowedIpRange description + */ + + /** + * Constructs a new AllowedIpRange. + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl + * @classdesc Represents an AllowedIpRange. + * @implements IAllowedIpRange + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange=} [properties] Properties to set + */ + function AllowedIpRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AllowedIpRange value. + * @member {string} value + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @instance + */ + AllowedIpRange.prototype.value = ""; + + /** + * AllowedIpRange description. + * @member {string} description + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @instance + */ + AllowedIpRange.prototype.description = ""; + + /** + * Creates a new AllowedIpRange instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange instance + */ + AllowedIpRange.create = function create(properties) { + return new AllowedIpRange(properties); + }; + + /** + * Encodes the specified AllowedIpRange message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange} message AllowedIpRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedIpRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + return writer; + }; + + /** + * Encodes the specified AllowedIpRange message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange} message AllowedIpRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedIpRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllowedIpRange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedIpRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AllowedIpRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedIpRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllowedIpRange message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllowedIpRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates an AllowedIpRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange + */ + AllowedIpRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange(); + if (object.value != null) + message.value = String(object.value); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from an AllowedIpRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} message AllowedIpRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllowedIpRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.description = ""; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this AllowedIpRange to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @instance + * @returns {Object.} JSON object + */ + AllowedIpRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AllowedIpRange + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllowedIpRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange"; + }; + + return AllowedIpRange; + })(); + + return WebServerNetworkAccessControl; + })(); + + v1.DatabaseConfig = (function() { + + /** + * Properties of a DatabaseConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IDatabaseConfig + * @property {string|null} [machineType] DatabaseConfig machineType + * @property {string|null} [zone] DatabaseConfig zone + */ + + /** + * Constructs a new DatabaseConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a DatabaseConfig. + * @implements IDatabaseConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig=} [properties] Properties to set + */ + function DatabaseConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatabaseConfig machineType. + * @member {string} machineType + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @instance + */ + DatabaseConfig.prototype.machineType = ""; + + /** + * DatabaseConfig zone. + * @member {string} zone + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @instance + */ + DatabaseConfig.prototype.zone = ""; + + /** + * Creates a new DatabaseConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseConfig} DatabaseConfig instance + */ + DatabaseConfig.create = function create(properties) { + return new DatabaseConfig(properties); + }; + + /** + * Encodes the specified DatabaseConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig} message DatabaseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + return writer; + }; + + /** + * Encodes the specified DatabaseConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig} message DatabaseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseConfig} DatabaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.machineType = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseConfig} DatabaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + return null; + }; + + /** + * Creates a DatabaseConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseConfig} DatabaseConfig + */ + DatabaseConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig(); + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.zone != null) + message.zone = String(object.zone); + return message; + }; + + /** + * Creates a plain object from a DatabaseConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.DatabaseConfig} message DatabaseConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.machineType = ""; + object.zone = ""; + } + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + return object; + }; + + /** + * Converts this DatabaseConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @instance + * @returns {Object.} JSON object + */ + DatabaseConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.DatabaseConfig"; + }; + + return DatabaseConfig; + })(); + + v1.WebServerConfig = (function() { + + /** + * Properties of a WebServerConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IWebServerConfig + * @property {string|null} [machineType] WebServerConfig machineType + */ + + /** + * Constructs a new WebServerConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a WebServerConfig. + * @implements IWebServerConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IWebServerConfig=} [properties] Properties to set + */ + function WebServerConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebServerConfig machineType. + * @member {string} machineType + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @instance + */ + WebServerConfig.prototype.machineType = ""; + + /** + * Creates a new WebServerConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IWebServerConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerConfig} WebServerConfig instance + */ + WebServerConfig.create = function create(properties) { + return new WebServerConfig(properties); + }; + + /** + * Encodes the specified WebServerConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IWebServerConfig} message WebServerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); + return writer; + }; + + /** + * Encodes the specified WebServerConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IWebServerConfig} message WebServerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebServerConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerConfig} WebServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.machineType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebServerConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerConfig} WebServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebServerConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebServerConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + return null; + }; + + /** + * Creates a WebServerConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.WebServerConfig} WebServerConfig + */ + WebServerConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig(); + if (object.machineType != null) + message.machineType = String(object.machineType); + return message; + }; + + /** + * Creates a plain object from a WebServerConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WebServerConfig} message WebServerConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebServerConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.machineType = ""; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + return object; + }; + + /** + * Converts this WebServerConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @instance + * @returns {Object.} JSON object + */ + WebServerConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WebServerConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebServerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WebServerConfig"; + }; + + return WebServerConfig; + })(); + + v1.EncryptionConfig = (function() { + + /** + * Properties of an EncryptionConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IEncryptionConfig + * @property {string|null} [kmsKeyName] EncryptionConfig kmsKeyName + */ + + /** + * Constructs a new EncryptionConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an EncryptionConfig. + * @implements IEncryptionConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig=} [properties] Properties to set + */ + function EncryptionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EncryptionConfig kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @instance + */ + EncryptionConfig.prototype.kmsKeyName = ""; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.EncryptionConfig} EncryptionConfig instance + */ + EncryptionConfig.create = function create(properties) { + return new EncryptionConfig(properties); + }; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EncryptionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); + return writer; + }; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EncryptionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kmsKeyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptionConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + return null; + }; + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.EncryptionConfig} EncryptionConfig + */ + EncryptionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig(); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + return message; + }; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.EncryptionConfig} message EncryptionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.kmsKeyName = ""; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + return object; + }; + + /** + * Converts this EncryptionConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @instance + * @returns {Object.} JSON object + */ + EncryptionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EncryptionConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.EncryptionConfig"; + }; + + return EncryptionConfig; + })(); + + v1.MaintenanceWindow = (function() { + + /** + * Properties of a MaintenanceWindow. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IMaintenanceWindow + * @property {google.protobuf.ITimestamp|null} [startTime] MaintenanceWindow startTime + * @property {google.protobuf.ITimestamp|null} [endTime] MaintenanceWindow endTime + * @property {string|null} [recurrence] MaintenanceWindow recurrence + */ + + /** + * Constructs a new MaintenanceWindow. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a MaintenanceWindow. + * @implements IMaintenanceWindow + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow=} [properties] Properties to set + */ + function MaintenanceWindow(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MaintenanceWindow startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.startTime = null; + + /** + * MaintenanceWindow endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.endTime = null; + + /** + * MaintenanceWindow recurrence. + * @member {string} recurrence + * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.recurrence = ""; + + /** + * Creates a new MaintenanceWindow instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.MaintenanceWindow} MaintenanceWindow instance + */ + MaintenanceWindow.create = function create(properties) { + return new MaintenanceWindow(properties); + }; + + /** + * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenanceWindow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, 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.recurrence != null && Object.hasOwnProperty.call(message, "recurrence")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.recurrence); + return writer; + }; + + /** + * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.MaintenanceWindow} MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenanceWindow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.MaintenanceWindow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startTime = $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.recurrence = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.MaintenanceWindow} MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MaintenanceWindow message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MaintenanceWindow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.recurrence != null && message.hasOwnProperty("recurrence")) + if (!$util.isString(message.recurrence)) + return "recurrence: string expected"; + return null; + }; + + /** + * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.MaintenanceWindow} MaintenanceWindow + */ + MaintenanceWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.MaintenanceWindow) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.MaintenanceWindow(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.recurrence != null) + message.recurrence = String(object.recurrence); + return message; + }; + + /** + * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow + * @static + * @param {google.cloud.orchestration.airflow.service.v1.MaintenanceWindow} message MaintenanceWindow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MaintenanceWindow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + object.recurrence = ""; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.recurrence != null && message.hasOwnProperty("recurrence")) + object.recurrence = message.recurrence; + return object; + }; + + /** + * Converts this MaintenanceWindow to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow + * @instance + * @returns {Object.} JSON object + */ + MaintenanceWindow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MaintenanceWindow + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.MaintenanceWindow"; + }; + + return MaintenanceWindow; + })(); + + v1.SoftwareConfig = (function() { + + /** + * Properties of a SoftwareConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface ISoftwareConfig + * @property {string|null} [imageVersion] SoftwareConfig imageVersion + * @property {Object.|null} [airflowConfigOverrides] SoftwareConfig airflowConfigOverrides + * @property {Object.|null} [pypiPackages] SoftwareConfig pypiPackages + * @property {Object.|null} [envVariables] SoftwareConfig envVariables + * @property {string|null} [pythonVersion] SoftwareConfig pythonVersion + * @property {number|null} [schedulerCount] SoftwareConfig schedulerCount + * @property {google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration|null} [cloudDataLineageIntegration] SoftwareConfig cloudDataLineageIntegration + * @property {google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode|null} [webServerPluginsMode] SoftwareConfig webServerPluginsMode + */ + + /** + * Constructs a new SoftwareConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a SoftwareConfig. + * @implements ISoftwareConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig=} [properties] Properties to set + */ + function SoftwareConfig(properties) { + this.airflowConfigOverrides = {}; + this.pypiPackages = {}; + this.envVariables = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SoftwareConfig imageVersion. + * @member {string} imageVersion + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.imageVersion = ""; + + /** + * SoftwareConfig airflowConfigOverrides. + * @member {Object.} airflowConfigOverrides + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.airflowConfigOverrides = $util.emptyObject; + + /** + * SoftwareConfig pypiPackages. + * @member {Object.} pypiPackages + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.pypiPackages = $util.emptyObject; + + /** + * SoftwareConfig envVariables. + * @member {Object.} envVariables + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.envVariables = $util.emptyObject; + + /** + * SoftwareConfig pythonVersion. + * @member {string} pythonVersion + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.pythonVersion = ""; + + /** + * SoftwareConfig schedulerCount. + * @member {number} schedulerCount + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.schedulerCount = 0; + + /** + * SoftwareConfig cloudDataLineageIntegration. + * @member {google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration|null|undefined} cloudDataLineageIntegration + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.cloudDataLineageIntegration = null; + + /** + * SoftwareConfig webServerPluginsMode. + * @member {google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode} webServerPluginsMode + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.webServerPluginsMode = 0; + + /** + * Creates a new SoftwareConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.SoftwareConfig} SoftwareConfig instance + */ + SoftwareConfig.create = function create(properties) { + return new SoftwareConfig(properties); + }; + + /** + * Encodes the specified SoftwareConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SoftwareConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig} message SoftwareConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwareConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageVersion); + if (message.airflowConfigOverrides != null && Object.hasOwnProperty.call(message, "airflowConfigOverrides")) + for (var keys = Object.keys(message.airflowConfigOverrides), 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.airflowConfigOverrides[keys[i]]).ldelim(); + if (message.pypiPackages != null && Object.hasOwnProperty.call(message, "pypiPackages")) + for (var keys = Object.keys(message.pypiPackages), 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.pypiPackages[keys[i]]).ldelim(); + if (message.envVariables != null && Object.hasOwnProperty.call(message, "envVariables")) + for (var keys = Object.keys(message.envVariables), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.envVariables[keys[i]]).ldelim(); + if (message.pythonVersion != null && Object.hasOwnProperty.call(message, "pythonVersion")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pythonVersion); + if (message.schedulerCount != null && Object.hasOwnProperty.call(message, "schedulerCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.schedulerCount); + if (message.cloudDataLineageIntegration != null && Object.hasOwnProperty.call(message, "cloudDataLineageIntegration")) + $root.google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.encode(message.cloudDataLineageIntegration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.webServerPluginsMode != null && Object.hasOwnProperty.call(message, "webServerPluginsMode")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.webServerPluginsMode); + return writer; + }; + + /** + * Encodes the specified SoftwareConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SoftwareConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig} message SoftwareConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwareConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SoftwareConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.SoftwareConfig} SoftwareConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwareConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.imageVersion = reader.string(); + break; + } + case 2: { + if (message.airflowConfigOverrides === $util.emptyObject) + message.airflowConfigOverrides = {}; + 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.airflowConfigOverrides[key] = value; + break; + } + case 3: { + if (message.pypiPackages === $util.emptyObject) + message.pypiPackages = {}; + 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.pypiPackages[key] = value; + break; + } + case 4: { + if (message.envVariables === $util.emptyObject) + message.envVariables = {}; + 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.envVariables[key] = value; + break; + } + case 6: { + message.pythonVersion = reader.string(); + break; + } + case 7: { + message.schedulerCount = reader.int32(); + break; + } + case 8: { + message.cloudDataLineageIntegration = $root.google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.decode(reader, reader.uint32()); + break; + } + case 10: { + message.webServerPluginsMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SoftwareConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.SoftwareConfig} SoftwareConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwareConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SoftwareConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SoftwareConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + if (!$util.isString(message.imageVersion)) + return "imageVersion: string expected"; + if (message.airflowConfigOverrides != null && message.hasOwnProperty("airflowConfigOverrides")) { + if (!$util.isObject(message.airflowConfigOverrides)) + return "airflowConfigOverrides: object expected"; + var key = Object.keys(message.airflowConfigOverrides); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.airflowConfigOverrides[key[i]])) + return "airflowConfigOverrides: string{k:string} expected"; + } + if (message.pypiPackages != null && message.hasOwnProperty("pypiPackages")) { + if (!$util.isObject(message.pypiPackages)) + return "pypiPackages: object expected"; + var key = Object.keys(message.pypiPackages); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.pypiPackages[key[i]])) + return "pypiPackages: string{k:string} expected"; + } + if (message.envVariables != null && message.hasOwnProperty("envVariables")) { + if (!$util.isObject(message.envVariables)) + return "envVariables: object expected"; + var key = Object.keys(message.envVariables); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.envVariables[key[i]])) + return "envVariables: string{k:string} expected"; + } + if (message.pythonVersion != null && message.hasOwnProperty("pythonVersion")) + if (!$util.isString(message.pythonVersion)) + return "pythonVersion: string expected"; + if (message.schedulerCount != null && message.hasOwnProperty("schedulerCount")) + if (!$util.isInteger(message.schedulerCount)) + return "schedulerCount: integer expected"; + if (message.cloudDataLineageIntegration != null && message.hasOwnProperty("cloudDataLineageIntegration")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.verify(message.cloudDataLineageIntegration); + if (error) + return "cloudDataLineageIntegration." + error; + } + if (message.webServerPluginsMode != null && message.hasOwnProperty("webServerPluginsMode")) + switch (message.webServerPluginsMode) { + default: + return "webServerPluginsMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a SoftwareConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.SoftwareConfig} SoftwareConfig + */ + SoftwareConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig(); + if (object.imageVersion != null) + message.imageVersion = String(object.imageVersion); + if (object.airflowConfigOverrides) { + if (typeof object.airflowConfigOverrides !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.SoftwareConfig.airflowConfigOverrides: object expected"); + message.airflowConfigOverrides = {}; + for (var keys = Object.keys(object.airflowConfigOverrides), i = 0; i < keys.length; ++i) + message.airflowConfigOverrides[keys[i]] = String(object.airflowConfigOverrides[keys[i]]); + } + if (object.pypiPackages) { + if (typeof object.pypiPackages !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.SoftwareConfig.pypiPackages: object expected"); + message.pypiPackages = {}; + for (var keys = Object.keys(object.pypiPackages), i = 0; i < keys.length; ++i) + message.pypiPackages[keys[i]] = String(object.pypiPackages[keys[i]]); + } + if (object.envVariables) { + if (typeof object.envVariables !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.SoftwareConfig.envVariables: object expected"); + message.envVariables = {}; + for (var keys = Object.keys(object.envVariables), i = 0; i < keys.length; ++i) + message.envVariables[keys[i]] = String(object.envVariables[keys[i]]); + } + if (object.pythonVersion != null) + message.pythonVersion = String(object.pythonVersion); + if (object.schedulerCount != null) + message.schedulerCount = object.schedulerCount | 0; + if (object.cloudDataLineageIntegration != null) { + if (typeof object.cloudDataLineageIntegration !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.SoftwareConfig.cloudDataLineageIntegration: object expected"); + message.cloudDataLineageIntegration = $root.google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.fromObject(object.cloudDataLineageIntegration); + } + switch (object.webServerPluginsMode) { + default: + if (typeof object.webServerPluginsMode === "number") { + message.webServerPluginsMode = object.webServerPluginsMode; + break; + } + break; + case "WEB_SERVER_PLUGINS_MODE_UNSPECIFIED": + case 0: + message.webServerPluginsMode = 0; + break; + case "PLUGINS_DISABLED": + case 1: + message.webServerPluginsMode = 1; + break; + case "PLUGINS_ENABLED": + case 2: + message.webServerPluginsMode = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a SoftwareConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.SoftwareConfig} message SoftwareConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SoftwareConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.airflowConfigOverrides = {}; + object.pypiPackages = {}; + object.envVariables = {}; + } + if (options.defaults) { + object.imageVersion = ""; + object.pythonVersion = ""; + object.schedulerCount = 0; + object.cloudDataLineageIntegration = null; + object.webServerPluginsMode = options.enums === String ? "WEB_SERVER_PLUGINS_MODE_UNSPECIFIED" : 0; + } + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + object.imageVersion = message.imageVersion; + var keys2; + if (message.airflowConfigOverrides && (keys2 = Object.keys(message.airflowConfigOverrides)).length) { + object.airflowConfigOverrides = {}; + for (var j = 0; j < keys2.length; ++j) + object.airflowConfigOverrides[keys2[j]] = message.airflowConfigOverrides[keys2[j]]; + } + if (message.pypiPackages && (keys2 = Object.keys(message.pypiPackages)).length) { + object.pypiPackages = {}; + for (var j = 0; j < keys2.length; ++j) + object.pypiPackages[keys2[j]] = message.pypiPackages[keys2[j]]; + } + if (message.envVariables && (keys2 = Object.keys(message.envVariables)).length) { + object.envVariables = {}; + for (var j = 0; j < keys2.length; ++j) + object.envVariables[keys2[j]] = message.envVariables[keys2[j]]; + } + if (message.pythonVersion != null && message.hasOwnProperty("pythonVersion")) + object.pythonVersion = message.pythonVersion; + if (message.schedulerCount != null && message.hasOwnProperty("schedulerCount")) + object.schedulerCount = message.schedulerCount; + if (message.cloudDataLineageIntegration != null && message.hasOwnProperty("cloudDataLineageIntegration")) + object.cloudDataLineageIntegration = $root.google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.toObject(message.cloudDataLineageIntegration, options); + if (message.webServerPluginsMode != null && message.hasOwnProperty("webServerPluginsMode")) + object.webServerPluginsMode = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode[message.webServerPluginsMode] === undefined ? message.webServerPluginsMode : $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode[message.webServerPluginsMode] : message.webServerPluginsMode; + return object; + }; + + /** + * Converts this SoftwareConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @instance + * @returns {Object.} JSON object + */ + SoftwareConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SoftwareConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SoftwareConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.SoftwareConfig"; + }; + + /** + * WebServerPluginsMode enum. + * @name google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode + * @enum {number} + * @property {number} WEB_SERVER_PLUGINS_MODE_UNSPECIFIED=0 WEB_SERVER_PLUGINS_MODE_UNSPECIFIED value + * @property {number} PLUGINS_DISABLED=1 PLUGINS_DISABLED value + * @property {number} PLUGINS_ENABLED=2 PLUGINS_ENABLED value + */ + SoftwareConfig.WebServerPluginsMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WEB_SERVER_PLUGINS_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PLUGINS_DISABLED"] = 1; + values[valuesById[2] = "PLUGINS_ENABLED"] = 2; + return values; + })(); + + return SoftwareConfig; + })(); + + v1.IPAllocationPolicy = (function() { + + /** + * Properties of a IPAllocationPolicy. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IIPAllocationPolicy + * @property {boolean|null} [useIpAliases] IPAllocationPolicy useIpAliases + * @property {string|null} [clusterSecondaryRangeName] IPAllocationPolicy clusterSecondaryRangeName + * @property {string|null} [clusterIpv4CidrBlock] IPAllocationPolicy clusterIpv4CidrBlock + * @property {string|null} [servicesSecondaryRangeName] IPAllocationPolicy servicesSecondaryRangeName + * @property {string|null} [servicesIpv4CidrBlock] IPAllocationPolicy servicesIpv4CidrBlock + */ + + /** + * Constructs a new IPAllocationPolicy. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a IPAllocationPolicy. + * @implements IIPAllocationPolicy + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy=} [properties] Properties to set + */ + function IPAllocationPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IPAllocationPolicy useIpAliases. + * @member {boolean} useIpAliases + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.useIpAliases = false; + + /** + * IPAllocationPolicy clusterSecondaryRangeName. + * @member {string|null|undefined} clusterSecondaryRangeName + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.clusterSecondaryRangeName = null; + + /** + * IPAllocationPolicy clusterIpv4CidrBlock. + * @member {string|null|undefined} clusterIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.clusterIpv4CidrBlock = null; + + /** + * IPAllocationPolicy servicesSecondaryRangeName. + * @member {string|null|undefined} servicesSecondaryRangeName + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.servicesSecondaryRangeName = null; + + /** + * IPAllocationPolicy servicesIpv4CidrBlock. + * @member {string|null|undefined} servicesIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.servicesIpv4CidrBlock = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * IPAllocationPolicy clusterIpAllocation. + * @member {"clusterSecondaryRangeName"|"clusterIpv4CidrBlock"|undefined} clusterIpAllocation + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @instance + */ + Object.defineProperty(IPAllocationPolicy.prototype, "clusterIpAllocation", { + get: $util.oneOfGetter($oneOfFields = ["clusterSecondaryRangeName", "clusterIpv4CidrBlock"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * IPAllocationPolicy servicesIpAllocation. + * @member {"servicesSecondaryRangeName"|"servicesIpv4CidrBlock"|undefined} servicesIpAllocation + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @instance + */ + Object.defineProperty(IPAllocationPolicy.prototype, "servicesIpAllocation", { + get: $util.oneOfGetter($oneOfFields = ["servicesSecondaryRangeName", "servicesIpv4CidrBlock"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new IPAllocationPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} IPAllocationPolicy instance + */ + IPAllocationPolicy.create = function create(properties) { + return new IPAllocationPolicy(properties); + }; + + /** + * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IPAllocationPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useIpAliases != null && Object.hasOwnProperty.call(message, "useIpAliases")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useIpAliases); + if (message.clusterSecondaryRangeName != null && Object.hasOwnProperty.call(message, "clusterSecondaryRangeName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterSecondaryRangeName); + if (message.servicesSecondaryRangeName != null && Object.hasOwnProperty.call(message, "servicesSecondaryRangeName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.servicesSecondaryRangeName); + if (message.clusterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "clusterIpv4CidrBlock")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterIpv4CidrBlock); + if (message.servicesIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "servicesIpv4CidrBlock")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.servicesIpv4CidrBlock); + return writer; + }; + + /** + * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IPAllocationPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IPAllocationPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.useIpAliases = reader.bool(); + break; + } + case 2: { + message.clusterSecondaryRangeName = reader.string(); + break; + } + case 4: { + message.clusterIpv4CidrBlock = reader.string(); + break; + } + case 3: { + message.servicesSecondaryRangeName = reader.string(); + break; + } + case 5: { + message.servicesIpv4CidrBlock = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IPAllocationPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a IPAllocationPolicy message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IPAllocationPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) + if (typeof message.useIpAliases !== "boolean") + return "useIpAliases: boolean expected"; + if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) { + properties.clusterIpAllocation = 1; + if (!$util.isString(message.clusterSecondaryRangeName)) + return "clusterSecondaryRangeName: string expected"; + } + if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) { + if (properties.clusterIpAllocation === 1) + return "clusterIpAllocation: multiple values"; + properties.clusterIpAllocation = 1; + if (!$util.isString(message.clusterIpv4CidrBlock)) + return "clusterIpv4CidrBlock: string expected"; + } + if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) { + properties.servicesIpAllocation = 1; + if (!$util.isString(message.servicesSecondaryRangeName)) + return "servicesSecondaryRangeName: string expected"; + } + if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) { + if (properties.servicesIpAllocation === 1) + return "servicesIpAllocation: multiple values"; + properties.servicesIpAllocation = 1; + if (!$util.isString(message.servicesIpv4CidrBlock)) + return "servicesIpv4CidrBlock: string expected"; + } + return null; + }; + + /** + * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} IPAllocationPolicy + */ + IPAllocationPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy(); + if (object.useIpAliases != null) + message.useIpAliases = Boolean(object.useIpAliases); + if (object.clusterSecondaryRangeName != null) + message.clusterSecondaryRangeName = String(object.clusterSecondaryRangeName); + if (object.clusterIpv4CidrBlock != null) + message.clusterIpv4CidrBlock = String(object.clusterIpv4CidrBlock); + if (object.servicesSecondaryRangeName != null) + message.servicesSecondaryRangeName = String(object.servicesSecondaryRangeName); + if (object.servicesIpv4CidrBlock != null) + message.servicesIpv4CidrBlock = String(object.servicesIpv4CidrBlock); + return message; + }; + + /** + * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} message IPAllocationPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IPAllocationPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.useIpAliases = false; + if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) + object.useIpAliases = message.useIpAliases; + if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) { + object.clusterSecondaryRangeName = message.clusterSecondaryRangeName; + if (options.oneofs) + object.clusterIpAllocation = "clusterSecondaryRangeName"; + } + if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) { + object.servicesSecondaryRangeName = message.servicesSecondaryRangeName; + if (options.oneofs) + object.servicesIpAllocation = "servicesSecondaryRangeName"; + } + if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) { + object.clusterIpv4CidrBlock = message.clusterIpv4CidrBlock; + if (options.oneofs) + object.clusterIpAllocation = "clusterIpv4CidrBlock"; + } + if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) { + object.servicesIpv4CidrBlock = message.servicesIpv4CidrBlock; + if (options.oneofs) + object.servicesIpAllocation = "servicesIpv4CidrBlock"; + } + return object; + }; + + /** + * Converts this IPAllocationPolicy to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @instance + * @returns {Object.} JSON object + */ + IPAllocationPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IPAllocationPolicy + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IPAllocationPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy"; + }; + + return IPAllocationPolicy; + })(); + + v1.NodeConfig = (function() { + + /** + * Properties of a NodeConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface INodeConfig + * @property {string|null} [location] NodeConfig location + * @property {string|null} [machineType] NodeConfig machineType + * @property {string|null} [network] NodeConfig network + * @property {string|null} [subnetwork] NodeConfig subnetwork + * @property {number|null} [diskSizeGb] NodeConfig diskSizeGb + * @property {Array.|null} [oauthScopes] NodeConfig oauthScopes + * @property {string|null} [serviceAccount] NodeConfig serviceAccount + * @property {Array.|null} [tags] NodeConfig tags + * @property {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy|null} [ipAllocationPolicy] NodeConfig ipAllocationPolicy + * @property {boolean|null} [enableIpMasqAgent] NodeConfig enableIpMasqAgent + * @property {string|null} [composerNetworkAttachment] NodeConfig composerNetworkAttachment + * @property {string|null} [composerInternalIpv4CidrBlock] NodeConfig composerInternalIpv4CidrBlock + */ + + /** + * Constructs a new NodeConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a NodeConfig. + * @implements INodeConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.INodeConfig=} [properties] Properties to set + */ + function NodeConfig(properties) { + this.oauthScopes = []; + this.tags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeConfig location. + * @member {string} location + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.location = ""; + + /** + * NodeConfig machineType. + * @member {string} machineType + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.machineType = ""; + + /** + * NodeConfig network. + * @member {string} network + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.network = ""; + + /** + * NodeConfig subnetwork. + * @member {string} subnetwork + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.subnetwork = ""; + + /** + * NodeConfig diskSizeGb. + * @member {number} diskSizeGb + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.diskSizeGb = 0; + + /** + * NodeConfig oauthScopes. + * @member {Array.} oauthScopes + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.oauthScopes = $util.emptyArray; + + /** + * NodeConfig serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.serviceAccount = ""; + + /** + * NodeConfig tags. + * @member {Array.} tags + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.tags = $util.emptyArray; + + /** + * NodeConfig ipAllocationPolicy. + * @member {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy|null|undefined} ipAllocationPolicy + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.ipAllocationPolicy = null; + + /** + * NodeConfig enableIpMasqAgent. + * @member {boolean} enableIpMasqAgent + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.enableIpMasqAgent = false; + + /** + * NodeConfig composerNetworkAttachment. + * @member {string} composerNetworkAttachment + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.composerNetworkAttachment = ""; + + /** + * NodeConfig composerInternalIpv4CidrBlock. + * @member {string} composerInternalIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.composerInternalIpv4CidrBlock = ""; + + /** + * Creates a new NodeConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.INodeConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.NodeConfig} NodeConfig instance + */ + NodeConfig.create = function create(properties) { + return new NodeConfig(properties); + }; + + /** + * Encodes the specified NodeConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NodeConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.INodeConfig} message NodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.machineType); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.network); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.subnetwork); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.diskSizeGb); + if (message.oauthScopes != null && message.oauthScopes.length) + for (var i = 0; i < message.oauthScopes.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.oauthScopes[i]); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.serviceAccount); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.tags[i]); + if (message.ipAllocationPolicy != null && Object.hasOwnProperty.call(message, "ipAllocationPolicy")) + $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.encode(message.ipAllocationPolicy, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.enableIpMasqAgent != null && Object.hasOwnProperty.call(message, "enableIpMasqAgent")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enableIpMasqAgent); + if (message.composerNetworkAttachment != null && Object.hasOwnProperty.call(message, "composerNetworkAttachment")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.composerNetworkAttachment); + if (message.composerInternalIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "composerInternalIpv4CidrBlock")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.composerInternalIpv4CidrBlock); + return writer; + }; + + /** + * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NodeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.INodeConfig} message NodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.NodeConfig} NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.NodeConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.location = reader.string(); + break; + } + case 2: { + message.machineType = reader.string(); + break; + } + case 3: { + message.network = reader.string(); + break; + } + case 4: { + message.subnetwork = reader.string(); + break; + } + case 5: { + message.diskSizeGb = reader.int32(); + break; + } + case 6: { + if (!(message.oauthScopes && message.oauthScopes.length)) + message.oauthScopes = []; + message.oauthScopes.push(reader.string()); + break; + } + case 7: { + message.serviceAccount = reader.string(); + break; + } + case 8: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 9: { + message.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.decode(reader, reader.uint32()); + break; + } + case 11: { + message.enableIpMasqAgent = reader.bool(); + break; + } + case 12: { + message.composerNetworkAttachment = reader.string(); + break; + } + case 13: { + message.composerInternalIpv4CidrBlock = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.NodeConfig} NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (!$util.isInteger(message.diskSizeGb)) + return "diskSizeGb: integer expected"; + if (message.oauthScopes != null && message.hasOwnProperty("oauthScopes")) { + if (!Array.isArray(message.oauthScopes)) + return "oauthScopes: array expected"; + for (var i = 0; i < message.oauthScopes.length; ++i) + if (!$util.isString(message.oauthScopes[i])) + return "oauthScopes: string[] expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.verify(message.ipAllocationPolicy); + if (error) + return "ipAllocationPolicy." + error; + } + if (message.enableIpMasqAgent != null && message.hasOwnProperty("enableIpMasqAgent")) + if (typeof message.enableIpMasqAgent !== "boolean") + return "enableIpMasqAgent: boolean expected"; + if (message.composerNetworkAttachment != null && message.hasOwnProperty("composerNetworkAttachment")) + if (!$util.isString(message.composerNetworkAttachment)) + return "composerNetworkAttachment: string expected"; + if (message.composerInternalIpv4CidrBlock != null && message.hasOwnProperty("composerInternalIpv4CidrBlock")) + if (!$util.isString(message.composerInternalIpv4CidrBlock)) + return "composerInternalIpv4CidrBlock: string expected"; + return null; + }; + + /** + * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.NodeConfig} NodeConfig + */ + NodeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.NodeConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.NodeConfig(); + if (object.location != null) + message.location = String(object.location); + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.network != null) + message.network = String(object.network); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.diskSizeGb != null) + message.diskSizeGb = object.diskSizeGb | 0; + if (object.oauthScopes) { + if (!Array.isArray(object.oauthScopes)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.NodeConfig.oauthScopes: array expected"); + message.oauthScopes = []; + for (var i = 0; i < object.oauthScopes.length; ++i) + message.oauthScopes[i] = String(object.oauthScopes[i]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.NodeConfig.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.ipAllocationPolicy != null) { + if (typeof object.ipAllocationPolicy !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.NodeConfig.ipAllocationPolicy: object expected"); + message.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.fromObject(object.ipAllocationPolicy); + } + if (object.enableIpMasqAgent != null) + message.enableIpMasqAgent = Boolean(object.enableIpMasqAgent); + if (object.composerNetworkAttachment != null) + message.composerNetworkAttachment = String(object.composerNetworkAttachment); + if (object.composerInternalIpv4CidrBlock != null) + message.composerInternalIpv4CidrBlock = String(object.composerInternalIpv4CidrBlock); + return message; + }; + + /** + * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.NodeConfig} message NodeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.oauthScopes = []; + object.tags = []; + } + if (options.defaults) { + object.location = ""; + object.machineType = ""; + object.network = ""; + object.subnetwork = ""; + object.diskSizeGb = 0; + object.serviceAccount = ""; + object.ipAllocationPolicy = null; + object.enableIpMasqAgent = false; + object.composerNetworkAttachment = ""; + object.composerInternalIpv4CidrBlock = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + object.diskSizeGb = message.diskSizeGb; + if (message.oauthScopes && message.oauthScopes.length) { + object.oauthScopes = []; + for (var j = 0; j < message.oauthScopes.length; ++j) + object.oauthScopes[j] = message.oauthScopes[j]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) + object.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.toObject(message.ipAllocationPolicy, options); + if (message.enableIpMasqAgent != null && message.hasOwnProperty("enableIpMasqAgent")) + object.enableIpMasqAgent = message.enableIpMasqAgent; + if (message.composerNetworkAttachment != null && message.hasOwnProperty("composerNetworkAttachment")) + object.composerNetworkAttachment = message.composerNetworkAttachment; + if (message.composerInternalIpv4CidrBlock != null && message.hasOwnProperty("composerInternalIpv4CidrBlock")) + object.composerInternalIpv4CidrBlock = message.composerInternalIpv4CidrBlock; + return object; + }; + + /** + * Converts this NodeConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @instance + * @returns {Object.} JSON object + */ + NodeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.NodeConfig"; + }; + + return NodeConfig; + })(); + + v1.PrivateClusterConfig = (function() { + + /** + * Properties of a PrivateClusterConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IPrivateClusterConfig + * @property {boolean|null} [enablePrivateEndpoint] PrivateClusterConfig enablePrivateEndpoint + * @property {string|null} [masterIpv4CidrBlock] PrivateClusterConfig masterIpv4CidrBlock + * @property {string|null} [masterIpv4ReservedRange] PrivateClusterConfig masterIpv4ReservedRange + */ + + /** + * Constructs a new PrivateClusterConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a PrivateClusterConfig. + * @implements IPrivateClusterConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig=} [properties] Properties to set + */ + function PrivateClusterConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateClusterConfig enablePrivateEndpoint. + * @member {boolean} enablePrivateEndpoint + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.enablePrivateEndpoint = false; + + /** + * PrivateClusterConfig masterIpv4CidrBlock. + * @member {string} masterIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.masterIpv4CidrBlock = ""; + + /** + * PrivateClusterConfig masterIpv4ReservedRange. + * @member {string} masterIpv4ReservedRange + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.masterIpv4ReservedRange = ""; + + /** + * Creates a new PrivateClusterConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} PrivateClusterConfig instance + */ + PrivateClusterConfig.create = function create(properties) { + return new PrivateClusterConfig(properties); + }; + + /** + * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateClusterConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enablePrivateEndpoint != null && Object.hasOwnProperty.call(message, "enablePrivateEndpoint")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePrivateEndpoint); + if (message.masterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "masterIpv4CidrBlock")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.masterIpv4CidrBlock); + if (message.masterIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "masterIpv4ReservedRange")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.masterIpv4ReservedRange); + return writer; + }; + + /** + * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateClusterConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateClusterConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enablePrivateEndpoint = reader.bool(); + break; + } + case 2: { + message.masterIpv4CidrBlock = reader.string(); + break; + } + case 3: { + message.masterIpv4ReservedRange = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateClusterConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateClusterConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateClusterConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) + if (typeof message.enablePrivateEndpoint !== "boolean") + return "enablePrivateEndpoint: boolean expected"; + if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) + if (!$util.isString(message.masterIpv4CidrBlock)) + return "masterIpv4CidrBlock: string expected"; + if (message.masterIpv4ReservedRange != null && message.hasOwnProperty("masterIpv4ReservedRange")) + if (!$util.isString(message.masterIpv4ReservedRange)) + return "masterIpv4ReservedRange: string expected"; + return null; + }; + + /** + * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} PrivateClusterConfig + */ + PrivateClusterConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig(); + if (object.enablePrivateEndpoint != null) + message.enablePrivateEndpoint = Boolean(object.enablePrivateEndpoint); + if (object.masterIpv4CidrBlock != null) + message.masterIpv4CidrBlock = String(object.masterIpv4CidrBlock); + if (object.masterIpv4ReservedRange != null) + message.masterIpv4ReservedRange = String(object.masterIpv4ReservedRange); + return message; + }; + + /** + * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} message PrivateClusterConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateClusterConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enablePrivateEndpoint = false; + object.masterIpv4CidrBlock = ""; + object.masterIpv4ReservedRange = ""; + } + if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) + object.enablePrivateEndpoint = message.enablePrivateEndpoint; + if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) + object.masterIpv4CidrBlock = message.masterIpv4CidrBlock; + if (message.masterIpv4ReservedRange != null && message.hasOwnProperty("masterIpv4ReservedRange")) + object.masterIpv4ReservedRange = message.masterIpv4ReservedRange; + return object; + }; + + /** + * Converts this PrivateClusterConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @instance + * @returns {Object.} JSON object + */ + PrivateClusterConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateClusterConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateClusterConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig"; + }; + + return PrivateClusterConfig; + })(); + + v1.NetworkingConfig = (function() { + + /** + * Properties of a NetworkingConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface INetworkingConfig + * @property {google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType|null} [connectionType] NetworkingConfig connectionType + */ + + /** + * Constructs a new NetworkingConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a NetworkingConfig. + * @implements INetworkingConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.INetworkingConfig=} [properties] Properties to set + */ + function NetworkingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkingConfig connectionType. + * @member {google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType} connectionType + * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig + * @instance + */ + NetworkingConfig.prototype.connectionType = 0; + + /** + * Creates a new NetworkingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.INetworkingConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.NetworkingConfig} NetworkingConfig instance + */ + NetworkingConfig.create = function create(properties) { + return new NetworkingConfig(properties); + }; + + /** + * Encodes the specified NetworkingConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NetworkingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.INetworkingConfig} message NetworkingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectionType != null && Object.hasOwnProperty.call(message, "connectionType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.connectionType); + return writer; + }; + + /** + * Encodes the specified NetworkingConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NetworkingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.INetworkingConfig} message NetworkingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.NetworkingConfig} NetworkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.connectionType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.NetworkingConfig} NetworkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkingConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectionType != null && message.hasOwnProperty("connectionType")) + switch (message.connectionType) { + default: + return "connectionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a NetworkingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.NetworkingConfig} NetworkingConfig + */ + NetworkingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig(); + switch (object.connectionType) { + default: + if (typeof object.connectionType === "number") { + message.connectionType = object.connectionType; + break; + } + break; + case "CONNECTION_TYPE_UNSPECIFIED": + case 0: + message.connectionType = 0; + break; + case "VPC_PEERING": + case 1: + message.connectionType = 1; + break; + case "PRIVATE_SERVICE_CONNECT": + case 2: + message.connectionType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a NetworkingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.NetworkingConfig} message NetworkingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.connectionType = options.enums === String ? "CONNECTION_TYPE_UNSPECIFIED" : 0; + if (message.connectionType != null && message.hasOwnProperty("connectionType")) + object.connectionType = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType[message.connectionType] === undefined ? message.connectionType : $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType[message.connectionType] : message.connectionType; + return object; + }; + + /** + * Converts this NetworkingConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkingConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.NetworkingConfig"; + }; + + /** + * ConnectionType enum. + * @name google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType + * @enum {number} + * @property {number} CONNECTION_TYPE_UNSPECIFIED=0 CONNECTION_TYPE_UNSPECIFIED value + * @property {number} VPC_PEERING=1 VPC_PEERING value + * @property {number} PRIVATE_SERVICE_CONNECT=2 PRIVATE_SERVICE_CONNECT value + */ + NetworkingConfig.ConnectionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONNECTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VPC_PEERING"] = 1; + values[valuesById[2] = "PRIVATE_SERVICE_CONNECT"] = 2; + return values; + })(); + + return NetworkingConfig; + })(); + + v1.PrivateEnvironmentConfig = (function() { + + /** + * Properties of a PrivateEnvironmentConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IPrivateEnvironmentConfig + * @property {boolean|null} [enablePrivateEnvironment] PrivateEnvironmentConfig enablePrivateEnvironment + * @property {boolean|null} [enablePrivateBuildsOnly] PrivateEnvironmentConfig enablePrivateBuildsOnly + * @property {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig|null} [privateClusterConfig] PrivateEnvironmentConfig privateClusterConfig + * @property {string|null} [webServerIpv4CidrBlock] PrivateEnvironmentConfig webServerIpv4CidrBlock + * @property {string|null} [cloudSqlIpv4CidrBlock] PrivateEnvironmentConfig cloudSqlIpv4CidrBlock + * @property {string|null} [webServerIpv4ReservedRange] PrivateEnvironmentConfig webServerIpv4ReservedRange + * @property {string|null} [cloudComposerNetworkIpv4CidrBlock] PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock + * @property {string|null} [cloudComposerNetworkIpv4ReservedRange] PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange + * @property {boolean|null} [enablePrivatelyUsedPublicIps] PrivateEnvironmentConfig enablePrivatelyUsedPublicIps + * @property {string|null} [cloudComposerConnectionSubnetwork] PrivateEnvironmentConfig cloudComposerConnectionSubnetwork + * @property {google.cloud.orchestration.airflow.service.v1.INetworkingConfig|null} [networkingConfig] PrivateEnvironmentConfig networkingConfig + */ + + /** + * Constructs a new PrivateEnvironmentConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a PrivateEnvironmentConfig. + * @implements IPrivateEnvironmentConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig=} [properties] Properties to set + */ + function PrivateEnvironmentConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateEnvironmentConfig enablePrivateEnvironment. + * @member {boolean} enablePrivateEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.enablePrivateEnvironment = false; + + /** + * PrivateEnvironmentConfig enablePrivateBuildsOnly. + * @member {boolean} enablePrivateBuildsOnly + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.enablePrivateBuildsOnly = false; + + /** + * PrivateEnvironmentConfig privateClusterConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig|null|undefined} privateClusterConfig + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.privateClusterConfig = null; + + /** + * PrivateEnvironmentConfig webServerIpv4CidrBlock. + * @member {string} webServerIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.webServerIpv4CidrBlock = ""; + + /** + * PrivateEnvironmentConfig cloudSqlIpv4CidrBlock. + * @member {string} cloudSqlIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.cloudSqlIpv4CidrBlock = ""; + + /** + * PrivateEnvironmentConfig webServerIpv4ReservedRange. + * @member {string} webServerIpv4ReservedRange + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.webServerIpv4ReservedRange = ""; + + /** + * PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock. + * @member {string} cloudComposerNetworkIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.cloudComposerNetworkIpv4CidrBlock = ""; + + /** + * PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange. + * @member {string} cloudComposerNetworkIpv4ReservedRange + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.cloudComposerNetworkIpv4ReservedRange = ""; + + /** + * PrivateEnvironmentConfig enablePrivatelyUsedPublicIps. + * @member {boolean} enablePrivatelyUsedPublicIps + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.enablePrivatelyUsedPublicIps = false; + + /** + * PrivateEnvironmentConfig cloudComposerConnectionSubnetwork. + * @member {string} cloudComposerConnectionSubnetwork + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.cloudComposerConnectionSubnetwork = ""; + + /** + * PrivateEnvironmentConfig networkingConfig. + * @member {google.cloud.orchestration.airflow.service.v1.INetworkingConfig|null|undefined} networkingConfig + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.networkingConfig = null; + + /** + * Creates a new PrivateEnvironmentConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} PrivateEnvironmentConfig instance + */ + PrivateEnvironmentConfig.create = function create(properties) { + return new PrivateEnvironmentConfig(properties); + }; + + /** + * Encodes the specified PrivateEnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig} message PrivateEnvironmentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateEnvironmentConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enablePrivateEnvironment != null && Object.hasOwnProperty.call(message, "enablePrivateEnvironment")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePrivateEnvironment); + if (message.privateClusterConfig != null && Object.hasOwnProperty.call(message, "privateClusterConfig")) + $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.encode(message.privateClusterConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.webServerIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "webServerIpv4CidrBlock")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.webServerIpv4CidrBlock); + if (message.cloudSqlIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "cloudSqlIpv4CidrBlock")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.cloudSqlIpv4CidrBlock); + if (message.webServerIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "webServerIpv4ReservedRange")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.webServerIpv4ReservedRange); + if (message.enablePrivatelyUsedPublicIps != null && Object.hasOwnProperty.call(message, "enablePrivatelyUsedPublicIps")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.enablePrivatelyUsedPublicIps); + if (message.cloudComposerNetworkIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "cloudComposerNetworkIpv4CidrBlock")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.cloudComposerNetworkIpv4CidrBlock); + if (message.cloudComposerNetworkIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "cloudComposerNetworkIpv4ReservedRange")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.cloudComposerNetworkIpv4ReservedRange); + if (message.cloudComposerConnectionSubnetwork != null && Object.hasOwnProperty.call(message, "cloudComposerConnectionSubnetwork")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.cloudComposerConnectionSubnetwork); + if (message.networkingConfig != null && Object.hasOwnProperty.call(message, "networkingConfig")) + $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig.encode(message.networkingConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.enablePrivateBuildsOnly != null && Object.hasOwnProperty.call(message, "enablePrivateBuildsOnly")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enablePrivateBuildsOnly); + return writer; + }; + + /** + * Encodes the specified PrivateEnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig} message PrivateEnvironmentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateEnvironmentConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} PrivateEnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateEnvironmentConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enablePrivateEnvironment = reader.bool(); + break; + } + case 11: { + message.enablePrivateBuildsOnly = reader.bool(); + break; + } + case 2: { + message.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.webServerIpv4CidrBlock = reader.string(); + break; + } + case 4: { + message.cloudSqlIpv4CidrBlock = reader.string(); + break; + } + case 5: { + message.webServerIpv4ReservedRange = reader.string(); + break; + } + case 7: { + message.cloudComposerNetworkIpv4CidrBlock = reader.string(); + break; + } + case 8: { + message.cloudComposerNetworkIpv4ReservedRange = reader.string(); + break; + } + case 6: { + message.enablePrivatelyUsedPublicIps = reader.bool(); + break; + } + case 9: { + message.cloudComposerConnectionSubnetwork = reader.string(); + break; + } + case 10: { + message.networkingConfig = $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} PrivateEnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateEnvironmentConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateEnvironmentConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateEnvironmentConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enablePrivateEnvironment != null && message.hasOwnProperty("enablePrivateEnvironment")) + if (typeof message.enablePrivateEnvironment !== "boolean") + return "enablePrivateEnvironment: boolean expected"; + if (message.enablePrivateBuildsOnly != null && message.hasOwnProperty("enablePrivateBuildsOnly")) + if (typeof message.enablePrivateBuildsOnly !== "boolean") + return "enablePrivateBuildsOnly: boolean expected"; + if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.verify(message.privateClusterConfig); + if (error) + return "privateClusterConfig." + error; + } + if (message.webServerIpv4CidrBlock != null && message.hasOwnProperty("webServerIpv4CidrBlock")) + if (!$util.isString(message.webServerIpv4CidrBlock)) + return "webServerIpv4CidrBlock: string expected"; + if (message.cloudSqlIpv4CidrBlock != null && message.hasOwnProperty("cloudSqlIpv4CidrBlock")) + if (!$util.isString(message.cloudSqlIpv4CidrBlock)) + return "cloudSqlIpv4CidrBlock: string expected"; + if (message.webServerIpv4ReservedRange != null && message.hasOwnProperty("webServerIpv4ReservedRange")) + if (!$util.isString(message.webServerIpv4ReservedRange)) + return "webServerIpv4ReservedRange: string expected"; + if (message.cloudComposerNetworkIpv4CidrBlock != null && message.hasOwnProperty("cloudComposerNetworkIpv4CidrBlock")) + if (!$util.isString(message.cloudComposerNetworkIpv4CidrBlock)) + return "cloudComposerNetworkIpv4CidrBlock: string expected"; + if (message.cloudComposerNetworkIpv4ReservedRange != null && message.hasOwnProperty("cloudComposerNetworkIpv4ReservedRange")) + if (!$util.isString(message.cloudComposerNetworkIpv4ReservedRange)) + return "cloudComposerNetworkIpv4ReservedRange: string expected"; + if (message.enablePrivatelyUsedPublicIps != null && message.hasOwnProperty("enablePrivatelyUsedPublicIps")) + if (typeof message.enablePrivatelyUsedPublicIps !== "boolean") + return "enablePrivatelyUsedPublicIps: boolean expected"; + if (message.cloudComposerConnectionSubnetwork != null && message.hasOwnProperty("cloudComposerConnectionSubnetwork")) + if (!$util.isString(message.cloudComposerConnectionSubnetwork)) + return "cloudComposerConnectionSubnetwork: string expected"; + if (message.networkingConfig != null && message.hasOwnProperty("networkingConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig.verify(message.networkingConfig); + if (error) + return "networkingConfig." + error; + } + return null; + }; + + /** + * Creates a PrivateEnvironmentConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} PrivateEnvironmentConfig + */ + PrivateEnvironmentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig(); + if (object.enablePrivateEnvironment != null) + message.enablePrivateEnvironment = Boolean(object.enablePrivateEnvironment); + if (object.enablePrivateBuildsOnly != null) + message.enablePrivateBuildsOnly = Boolean(object.enablePrivateBuildsOnly); + if (object.privateClusterConfig != null) { + if (typeof object.privateClusterConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.privateClusterConfig: object expected"); + message.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.fromObject(object.privateClusterConfig); + } + if (object.webServerIpv4CidrBlock != null) + message.webServerIpv4CidrBlock = String(object.webServerIpv4CidrBlock); + if (object.cloudSqlIpv4CidrBlock != null) + message.cloudSqlIpv4CidrBlock = String(object.cloudSqlIpv4CidrBlock); + if (object.webServerIpv4ReservedRange != null) + message.webServerIpv4ReservedRange = String(object.webServerIpv4ReservedRange); + if (object.cloudComposerNetworkIpv4CidrBlock != null) + message.cloudComposerNetworkIpv4CidrBlock = String(object.cloudComposerNetworkIpv4CidrBlock); + if (object.cloudComposerNetworkIpv4ReservedRange != null) + message.cloudComposerNetworkIpv4ReservedRange = String(object.cloudComposerNetworkIpv4ReservedRange); + if (object.enablePrivatelyUsedPublicIps != null) + message.enablePrivatelyUsedPublicIps = Boolean(object.enablePrivatelyUsedPublicIps); + if (object.cloudComposerConnectionSubnetwork != null) + message.cloudComposerConnectionSubnetwork = String(object.cloudComposerConnectionSubnetwork); + if (object.networkingConfig != null) { + if (typeof object.networkingConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.networkingConfig: object expected"); + message.networkingConfig = $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig.fromObject(object.networkingConfig); + } + return message; + }; + + /** + * Creates a plain object from a PrivateEnvironmentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} message PrivateEnvironmentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateEnvironmentConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enablePrivateEnvironment = false; + object.privateClusterConfig = null; + object.webServerIpv4CidrBlock = ""; + object.cloudSqlIpv4CidrBlock = ""; + object.webServerIpv4ReservedRange = ""; + object.enablePrivatelyUsedPublicIps = false; + object.cloudComposerNetworkIpv4CidrBlock = ""; + object.cloudComposerNetworkIpv4ReservedRange = ""; + object.cloudComposerConnectionSubnetwork = ""; + object.networkingConfig = null; + object.enablePrivateBuildsOnly = false; + } + if (message.enablePrivateEnvironment != null && message.hasOwnProperty("enablePrivateEnvironment")) + object.enablePrivateEnvironment = message.enablePrivateEnvironment; + if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) + object.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.toObject(message.privateClusterConfig, options); + if (message.webServerIpv4CidrBlock != null && message.hasOwnProperty("webServerIpv4CidrBlock")) + object.webServerIpv4CidrBlock = message.webServerIpv4CidrBlock; + if (message.cloudSqlIpv4CidrBlock != null && message.hasOwnProperty("cloudSqlIpv4CidrBlock")) + object.cloudSqlIpv4CidrBlock = message.cloudSqlIpv4CidrBlock; + if (message.webServerIpv4ReservedRange != null && message.hasOwnProperty("webServerIpv4ReservedRange")) + object.webServerIpv4ReservedRange = message.webServerIpv4ReservedRange; + if (message.enablePrivatelyUsedPublicIps != null && message.hasOwnProperty("enablePrivatelyUsedPublicIps")) + object.enablePrivatelyUsedPublicIps = message.enablePrivatelyUsedPublicIps; + if (message.cloudComposerNetworkIpv4CidrBlock != null && message.hasOwnProperty("cloudComposerNetworkIpv4CidrBlock")) + object.cloudComposerNetworkIpv4CidrBlock = message.cloudComposerNetworkIpv4CidrBlock; + if (message.cloudComposerNetworkIpv4ReservedRange != null && message.hasOwnProperty("cloudComposerNetworkIpv4ReservedRange")) + object.cloudComposerNetworkIpv4ReservedRange = message.cloudComposerNetworkIpv4ReservedRange; + if (message.cloudComposerConnectionSubnetwork != null && message.hasOwnProperty("cloudComposerConnectionSubnetwork")) + object.cloudComposerConnectionSubnetwork = message.cloudComposerConnectionSubnetwork; + if (message.networkingConfig != null && message.hasOwnProperty("networkingConfig")) + object.networkingConfig = $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig.toObject(message.networkingConfig, options); + if (message.enablePrivateBuildsOnly != null && message.hasOwnProperty("enablePrivateBuildsOnly")) + object.enablePrivateBuildsOnly = message.enablePrivateBuildsOnly; + return object; + }; + + /** + * Converts this PrivateEnvironmentConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @instance + * @returns {Object.} JSON object + */ + PrivateEnvironmentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateEnvironmentConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateEnvironmentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig"; + }; + + return PrivateEnvironmentConfig; + })(); + + v1.WorkloadsConfig = (function() { + + /** + * Properties of a WorkloadsConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IWorkloadsConfig + * @property {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource|null} [scheduler] WorkloadsConfig scheduler + * @property {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource|null} [webServer] WorkloadsConfig webServer + * @property {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource|null} [worker] WorkloadsConfig worker + * @property {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource|null} [triggerer] WorkloadsConfig triggerer + * @property {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource|null} [dagProcessor] WorkloadsConfig dagProcessor + */ + + /** + * Constructs a new WorkloadsConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a WorkloadsConfig. + * @implements IWorkloadsConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig=} [properties] Properties to set + */ + function WorkloadsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkloadsConfig scheduler. + * @member {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource|null|undefined} scheduler + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @instance + */ + WorkloadsConfig.prototype.scheduler = null; + + /** + * WorkloadsConfig webServer. + * @member {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource|null|undefined} webServer + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @instance + */ + WorkloadsConfig.prototype.webServer = null; + + /** + * WorkloadsConfig worker. + * @member {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource|null|undefined} worker + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @instance + */ + WorkloadsConfig.prototype.worker = null; + + /** + * WorkloadsConfig triggerer. + * @member {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource|null|undefined} triggerer + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @instance + */ + WorkloadsConfig.prototype.triggerer = null; + + /** + * WorkloadsConfig dagProcessor. + * @member {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource|null|undefined} dagProcessor + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @instance + */ + WorkloadsConfig.prototype.dagProcessor = null; + + /** + * Creates a new WorkloadsConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig} WorkloadsConfig instance + */ + WorkloadsConfig.create = function create(properties) { + return new WorkloadsConfig(properties); + }; + + /** + * Encodes the specified WorkloadsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig} message WorkloadsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scheduler != null && Object.hasOwnProperty.call(message, "scheduler")) + $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.encode(message.scheduler, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.webServer != null && Object.hasOwnProperty.call(message, "webServer")) + $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.encode(message.webServer, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.worker != null && Object.hasOwnProperty.call(message, "worker")) + $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.encode(message.worker, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.triggerer != null && Object.hasOwnProperty.call(message, "triggerer")) + $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.encode(message.triggerer, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dagProcessor != null && Object.hasOwnProperty.call(message, "dagProcessor")) + $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.encode(message.dagProcessor, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WorkloadsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig} message WorkloadsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkloadsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig} WorkloadsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scheduler = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.decode(reader, reader.uint32()); + break; + } + case 2: { + message.webServer = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.worker = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.decode(reader, reader.uint32()); + break; + } + case 4: { + message.triggerer = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.decode(reader, reader.uint32()); + break; + } + case 5: { + message.dagProcessor = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkloadsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig} WorkloadsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkloadsConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkloadsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scheduler != null && message.hasOwnProperty("scheduler")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.verify(message.scheduler); + if (error) + return "scheduler." + error; + } + if (message.webServer != null && message.hasOwnProperty("webServer")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.verify(message.webServer); + if (error) + return "webServer." + error; + } + if (message.worker != null && message.hasOwnProperty("worker")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.verify(message.worker); + if (error) + return "worker." + error; + } + if (message.triggerer != null && message.hasOwnProperty("triggerer")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.verify(message.triggerer); + if (error) + return "triggerer." + error; + } + if (message.dagProcessor != null && message.hasOwnProperty("dagProcessor")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.verify(message.dagProcessor); + if (error) + return "dagProcessor." + error; + } + return null; + }; + + /** + * Creates a WorkloadsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig} WorkloadsConfig + */ + WorkloadsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig(); + if (object.scheduler != null) { + if (typeof object.scheduler !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.scheduler: object expected"); + message.scheduler = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.fromObject(object.scheduler); + } + if (object.webServer != null) { + if (typeof object.webServer !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.webServer: object expected"); + message.webServer = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.fromObject(object.webServer); + } + if (object.worker != null) { + if (typeof object.worker !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.worker: object expected"); + message.worker = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.fromObject(object.worker); + } + if (object.triggerer != null) { + if (typeof object.triggerer !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.triggerer: object expected"); + message.triggerer = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.fromObject(object.triggerer); + } + if (object.dagProcessor != null) { + if (typeof object.dagProcessor !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.dagProcessor: object expected"); + message.dagProcessor = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.fromObject(object.dagProcessor); + } + return message; + }; + + /** + * Creates a plain object from a WorkloadsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig} message WorkloadsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkloadsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.scheduler = null; + object.webServer = null; + object.worker = null; + object.triggerer = null; + object.dagProcessor = null; + } + if (message.scheduler != null && message.hasOwnProperty("scheduler")) + object.scheduler = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.toObject(message.scheduler, options); + if (message.webServer != null && message.hasOwnProperty("webServer")) + object.webServer = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.toObject(message.webServer, options); + if (message.worker != null && message.hasOwnProperty("worker")) + object.worker = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.toObject(message.worker, options); + if (message.triggerer != null && message.hasOwnProperty("triggerer")) + object.triggerer = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.toObject(message.triggerer, options); + if (message.dagProcessor != null && message.hasOwnProperty("dagProcessor")) + object.dagProcessor = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.toObject(message.dagProcessor, options); + return object; + }; + + /** + * Converts this WorkloadsConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @instance + * @returns {Object.} JSON object + */ + WorkloadsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkloadsConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkloadsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WorkloadsConfig"; + }; + + WorkloadsConfig.SchedulerResource = (function() { + + /** + * Properties of a SchedulerResource. + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @interface ISchedulerResource + * @property {number|null} [cpu] SchedulerResource cpu + * @property {number|null} [memoryGb] SchedulerResource memoryGb + * @property {number|null} [storageGb] SchedulerResource storageGb + * @property {number|null} [count] SchedulerResource count + */ + + /** + * Constructs a new SchedulerResource. + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @classdesc Represents a SchedulerResource. + * @implements ISchedulerResource + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource=} [properties] Properties to set + */ + function SchedulerResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchedulerResource cpu. + * @member {number} cpu + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource + * @instance + */ + SchedulerResource.prototype.cpu = 0; + + /** + * SchedulerResource memoryGb. + * @member {number} memoryGb + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource + * @instance + */ + SchedulerResource.prototype.memoryGb = 0; + + /** + * SchedulerResource storageGb. + * @member {number} storageGb + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource + * @instance + */ + SchedulerResource.prototype.storageGb = 0; + + /** + * SchedulerResource count. + * @member {number} count + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource + * @instance + */ + SchedulerResource.prototype.count = 0; + + /** + * Creates a new SchedulerResource instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource} SchedulerResource instance + */ + SchedulerResource.create = function create(properties) { + return new SchedulerResource(properties); + }; + + /** + * Encodes the specified SchedulerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource} message SchedulerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchedulerResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); + if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); + if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.count); + return writer; + }; + + /** + * Encodes the specified SchedulerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource} message SchedulerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchedulerResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchedulerResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource} SchedulerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchedulerResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cpu = reader.float(); + break; + } + case 2: { + message.memoryGb = reader.float(); + break; + } + case 3: { + message.storageGb = reader.float(); + break; + } + case 4: { + message.count = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchedulerResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource} SchedulerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchedulerResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchedulerResource message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchedulerResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpu != null && message.hasOwnProperty("cpu")) + if (typeof message.cpu !== "number") + return "cpu: number expected"; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + if (typeof message.memoryGb !== "number") + return "memoryGb: number expected"; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + if (typeof message.storageGb !== "number") + return "storageGb: number expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count)) + return "count: integer expected"; + return null; + }; + + /** + * Creates a SchedulerResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource} SchedulerResource + */ + SchedulerResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource(); + if (object.cpu != null) + message.cpu = Number(object.cpu); + if (object.memoryGb != null) + message.memoryGb = Number(object.memoryGb); + if (object.storageGb != null) + message.storageGb = Number(object.storageGb); + if (object.count != null) + message.count = object.count | 0; + return message; + }; + + /** + * Creates a plain object from a SchedulerResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource} message SchedulerResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchedulerResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cpu = 0; + object.memoryGb = 0; + object.storageGb = 0; + object.count = 0; + } + if (message.cpu != null && message.hasOwnProperty("cpu")) + object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; + if (message.count != null && message.hasOwnProperty("count")) + object.count = message.count; + return object; + }; + + /** + * Converts this SchedulerResource to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource + * @instance + * @returns {Object.} JSON object + */ + SchedulerResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchedulerResource + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchedulerResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource"; + }; + + return SchedulerResource; + })(); + + WorkloadsConfig.WebServerResource = (function() { + + /** + * Properties of a WebServerResource. + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @interface IWebServerResource + * @property {number|null} [cpu] WebServerResource cpu + * @property {number|null} [memoryGb] WebServerResource memoryGb + * @property {number|null} [storageGb] WebServerResource storageGb + */ + + /** + * Constructs a new WebServerResource. + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @classdesc Represents a WebServerResource. + * @implements IWebServerResource + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource=} [properties] Properties to set + */ + function WebServerResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebServerResource cpu. + * @member {number} cpu + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource + * @instance + */ + WebServerResource.prototype.cpu = 0; + + /** + * WebServerResource memoryGb. + * @member {number} memoryGb + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource + * @instance + */ + WebServerResource.prototype.memoryGb = 0; + + /** + * WebServerResource storageGb. + * @member {number} storageGb + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource + * @instance + */ + WebServerResource.prototype.storageGb = 0; + + /** + * Creates a new WebServerResource instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource} WebServerResource instance + */ + WebServerResource.create = function create(properties) { + return new WebServerResource(properties); + }; + + /** + * Encodes the specified WebServerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource} message WebServerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); + if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); + if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); + return writer; + }; + + /** + * Encodes the specified WebServerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource} message WebServerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebServerResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource} WebServerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cpu = reader.float(); + break; + } + case 2: { + message.memoryGb = reader.float(); + break; + } + case 3: { + message.storageGb = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebServerResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource} WebServerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebServerResource message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebServerResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpu != null && message.hasOwnProperty("cpu")) + if (typeof message.cpu !== "number") + return "cpu: number expected"; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + if (typeof message.memoryGb !== "number") + return "memoryGb: number expected"; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + if (typeof message.storageGb !== "number") + return "storageGb: number expected"; + return null; + }; + + /** + * Creates a WebServerResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource} WebServerResource + */ + WebServerResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource(); + if (object.cpu != null) + message.cpu = Number(object.cpu); + if (object.memoryGb != null) + message.memoryGb = Number(object.memoryGb); + if (object.storageGb != null) + message.storageGb = Number(object.storageGb); + return message; + }; + + /** + * Creates a plain object from a WebServerResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource} message WebServerResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebServerResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cpu = 0; + object.memoryGb = 0; + object.storageGb = 0; + } + if (message.cpu != null && message.hasOwnProperty("cpu")) + object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; + return object; + }; + + /** + * Converts this WebServerResource to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource + * @instance + * @returns {Object.} JSON object + */ + WebServerResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WebServerResource + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebServerResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource"; + }; + + return WebServerResource; + })(); + + WorkloadsConfig.WorkerResource = (function() { + + /** + * Properties of a WorkerResource. + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @interface IWorkerResource + * @property {number|null} [cpu] WorkerResource cpu + * @property {number|null} [memoryGb] WorkerResource memoryGb + * @property {number|null} [storageGb] WorkerResource storageGb + * @property {number|null} [minCount] WorkerResource minCount + * @property {number|null} [maxCount] WorkerResource maxCount + */ + + /** + * Constructs a new WorkerResource. + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @classdesc Represents a WorkerResource. + * @implements IWorkerResource + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource=} [properties] Properties to set + */ + function WorkerResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkerResource cpu. + * @member {number} cpu + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource + * @instance + */ + WorkerResource.prototype.cpu = 0; + + /** + * WorkerResource memoryGb. + * @member {number} memoryGb + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource + * @instance + */ + WorkerResource.prototype.memoryGb = 0; + + /** + * WorkerResource storageGb. + * @member {number} storageGb + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource + * @instance + */ + WorkerResource.prototype.storageGb = 0; + + /** + * WorkerResource minCount. + * @member {number} minCount + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource + * @instance + */ + WorkerResource.prototype.minCount = 0; + + /** + * WorkerResource maxCount. + * @member {number} maxCount + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource + * @instance + */ + WorkerResource.prototype.maxCount = 0; + + /** + * Creates a new WorkerResource instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource} WorkerResource instance + */ + WorkerResource.create = function create(properties) { + return new WorkerResource(properties); + }; + + /** + * Encodes the specified WorkerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource} message WorkerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkerResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); + if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); + if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); + if (message.minCount != null && Object.hasOwnProperty.call(message, "minCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minCount); + if (message.maxCount != null && Object.hasOwnProperty.call(message, "maxCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maxCount); + return writer; + }; + + /** + * Encodes the specified WorkerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource} message WorkerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkerResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkerResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource} WorkerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkerResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cpu = reader.float(); + break; + } + case 2: { + message.memoryGb = reader.float(); + break; + } + case 3: { + message.storageGb = reader.float(); + break; + } + case 4: { + message.minCount = reader.int32(); + break; + } + case 5: { + message.maxCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkerResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource} WorkerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkerResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkerResource message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkerResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpu != null && message.hasOwnProperty("cpu")) + if (typeof message.cpu !== "number") + return "cpu: number expected"; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + if (typeof message.memoryGb !== "number") + return "memoryGb: number expected"; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + if (typeof message.storageGb !== "number") + return "storageGb: number expected"; + if (message.minCount != null && message.hasOwnProperty("minCount")) + if (!$util.isInteger(message.minCount)) + return "minCount: integer expected"; + if (message.maxCount != null && message.hasOwnProperty("maxCount")) + if (!$util.isInteger(message.maxCount)) + return "maxCount: integer expected"; + return null; + }; + + /** + * Creates a WorkerResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource} WorkerResource + */ + WorkerResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource(); + if (object.cpu != null) + message.cpu = Number(object.cpu); + if (object.memoryGb != null) + message.memoryGb = Number(object.memoryGb); + if (object.storageGb != null) + message.storageGb = Number(object.storageGb); + if (object.minCount != null) + message.minCount = object.minCount | 0; + if (object.maxCount != null) + message.maxCount = object.maxCount | 0; + return message; + }; + + /** + * Creates a plain object from a WorkerResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource} message WorkerResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkerResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cpu = 0; + object.memoryGb = 0; + object.storageGb = 0; + object.minCount = 0; + object.maxCount = 0; + } + if (message.cpu != null && message.hasOwnProperty("cpu")) + object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; + if (message.minCount != null && message.hasOwnProperty("minCount")) + object.minCount = message.minCount; + if (message.maxCount != null && message.hasOwnProperty("maxCount")) + object.maxCount = message.maxCount; + return object; + }; + + /** + * Converts this WorkerResource to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource + * @instance + * @returns {Object.} JSON object + */ + WorkerResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkerResource + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkerResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource"; + }; + + return WorkerResource; + })(); + + WorkloadsConfig.TriggererResource = (function() { + + /** + * Properties of a TriggererResource. + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @interface ITriggererResource + * @property {number|null} [count] TriggererResource count + * @property {number|null} [cpu] TriggererResource cpu + * @property {number|null} [memoryGb] TriggererResource memoryGb + */ + + /** + * Constructs a new TriggererResource. + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @classdesc Represents a TriggererResource. + * @implements ITriggererResource + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource=} [properties] Properties to set + */ + function TriggererResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TriggererResource count. + * @member {number} count + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource + * @instance + */ + TriggererResource.prototype.count = 0; + + /** + * TriggererResource cpu. + * @member {number} cpu + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource + * @instance + */ + TriggererResource.prototype.cpu = 0; + + /** + * TriggererResource memoryGb. + * @member {number} memoryGb + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource + * @instance + */ + TriggererResource.prototype.memoryGb = 0; + + /** + * Creates a new TriggererResource instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource} TriggererResource instance + */ + TriggererResource.create = function create(properties) { + return new TriggererResource(properties); + }; + + /** + * Encodes the specified TriggererResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource} message TriggererResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggererResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.count); + if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.cpu); + if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.memoryGb); + return writer; + }; + + /** + * Encodes the specified TriggererResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource} message TriggererResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggererResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TriggererResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource} TriggererResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggererResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.count = reader.int32(); + break; + } + case 2: { + message.cpu = reader.float(); + break; + } + case 3: { + message.memoryGb = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TriggererResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource} TriggererResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggererResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TriggererResource message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TriggererResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count)) + return "count: integer expected"; + if (message.cpu != null && message.hasOwnProperty("cpu")) + if (typeof message.cpu !== "number") + return "cpu: number expected"; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + if (typeof message.memoryGb !== "number") + return "memoryGb: number expected"; + return null; + }; + + /** + * Creates a TriggererResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource} TriggererResource + */ + TriggererResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource(); + if (object.count != null) + message.count = object.count | 0; + if (object.cpu != null) + message.cpu = Number(object.cpu); + if (object.memoryGb != null) + message.memoryGb = Number(object.memoryGb); + return message; + }; + + /** + * Creates a plain object from a TriggererResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource} message TriggererResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TriggererResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.count = 0; + object.cpu = 0; + object.memoryGb = 0; + } + if (message.count != null && message.hasOwnProperty("count")) + object.count = message.count; + if (message.cpu != null && message.hasOwnProperty("cpu")) + object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; + return object; + }; + + /** + * Converts this TriggererResource to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource + * @instance + * @returns {Object.} JSON object + */ + TriggererResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TriggererResource + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TriggererResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource"; + }; + + return TriggererResource; + })(); + + WorkloadsConfig.DagProcessorResource = (function() { + + /** + * Properties of a DagProcessorResource. + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @interface IDagProcessorResource + * @property {number|null} [cpu] DagProcessorResource cpu + * @property {number|null} [memoryGb] DagProcessorResource memoryGb + * @property {number|null} [storageGb] DagProcessorResource storageGb + * @property {number|null} [count] DagProcessorResource count + */ + + /** + * Constructs a new DagProcessorResource. + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig + * @classdesc Represents a DagProcessorResource. + * @implements IDagProcessorResource + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource=} [properties] Properties to set + */ + function DagProcessorResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DagProcessorResource cpu. + * @member {number} cpu + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource + * @instance + */ + DagProcessorResource.prototype.cpu = 0; + + /** + * DagProcessorResource memoryGb. + * @member {number} memoryGb + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource + * @instance + */ + DagProcessorResource.prototype.memoryGb = 0; + + /** + * DagProcessorResource storageGb. + * @member {number} storageGb + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource + * @instance + */ + DagProcessorResource.prototype.storageGb = 0; + + /** + * DagProcessorResource count. + * @member {number} count + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource + * @instance + */ + DagProcessorResource.prototype.count = 0; + + /** + * Creates a new DagProcessorResource instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource} DagProcessorResource instance + */ + DagProcessorResource.create = function create(properties) { + return new DagProcessorResource(properties); + }; + + /** + * Encodes the specified DagProcessorResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource} message DagProcessorResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DagProcessorResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); + if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); + if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.count); + return writer; + }; + + /** + * Encodes the specified DagProcessorResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource} message DagProcessorResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DagProcessorResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DagProcessorResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource} DagProcessorResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DagProcessorResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cpu = reader.float(); + break; + } + case 2: { + message.memoryGb = reader.float(); + break; + } + case 3: { + message.storageGb = reader.float(); + break; + } + case 4: { + message.count = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DagProcessorResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource} DagProcessorResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DagProcessorResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DagProcessorResource message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DagProcessorResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpu != null && message.hasOwnProperty("cpu")) + if (typeof message.cpu !== "number") + return "cpu: number expected"; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + if (typeof message.memoryGb !== "number") + return "memoryGb: number expected"; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + if (typeof message.storageGb !== "number") + return "storageGb: number expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count)) + return "count: integer expected"; + return null; + }; + + /** + * Creates a DagProcessorResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource} DagProcessorResource + */ + DagProcessorResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource(); + if (object.cpu != null) + message.cpu = Number(object.cpu); + if (object.memoryGb != null) + message.memoryGb = Number(object.memoryGb); + if (object.storageGb != null) + message.storageGb = Number(object.storageGb); + if (object.count != null) + message.count = object.count | 0; + return message; + }; + + /** + * Creates a plain object from a DagProcessorResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource} message DagProcessorResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DagProcessorResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cpu = 0; + object.memoryGb = 0; + object.storageGb = 0; + object.count = 0; + } + if (message.cpu != null && message.hasOwnProperty("cpu")) + object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; + if (message.count != null && message.hasOwnProperty("count")) + object.count = message.count; + return object; + }; + + /** + * Converts this DagProcessorResource to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource + * @instance + * @returns {Object.} JSON object + */ + DagProcessorResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DagProcessorResource + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DagProcessorResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource"; + }; + + return DagProcessorResource; + })(); + + return WorkloadsConfig; + })(); + + v1.RecoveryConfig = (function() { + + /** + * Properties of a RecoveryConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IRecoveryConfig + * @property {google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig|null} [scheduledSnapshotsConfig] RecoveryConfig scheduledSnapshotsConfig + */ + + /** + * Constructs a new RecoveryConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a RecoveryConfig. + * @implements IRecoveryConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IRecoveryConfig=} [properties] Properties to set + */ + function RecoveryConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecoveryConfig scheduledSnapshotsConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig|null|undefined} scheduledSnapshotsConfig + * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig + * @instance + */ + RecoveryConfig.prototype.scheduledSnapshotsConfig = null; + + /** + * Creates a new RecoveryConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IRecoveryConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.RecoveryConfig} RecoveryConfig instance + */ + RecoveryConfig.create = function create(properties) { + return new RecoveryConfig(properties); + }; + + /** + * Encodes the specified RecoveryConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.RecoveryConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IRecoveryConfig} message RecoveryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecoveryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scheduledSnapshotsConfig != null && Object.hasOwnProperty.call(message, "scheduledSnapshotsConfig")) + $root.google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.encode(message.scheduledSnapshotsConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RecoveryConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.RecoveryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IRecoveryConfig} message RecoveryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecoveryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecoveryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.RecoveryConfig} RecoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecoveryConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scheduledSnapshotsConfig = $root.google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecoveryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.RecoveryConfig} RecoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecoveryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecoveryConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecoveryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scheduledSnapshotsConfig != null && message.hasOwnProperty("scheduledSnapshotsConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.verify(message.scheduledSnapshotsConfig); + if (error) + return "scheduledSnapshotsConfig." + error; + } + return null; + }; + + /** + * Creates a RecoveryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.RecoveryConfig} RecoveryConfig + */ + RecoveryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig(); + if (object.scheduledSnapshotsConfig != null) { + if (typeof object.scheduledSnapshotsConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.RecoveryConfig.scheduledSnapshotsConfig: object expected"); + message.scheduledSnapshotsConfig = $root.google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.fromObject(object.scheduledSnapshotsConfig); + } + return message; + }; + + /** + * Creates a plain object from a RecoveryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.RecoveryConfig} message RecoveryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecoveryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.scheduledSnapshotsConfig = null; + if (message.scheduledSnapshotsConfig != null && message.hasOwnProperty("scheduledSnapshotsConfig")) + object.scheduledSnapshotsConfig = $root.google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.toObject(message.scheduledSnapshotsConfig, options); + return object; + }; + + /** + * Converts this RecoveryConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig + * @instance + * @returns {Object.} JSON object + */ + RecoveryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecoveryConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecoveryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.RecoveryConfig"; + }; + + return RecoveryConfig; + })(); + + v1.ScheduledSnapshotsConfig = (function() { + + /** + * Properties of a ScheduledSnapshotsConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IScheduledSnapshotsConfig + * @property {boolean|null} [enabled] ScheduledSnapshotsConfig enabled + * @property {string|null} [snapshotLocation] ScheduledSnapshotsConfig snapshotLocation + * @property {string|null} [snapshotCreationSchedule] ScheduledSnapshotsConfig snapshotCreationSchedule + * @property {string|null} [timeZone] ScheduledSnapshotsConfig timeZone + */ + + /** + * Constructs a new ScheduledSnapshotsConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a ScheduledSnapshotsConfig. + * @implements IScheduledSnapshotsConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig=} [properties] Properties to set + */ + function ScheduledSnapshotsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ScheduledSnapshotsConfig enabled. + * @member {boolean} enabled + * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig + * @instance + */ + ScheduledSnapshotsConfig.prototype.enabled = false; + + /** + * ScheduledSnapshotsConfig snapshotLocation. + * @member {string} snapshotLocation + * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig + * @instance + */ + ScheduledSnapshotsConfig.prototype.snapshotLocation = ""; + + /** + * ScheduledSnapshotsConfig snapshotCreationSchedule. + * @member {string} snapshotCreationSchedule + * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig + * @instance + */ + ScheduledSnapshotsConfig.prototype.snapshotCreationSchedule = ""; + + /** + * ScheduledSnapshotsConfig timeZone. + * @member {string} timeZone + * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig + * @instance + */ + ScheduledSnapshotsConfig.prototype.timeZone = ""; + + /** + * Creates a new ScheduledSnapshotsConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig} ScheduledSnapshotsConfig instance + */ + ScheduledSnapshotsConfig.create = function create(properties) { + return new ScheduledSnapshotsConfig(properties); + }; + + /** + * Encodes the specified ScheduledSnapshotsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig} message ScheduledSnapshotsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScheduledSnapshotsConfig.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.snapshotCreationSchedule != null && Object.hasOwnProperty.call(message, "snapshotCreationSchedule")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.snapshotCreationSchedule); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.timeZone); + if (message.snapshotLocation != null && Object.hasOwnProperty.call(message, "snapshotLocation")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.snapshotLocation); + return writer; + }; + + /** + * Encodes the specified ScheduledSnapshotsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig} message ScheduledSnapshotsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScheduledSnapshotsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScheduledSnapshotsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig} ScheduledSnapshotsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScheduledSnapshotsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 6: { + message.snapshotLocation = reader.string(); + break; + } + case 3: { + message.snapshotCreationSchedule = reader.string(); + break; + } + case 5: { + message.timeZone = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScheduledSnapshotsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig} ScheduledSnapshotsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScheduledSnapshotsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScheduledSnapshotsConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScheduledSnapshotsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.snapshotLocation != null && message.hasOwnProperty("snapshotLocation")) + if (!$util.isString(message.snapshotLocation)) + return "snapshotLocation: string expected"; + if (message.snapshotCreationSchedule != null && message.hasOwnProperty("snapshotCreationSchedule")) + if (!$util.isString(message.snapshotCreationSchedule)) + return "snapshotCreationSchedule: string expected"; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + return null; + }; + + /** + * Creates a ScheduledSnapshotsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig} ScheduledSnapshotsConfig + */ + ScheduledSnapshotsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.snapshotLocation != null) + message.snapshotLocation = String(object.snapshotLocation); + if (object.snapshotCreationSchedule != null) + message.snapshotCreationSchedule = String(object.snapshotCreationSchedule); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + return message; + }; + + /** + * Creates a plain object from a ScheduledSnapshotsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig} message ScheduledSnapshotsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScheduledSnapshotsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.snapshotCreationSchedule = ""; + object.timeZone = ""; + object.snapshotLocation = ""; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.snapshotCreationSchedule != null && message.hasOwnProperty("snapshotCreationSchedule")) + object.snapshotCreationSchedule = message.snapshotCreationSchedule; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + if (message.snapshotLocation != null && message.hasOwnProperty("snapshotLocation")) + object.snapshotLocation = message.snapshotLocation; + return object; + }; + + /** + * Converts this ScheduledSnapshotsConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig + * @instance + * @returns {Object.} JSON object + */ + ScheduledSnapshotsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ScheduledSnapshotsConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScheduledSnapshotsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig"; + }; + + return ScheduledSnapshotsConfig; + })(); + + v1.MasterAuthorizedNetworksConfig = (function() { + + /** + * Properties of a MasterAuthorizedNetworksConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IMasterAuthorizedNetworksConfig + * @property {boolean|null} [enabled] MasterAuthorizedNetworksConfig enabled + * @property {Array.|null} [cidrBlocks] MasterAuthorizedNetworksConfig cidrBlocks + */ + + /** + * Constructs a new MasterAuthorizedNetworksConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a MasterAuthorizedNetworksConfig. + * @implements IMasterAuthorizedNetworksConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig=} [properties] Properties to set + */ + function MasterAuthorizedNetworksConfig(properties) { + this.cidrBlocks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MasterAuthorizedNetworksConfig enabled. + * @member {boolean} enabled + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig + * @instance + */ + MasterAuthorizedNetworksConfig.prototype.enabled = false; + + /** + * MasterAuthorizedNetworksConfig cidrBlocks. + * @member {Array.} cidrBlocks + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig + * @instance + */ + MasterAuthorizedNetworksConfig.prototype.cidrBlocks = $util.emptyArray; + + /** + * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig instance + */ + MasterAuthorizedNetworksConfig.create = function create(properties) { + return new MasterAuthorizedNetworksConfig(properties); + }; + + /** + * Encodes the specified MasterAuthorizedNetworksConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MasterAuthorizedNetworksConfig.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.cidrBlocks != null && message.cidrBlocks.length) + for (var i = 0; i < message.cidrBlocks.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.encode(message.cidrBlocks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MasterAuthorizedNetworksConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MasterAuthorizedNetworksConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MasterAuthorizedNetworksConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + if (!(message.cidrBlocks && message.cidrBlocks.length)) + message.cidrBlocks = []; + message.cidrBlocks.push($root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MasterAuthorizedNetworksConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MasterAuthorizedNetworksConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MasterAuthorizedNetworksConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.cidrBlocks != null && message.hasOwnProperty("cidrBlocks")) { + if (!Array.isArray(message.cidrBlocks)) + return "cidrBlocks: array expected"; + for (var i = 0; i < message.cidrBlocks.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify(message.cidrBlocks[i]); + if (error) + return "cidrBlocks." + error; + } + } + return null; + }; + + /** + * Creates a MasterAuthorizedNetworksConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig + */ + MasterAuthorizedNetworksConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.cidrBlocks) { + if (!Array.isArray(object.cidrBlocks)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.cidrBlocks: array expected"); + message.cidrBlocks = []; + for (var i = 0; i < object.cidrBlocks.length; ++i) { + if (typeof object.cidrBlocks[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.cidrBlocks: object expected"); + message.cidrBlocks[i] = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.fromObject(object.cidrBlocks[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MasterAuthorizedNetworksConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MasterAuthorizedNetworksConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cidrBlocks = []; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.cidrBlocks && message.cidrBlocks.length) { + object.cidrBlocks = []; + for (var j = 0; j < message.cidrBlocks.length; ++j) + object.cidrBlocks[j] = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.toObject(message.cidrBlocks[j], options); + } + return object; + }; + + /** + * Converts this MasterAuthorizedNetworksConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig + * @instance + * @returns {Object.} JSON object + */ + MasterAuthorizedNetworksConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MasterAuthorizedNetworksConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MasterAuthorizedNetworksConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig"; + }; + + MasterAuthorizedNetworksConfig.CidrBlock = (function() { + + /** + * Properties of a CidrBlock. + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig + * @interface ICidrBlock + * @property {string|null} [displayName] CidrBlock displayName + * @property {string|null} [cidrBlock] CidrBlock cidrBlock + */ + + /** + * Constructs a new CidrBlock. + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig + * @classdesc Represents a CidrBlock. + * @implements ICidrBlock + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock=} [properties] Properties to set + */ + function CidrBlock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CidrBlock displayName. + * @member {string} displayName + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @instance + */ + CidrBlock.prototype.displayName = ""; + + /** + * CidrBlock cidrBlock. + * @member {string} cidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @instance + */ + CidrBlock.prototype.cidrBlock = ""; + + /** + * Creates a new CidrBlock instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock instance + */ + CidrBlock.create = function create(properties) { + return new CidrBlock(properties); + }; + + /** + * Encodes the specified CidrBlock message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock} message CidrBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CidrBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.cidrBlock != null && Object.hasOwnProperty.call(message, "cidrBlock")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cidrBlock); + return writer; + }; + + /** + * Encodes the specified CidrBlock message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock} message CidrBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CidrBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CidrBlock message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CidrBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.cidrBlock = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CidrBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CidrBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CidrBlock message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CidrBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.cidrBlock != null && message.hasOwnProperty("cidrBlock")) + if (!$util.isString(message.cidrBlock)) + return "cidrBlock: string expected"; + return null; + }; + + /** + * Creates a CidrBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock + */ + CidrBlock.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.cidrBlock != null) + message.cidrBlock = String(object.cidrBlock); + return message; + }; + + /** + * Creates a plain object from a CidrBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock} message CidrBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CidrBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.cidrBlock = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.cidrBlock != null && message.hasOwnProperty("cidrBlock")) + object.cidrBlock = message.cidrBlock; + return object; + }; + + /** + * Converts this CidrBlock to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @instance + * @returns {Object.} JSON object + */ + CidrBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CidrBlock + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CidrBlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock"; + }; + + return CidrBlock; + })(); + + return MasterAuthorizedNetworksConfig; + })(); + + v1.CloudDataLineageIntegration = (function() { + + /** + * Properties of a CloudDataLineageIntegration. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface ICloudDataLineageIntegration + * @property {boolean|null} [enabled] CloudDataLineageIntegration enabled + */ + + /** + * Constructs a new CloudDataLineageIntegration. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a CloudDataLineageIntegration. + * @implements ICloudDataLineageIntegration + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration=} [properties] Properties to set + */ + function CloudDataLineageIntegration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudDataLineageIntegration enabled. + * @member {boolean} enabled + * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration + * @instance + */ + CloudDataLineageIntegration.prototype.enabled = false; + + /** + * Creates a new CloudDataLineageIntegration instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration} CloudDataLineageIntegration instance + */ + CloudDataLineageIntegration.create = function create(properties) { + return new CloudDataLineageIntegration(properties); + }; + + /** + * Encodes the specified CloudDataLineageIntegration message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration} message CloudDataLineageIntegration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudDataLineageIntegration.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); + return writer; + }; + + /** + * Encodes the specified CloudDataLineageIntegration message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration} message CloudDataLineageIntegration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudDataLineageIntegration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudDataLineageIntegration message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration} CloudDataLineageIntegration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudDataLineageIntegration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudDataLineageIntegration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration} CloudDataLineageIntegration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudDataLineageIntegration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudDataLineageIntegration message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudDataLineageIntegration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a CloudDataLineageIntegration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration} CloudDataLineageIntegration + */ + CloudDataLineageIntegration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a CloudDataLineageIntegration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration + * @static + * @param {google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration} message CloudDataLineageIntegration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudDataLineageIntegration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this CloudDataLineageIntegration to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration + * @instance + * @returns {Object.} JSON object + */ + CloudDataLineageIntegration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudDataLineageIntegration + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudDataLineageIntegration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration"; + }; + + return CloudDataLineageIntegration; + })(); + + v1.Environment = (function() { + + /** + * Properties of an Environment. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IEnvironment + * @property {string|null} [name] Environment name + * @property {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig|null} [config] Environment config + * @property {string|null} [uuid] Environment uuid + * @property {google.cloud.orchestration.airflow.service.v1.Environment.State|null} [state] Environment state + * @property {google.protobuf.ITimestamp|null} [createTime] Environment createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime + * @property {Object.|null} [labels] Environment labels + * @property {boolean|null} [satisfiesPzs] Environment satisfiesPzs + * @property {boolean|null} [satisfiesPzi] Environment satisfiesPzi + * @property {google.cloud.orchestration.airflow.service.v1.IStorageConfig|null} [storageConfig] Environment storageConfig + */ + + /** + * Constructs a new Environment. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an Environment. + * @implements IEnvironment + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IEnvironment=} [properties] Properties to set + */ + function Environment(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]]; + } + + /** + * Environment name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.name = ""; + + /** + * Environment config. + * @member {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig|null|undefined} config + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.config = null; + + /** + * Environment uuid. + * @member {string} uuid + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.uuid = ""; + + /** + * Environment state. + * @member {google.cloud.orchestration.airflow.service.v1.Environment.State} state + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.state = 0; + + /** + * Environment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.createTime = null; + + /** + * Environment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.updateTime = null; + + /** + * Environment labels. + * @member {Object.} labels + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.labels = $util.emptyObject; + + /** + * Environment satisfiesPzs. + * @member {boolean} satisfiesPzs + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.satisfiesPzs = false; + + /** + * Environment satisfiesPzi. + * @member {boolean} satisfiesPzi + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.satisfiesPzi = false; + + /** + * Environment storageConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IStorageConfig|null|undefined} storageConfig + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + */ + Environment.prototype.storageConfig = null; + + /** + * Creates a new Environment instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IEnvironment=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.Environment} Environment instance + */ + Environment.create = function create(properties) { + return new Environment(properties); + }; + + /** + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.Environment.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IEnvironment} message Environment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Environment.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.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uuid); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.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.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.satisfiesPzs); + if (message.storageConfig != null && Object.hasOwnProperty.call(message, "storageConfig")) + $root.google.cloud.orchestration.airflow.service.v1.StorageConfig.encode(message.storageConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.satisfiesPzi); + return writer; + }; + + /** + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.Environment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IEnvironment} message Environment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Environment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Environment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.Environment} Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Environment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.Environment(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.config = $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.uuid = reader.string(); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $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; + } + case 8: { + message.satisfiesPzs = reader.bool(); + break; + } + case 10: { + message.satisfiesPzi = reader.bool(); + break; + } + case 9: { + message.storageConfig = $root.google.cloud.orchestration.airflow.service.v1.StorageConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Environment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.Environment} Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Environment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Environment message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Environment.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.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.verify(message.config); + if (error) + return "config." + error; + } + if (message.uuid != null && message.hasOwnProperty("uuid")) + if (!$util.isString(message.uuid)) + return "uuid: 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.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.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.storageConfig != null && message.hasOwnProperty("storageConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.StorageConfig.verify(message.storageConfig); + if (error) + return "storageConfig." + error; + } + return null; + }; + + /** + * Creates an Environment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.Environment} Environment + */ + Environment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.Environment) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.Environment(); + if (object.name != null) + message.name = String(object.name); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.Environment.config: object expected"); + message.config = $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.fromObject(object.config); + } + if (object.uuid != null) + message.uuid = String(object.uuid); + 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 "RUNNING": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "DELETING": + case 4: + message.state = 4; + break; + case "ERROR": + case 5: + message.state = 5; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.Environment.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.Environment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.Environment.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.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); + if (object.satisfiesPzi != null) + message.satisfiesPzi = Boolean(object.satisfiesPzi); + if (object.storageConfig != null) { + if (typeof object.storageConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.Environment.storageConfig: object expected"); + message.storageConfig = $root.google.cloud.orchestration.airflow.service.v1.StorageConfig.fromObject(object.storageConfig); + } + return message; + }; + + /** + * Creates a plain object from an Environment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @static + * @param {google.cloud.orchestration.airflow.service.v1.Environment} message Environment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Environment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.config = null; + object.uuid = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.updateTime = null; + object.satisfiesPzs = false; + object.storageConfig = null; + object.satisfiesPzi = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.toObject(message.config, options); + if (message.uuid != null && message.hasOwnProperty("uuid")) + object.uuid = message.uuid; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.Environment.State[message.state] === undefined ? message.state : $root.google.cloud.orchestration.airflow.service.v1.Environment.State[message.state] : message.state; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + 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.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = message.satisfiesPzs; + if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) + object.storageConfig = $root.google.cloud.orchestration.airflow.service.v1.StorageConfig.toObject(message.storageConfig, options); + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + object.satisfiesPzi = message.satisfiesPzi; + return object; + }; + + /** + * Converts this Environment to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @instance + * @returns {Object.} JSON object + */ + Environment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Environment + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.Environment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Environment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.Environment"; + }; + + /** + * State enum. + * @name google.cloud.orchestration.airflow.service.v1.Environment.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} UPDATING=3 UPDATING value + * @property {number} DELETING=4 DELETING value + * @property {number} ERROR=5 ERROR value + */ + Environment.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "DELETING"] = 4; + values[valuesById[5] = "ERROR"] = 5; + return values; + })(); + + return Environment; + })(); + + v1.CheckUpgradeRequest = (function() { + + /** + * Properties of a CheckUpgradeRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface ICheckUpgradeRequest + * @property {string|null} [environment] CheckUpgradeRequest environment + * @property {string|null} [imageVersion] CheckUpgradeRequest imageVersion + */ + + /** + * Constructs a new CheckUpgradeRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a CheckUpgradeRequest. + * @implements ICheckUpgradeRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest=} [properties] Properties to set + */ + function CheckUpgradeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckUpgradeRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest + * @instance + */ + CheckUpgradeRequest.prototype.environment = ""; + + /** + * CheckUpgradeRequest imageVersion. + * @member {string} imageVersion + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest + * @instance + */ + CheckUpgradeRequest.prototype.imageVersion = ""; + + /** + * Creates a new CheckUpgradeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest} CheckUpgradeRequest instance + */ + CheckUpgradeRequest.create = function create(properties) { + return new CheckUpgradeRequest(properties); + }; + + /** + * Encodes the specified CheckUpgradeRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest} message CheckUpgradeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckUpgradeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageVersion); + return writer; + }; + + /** + * Encodes the specified CheckUpgradeRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest} message CheckUpgradeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckUpgradeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckUpgradeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest} CheckUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckUpgradeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); + break; + } + case 2: { + message.imageVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckUpgradeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest} CheckUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckUpgradeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckUpgradeRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckUpgradeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + if (!$util.isString(message.imageVersion)) + return "imageVersion: string expected"; + return null; + }; + + /** + * Creates a CheckUpgradeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest} CheckUpgradeRequest + */ + CheckUpgradeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.imageVersion != null) + message.imageVersion = String(object.imageVersion); + return message; + }; + + /** + * Creates a plain object from a CheckUpgradeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest} message CheckUpgradeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckUpgradeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = ""; + object.imageVersion = ""; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + object.imageVersion = message.imageVersion; + return object; + }; + + /** + * Converts this CheckUpgradeRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest + * @instance + * @returns {Object.} JSON object + */ + CheckUpgradeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckUpgradeRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckUpgradeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest"; + }; + + return CheckUpgradeRequest; + })(); + + v1.CheckUpgradeResponse = (function() { + + /** + * Properties of a CheckUpgradeResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface ICheckUpgradeResponse + * @property {string|null} [buildLogUri] CheckUpgradeResponse buildLogUri + * @property {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult|null} [containsPypiModulesConflict] CheckUpgradeResponse containsPypiModulesConflict + * @property {string|null} [pypiConflictBuildLogExtract] CheckUpgradeResponse pypiConflictBuildLogExtract + * @property {string|null} [imageVersion] CheckUpgradeResponse imageVersion + * @property {Object.|null} [pypiDependencies] CheckUpgradeResponse pypiDependencies + */ + + /** + * Constructs a new CheckUpgradeResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a CheckUpgradeResponse. + * @implements ICheckUpgradeResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse=} [properties] Properties to set + */ + function CheckUpgradeResponse(properties) { + this.pypiDependencies = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckUpgradeResponse buildLogUri. + * @member {string} buildLogUri + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.buildLogUri = ""; + + /** + * CheckUpgradeResponse containsPypiModulesConflict. + * @member {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult} containsPypiModulesConflict + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.containsPypiModulesConflict = 0; + + /** + * CheckUpgradeResponse pypiConflictBuildLogExtract. + * @member {string} pypiConflictBuildLogExtract + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.pypiConflictBuildLogExtract = ""; + + /** + * CheckUpgradeResponse imageVersion. + * @member {string} imageVersion + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.imageVersion = ""; + + /** + * CheckUpgradeResponse pypiDependencies. + * @member {Object.} pypiDependencies + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.pypiDependencies = $util.emptyObject; + + /** + * Creates a new CheckUpgradeResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} CheckUpgradeResponse instance + */ + CheckUpgradeResponse.create = function create(properties) { + return new CheckUpgradeResponse(properties); + }; + + /** + * Encodes the specified CheckUpgradeResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse} message CheckUpgradeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckUpgradeResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.buildLogUri != null && Object.hasOwnProperty.call(message, "buildLogUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.buildLogUri); + if (message.pypiConflictBuildLogExtract != null && Object.hasOwnProperty.call(message, "pypiConflictBuildLogExtract")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pypiConflictBuildLogExtract); + if (message.containsPypiModulesConflict != null && Object.hasOwnProperty.call(message, "containsPypiModulesConflict")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.containsPypiModulesConflict); + if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.imageVersion); + if (message.pypiDependencies != null && Object.hasOwnProperty.call(message, "pypiDependencies")) + for (var keys = Object.keys(message.pypiDependencies), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.pypiDependencies[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified CheckUpgradeResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse} message CheckUpgradeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckUpgradeResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckUpgradeResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} CheckUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckUpgradeResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.buildLogUri = reader.string(); + break; + } + case 4: { + message.containsPypiModulesConflict = reader.int32(); + break; + } + case 3: { + message.pypiConflictBuildLogExtract = reader.string(); + break; + } + case 5: { + message.imageVersion = reader.string(); + break; + } + case 6: { + if (message.pypiDependencies === $util.emptyObject) + message.pypiDependencies = {}; + 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.pypiDependencies[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckUpgradeResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} CheckUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckUpgradeResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckUpgradeResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckUpgradeResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.buildLogUri != null && message.hasOwnProperty("buildLogUri")) + if (!$util.isString(message.buildLogUri)) + return "buildLogUri: string expected"; + if (message.containsPypiModulesConflict != null && message.hasOwnProperty("containsPypiModulesConflict")) + switch (message.containsPypiModulesConflict) { + default: + return "containsPypiModulesConflict: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.pypiConflictBuildLogExtract != null && message.hasOwnProperty("pypiConflictBuildLogExtract")) + if (!$util.isString(message.pypiConflictBuildLogExtract)) + return "pypiConflictBuildLogExtract: string expected"; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + if (!$util.isString(message.imageVersion)) + return "imageVersion: string expected"; + if (message.pypiDependencies != null && message.hasOwnProperty("pypiDependencies")) { + if (!$util.isObject(message.pypiDependencies)) + return "pypiDependencies: object expected"; + var key = Object.keys(message.pypiDependencies); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.pypiDependencies[key[i]])) + return "pypiDependencies: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a CheckUpgradeResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} CheckUpgradeResponse + */ + CheckUpgradeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse(); + if (object.buildLogUri != null) + message.buildLogUri = String(object.buildLogUri); + switch (object.containsPypiModulesConflict) { + default: + if (typeof object.containsPypiModulesConflict === "number") { + message.containsPypiModulesConflict = object.containsPypiModulesConflict; + break; + } + break; + case "CONFLICT_RESULT_UNSPECIFIED": + case 0: + message.containsPypiModulesConflict = 0; + break; + case "CONFLICT": + case 1: + message.containsPypiModulesConflict = 1; + break; + case "NO_CONFLICT": + case 2: + message.containsPypiModulesConflict = 2; + break; + } + if (object.pypiConflictBuildLogExtract != null) + message.pypiConflictBuildLogExtract = String(object.pypiConflictBuildLogExtract); + if (object.imageVersion != null) + message.imageVersion = String(object.imageVersion); + if (object.pypiDependencies) { + if (typeof object.pypiDependencies !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.pypiDependencies: object expected"); + message.pypiDependencies = {}; + for (var keys = Object.keys(object.pypiDependencies), i = 0; i < keys.length; ++i) + message.pypiDependencies[keys[i]] = String(object.pypiDependencies[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a CheckUpgradeResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} message CheckUpgradeResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckUpgradeResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.pypiDependencies = {}; + if (options.defaults) { + object.buildLogUri = ""; + object.pypiConflictBuildLogExtract = ""; + object.containsPypiModulesConflict = options.enums === String ? "CONFLICT_RESULT_UNSPECIFIED" : 0; + object.imageVersion = ""; + } + if (message.buildLogUri != null && message.hasOwnProperty("buildLogUri")) + object.buildLogUri = message.buildLogUri; + if (message.pypiConflictBuildLogExtract != null && message.hasOwnProperty("pypiConflictBuildLogExtract")) + object.pypiConflictBuildLogExtract = message.pypiConflictBuildLogExtract; + if (message.containsPypiModulesConflict != null && message.hasOwnProperty("containsPypiModulesConflict")) + object.containsPypiModulesConflict = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult[message.containsPypiModulesConflict] === undefined ? message.containsPypiModulesConflict : $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult[message.containsPypiModulesConflict] : message.containsPypiModulesConflict; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + object.imageVersion = message.imageVersion; + var keys2; + if (message.pypiDependencies && (keys2 = Object.keys(message.pypiDependencies)).length) { + object.pypiDependencies = {}; + for (var j = 0; j < keys2.length; ++j) + object.pypiDependencies[keys2[j]] = message.pypiDependencies[keys2[j]]; + } + return object; + }; + + /** + * Converts this CheckUpgradeResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @instance + * @returns {Object.} JSON object + */ + CheckUpgradeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckUpgradeResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckUpgradeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse"; + }; + + /** + * ConflictResult enum. + * @name google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult + * @enum {number} + * @property {number} CONFLICT_RESULT_UNSPECIFIED=0 CONFLICT_RESULT_UNSPECIFIED value + * @property {number} CONFLICT=1 CONFLICT value + * @property {number} NO_CONFLICT=2 NO_CONFLICT value + */ + CheckUpgradeResponse.ConflictResult = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONFLICT_RESULT_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONFLICT"] = 1; + values[valuesById[2] = "NO_CONFLICT"] = 2; + return values; + })(); + + return CheckUpgradeResponse; + })(); + + v1.DataRetentionConfig = (function() { + + /** + * Properties of a DataRetentionConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IDataRetentionConfig + * @property {google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig|null} [airflowMetadataRetentionConfig] DataRetentionConfig airflowMetadataRetentionConfig + * @property {google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig|null} [taskLogsRetentionConfig] DataRetentionConfig taskLogsRetentionConfig + */ + + /** + * Constructs a new DataRetentionConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a DataRetentionConfig. + * @implements IDataRetentionConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig=} [properties] Properties to set + */ + function DataRetentionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataRetentionConfig airflowMetadataRetentionConfig. + * @member {google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig|null|undefined} airflowMetadataRetentionConfig + * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig + * @instance + */ + DataRetentionConfig.prototype.airflowMetadataRetentionConfig = null; + + /** + * DataRetentionConfig taskLogsRetentionConfig. + * @member {google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig|null|undefined} taskLogsRetentionConfig + * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig + * @instance + */ + DataRetentionConfig.prototype.taskLogsRetentionConfig = null; + + /** + * Creates a new DataRetentionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.DataRetentionConfig} DataRetentionConfig instance + */ + DataRetentionConfig.create = function create(properties) { + return new DataRetentionConfig(properties); + }; + + /** + * Encodes the specified DataRetentionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig} message DataRetentionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataRetentionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.airflowMetadataRetentionConfig != null && Object.hasOwnProperty.call(message, "airflowMetadataRetentionConfig")) + $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.encode(message.airflowMetadataRetentionConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.taskLogsRetentionConfig != null && Object.hasOwnProperty.call(message, "taskLogsRetentionConfig")) + $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.encode(message.taskLogsRetentionConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataRetentionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig} message DataRetentionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataRetentionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataRetentionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.DataRetentionConfig} DataRetentionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataRetentionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.airflowMetadataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.decode(reader, reader.uint32()); + break; + } + case 2: { + message.taskLogsRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataRetentionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.DataRetentionConfig} DataRetentionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataRetentionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataRetentionConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataRetentionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.airflowMetadataRetentionConfig != null && message.hasOwnProperty("airflowMetadataRetentionConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.verify(message.airflowMetadataRetentionConfig); + if (error) + return "airflowMetadataRetentionConfig." + error; + } + if (message.taskLogsRetentionConfig != null && message.hasOwnProperty("taskLogsRetentionConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.verify(message.taskLogsRetentionConfig); + if (error) + return "taskLogsRetentionConfig." + error; + } + return null; + }; + + /** + * Creates a DataRetentionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.DataRetentionConfig} DataRetentionConfig + */ + DataRetentionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig(); + if (object.airflowMetadataRetentionConfig != null) { + if (typeof object.airflowMetadataRetentionConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.airflowMetadataRetentionConfig: object expected"); + message.airflowMetadataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.fromObject(object.airflowMetadataRetentionConfig); + } + if (object.taskLogsRetentionConfig != null) { + if (typeof object.taskLogsRetentionConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.taskLogsRetentionConfig: object expected"); + message.taskLogsRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.fromObject(object.taskLogsRetentionConfig); + } + return message; + }; + + /** + * Creates a plain object from a DataRetentionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.DataRetentionConfig} message DataRetentionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataRetentionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.airflowMetadataRetentionConfig = null; + object.taskLogsRetentionConfig = null; + } + if (message.airflowMetadataRetentionConfig != null && message.hasOwnProperty("airflowMetadataRetentionConfig")) + object.airflowMetadataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.toObject(message.airflowMetadataRetentionConfig, options); + if (message.taskLogsRetentionConfig != null && message.hasOwnProperty("taskLogsRetentionConfig")) + object.taskLogsRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.toObject(message.taskLogsRetentionConfig, options); + return object; + }; + + /** + * Converts this DataRetentionConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig + * @instance + * @returns {Object.} JSON object + */ + DataRetentionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataRetentionConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataRetentionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.DataRetentionConfig"; + }; + + return DataRetentionConfig; + })(); + + v1.TaskLogsRetentionConfig = (function() { + + /** + * Properties of a TaskLogsRetentionConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface ITaskLogsRetentionConfig + * @property {google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode|null} [storageMode] TaskLogsRetentionConfig storageMode + */ + + /** + * Constructs a new TaskLogsRetentionConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a TaskLogsRetentionConfig. + * @implements ITaskLogsRetentionConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig=} [properties] Properties to set + */ + function TaskLogsRetentionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TaskLogsRetentionConfig storageMode. + * @member {google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode} storageMode + * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig + * @instance + */ + TaskLogsRetentionConfig.prototype.storageMode = 0; + + /** + * Creates a new TaskLogsRetentionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig} TaskLogsRetentionConfig instance + */ + TaskLogsRetentionConfig.create = function create(properties) { + return new TaskLogsRetentionConfig(properties); + }; + + /** + * Encodes the specified TaskLogsRetentionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig} message TaskLogsRetentionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TaskLogsRetentionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.storageMode != null && Object.hasOwnProperty.call(message, "storageMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.storageMode); + return writer; + }; + + /** + * Encodes the specified TaskLogsRetentionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig} message TaskLogsRetentionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TaskLogsRetentionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TaskLogsRetentionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig} TaskLogsRetentionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TaskLogsRetentionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.storageMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TaskLogsRetentionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig} TaskLogsRetentionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TaskLogsRetentionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TaskLogsRetentionConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TaskLogsRetentionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.storageMode != null && message.hasOwnProperty("storageMode")) + switch (message.storageMode) { + default: + return "storageMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a TaskLogsRetentionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig} TaskLogsRetentionConfig + */ + TaskLogsRetentionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig(); + switch (object.storageMode) { + default: + if (typeof object.storageMode === "number") { + message.storageMode = object.storageMode; + break; + } + break; + case "TASK_LOGS_STORAGE_MODE_UNSPECIFIED": + case 0: + message.storageMode = 0; + break; + case "CLOUD_LOGGING_AND_CLOUD_STORAGE": + case 1: + message.storageMode = 1; + break; + case "CLOUD_LOGGING_ONLY": + case 2: + message.storageMode = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a TaskLogsRetentionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig} message TaskLogsRetentionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TaskLogsRetentionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.storageMode = options.enums === String ? "TASK_LOGS_STORAGE_MODE_UNSPECIFIED" : 0; + if (message.storageMode != null && message.hasOwnProperty("storageMode")) + object.storageMode = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode[message.storageMode] === undefined ? message.storageMode : $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode[message.storageMode] : message.storageMode; + return object; + }; + + /** + * Converts this TaskLogsRetentionConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig + * @instance + * @returns {Object.} JSON object + */ + TaskLogsRetentionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TaskLogsRetentionConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TaskLogsRetentionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig"; + }; + + /** + * TaskLogsStorageMode enum. + * @name google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode + * @enum {number} + * @property {number} TASK_LOGS_STORAGE_MODE_UNSPECIFIED=0 TASK_LOGS_STORAGE_MODE_UNSPECIFIED value + * @property {number} CLOUD_LOGGING_AND_CLOUD_STORAGE=1 CLOUD_LOGGING_AND_CLOUD_STORAGE value + * @property {number} CLOUD_LOGGING_ONLY=2 CLOUD_LOGGING_ONLY value + */ + TaskLogsRetentionConfig.TaskLogsStorageMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TASK_LOGS_STORAGE_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_LOGGING_AND_CLOUD_STORAGE"] = 1; + values[valuesById[2] = "CLOUD_LOGGING_ONLY"] = 2; + return values; + })(); + + return TaskLogsRetentionConfig; + })(); + + v1.AirflowMetadataRetentionPolicyConfig = (function() { + + /** + * Properties of an AirflowMetadataRetentionPolicyConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IAirflowMetadataRetentionPolicyConfig + * @property {google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode|null} [retentionMode] AirflowMetadataRetentionPolicyConfig retentionMode + * @property {number|null} [retentionDays] AirflowMetadataRetentionPolicyConfig retentionDays + */ + + /** + * Constructs a new AirflowMetadataRetentionPolicyConfig. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an AirflowMetadataRetentionPolicyConfig. + * @implements IAirflowMetadataRetentionPolicyConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig=} [properties] Properties to set + */ + function AirflowMetadataRetentionPolicyConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AirflowMetadataRetentionPolicyConfig retentionMode. + * @member {google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode} retentionMode + * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig + * @instance + */ + AirflowMetadataRetentionPolicyConfig.prototype.retentionMode = 0; + + /** + * AirflowMetadataRetentionPolicyConfig retentionDays. + * @member {number} retentionDays + * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig + * @instance + */ + AirflowMetadataRetentionPolicyConfig.prototype.retentionDays = 0; + + /** + * Creates a new AirflowMetadataRetentionPolicyConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig} AirflowMetadataRetentionPolicyConfig instance + */ + AirflowMetadataRetentionPolicyConfig.create = function create(properties) { + return new AirflowMetadataRetentionPolicyConfig(properties); + }; + + /** + * Encodes the specified AirflowMetadataRetentionPolicyConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig} message AirflowMetadataRetentionPolicyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AirflowMetadataRetentionPolicyConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.retentionMode != null && Object.hasOwnProperty.call(message, "retentionMode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.retentionMode); + if (message.retentionDays != null && Object.hasOwnProperty.call(message, "retentionDays")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.retentionDays); + return writer; + }; + + /** + * Encodes the specified AirflowMetadataRetentionPolicyConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig} message AirflowMetadataRetentionPolicyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AirflowMetadataRetentionPolicyConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AirflowMetadataRetentionPolicyConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig} AirflowMetadataRetentionPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AirflowMetadataRetentionPolicyConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.retentionMode = reader.int32(); + break; + } + case 2: { + message.retentionDays = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AirflowMetadataRetentionPolicyConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig} AirflowMetadataRetentionPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AirflowMetadataRetentionPolicyConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AirflowMetadataRetentionPolicyConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AirflowMetadataRetentionPolicyConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.retentionMode != null && message.hasOwnProperty("retentionMode")) + switch (message.retentionMode) { + default: + return "retentionMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) + if (!$util.isInteger(message.retentionDays)) + return "retentionDays: integer expected"; + return null; + }; + + /** + * Creates an AirflowMetadataRetentionPolicyConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig} AirflowMetadataRetentionPolicyConfig + */ + AirflowMetadataRetentionPolicyConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig(); + switch (object.retentionMode) { + default: + if (typeof object.retentionMode === "number") { + message.retentionMode = object.retentionMode; + break; + } + break; + case "RETENTION_MODE_UNSPECIFIED": + case 0: + message.retentionMode = 0; + break; + case "RETENTION_MODE_ENABLED": + case 1: + message.retentionMode = 1; + break; + case "RETENTION_MODE_DISABLED": + case 2: + message.retentionMode = 2; + break; + } + if (object.retentionDays != null) + message.retentionDays = object.retentionDays | 0; + return message; + }; + + /** + * Creates a plain object from an AirflowMetadataRetentionPolicyConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig} message AirflowMetadataRetentionPolicyConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AirflowMetadataRetentionPolicyConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.retentionMode = options.enums === String ? "RETENTION_MODE_UNSPECIFIED" : 0; + object.retentionDays = 0; + } + if (message.retentionMode != null && message.hasOwnProperty("retentionMode")) + object.retentionMode = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode[message.retentionMode] === undefined ? message.retentionMode : $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode[message.retentionMode] : message.retentionMode; + if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) + object.retentionDays = message.retentionDays; + return object; + }; + + /** + * Converts this AirflowMetadataRetentionPolicyConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig + * @instance + * @returns {Object.} JSON object + */ + AirflowMetadataRetentionPolicyConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AirflowMetadataRetentionPolicyConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AirflowMetadataRetentionPolicyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig"; + }; + + /** + * RetentionMode enum. + * @name google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode + * @enum {number} + * @property {number} RETENTION_MODE_UNSPECIFIED=0 RETENTION_MODE_UNSPECIFIED value + * @property {number} RETENTION_MODE_ENABLED=1 RETENTION_MODE_ENABLED value + * @property {number} RETENTION_MODE_DISABLED=2 RETENTION_MODE_DISABLED value + */ + AirflowMetadataRetentionPolicyConfig.RetentionMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RETENTION_MODE_ENABLED"] = 1; + values[valuesById[2] = "RETENTION_MODE_DISABLED"] = 2; + return values; + })(); + + return AirflowMetadataRetentionPolicyConfig; + })(); + + v1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IOperationMetadata + * @property {google.cloud.orchestration.airflow.service.v1.OperationMetadata.State|null} [state] OperationMetadata state + * @property {google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type|null} [operationType] OperationMetadata operationType + * @property {string|null} [resource] OperationMetadata resource + * @property {string|null} [resourceUuid] OperationMetadata resourceUuid + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.orchestration.airflow.service.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 state. + * @member {google.cloud.orchestration.airflow.service.v1.OperationMetadata.State} state + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.state = 0; + + /** + * OperationMetadata operationType. + * @member {google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type} operationType + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.operationType = 0; + + /** + * OperationMetadata resource. + * @member {string} resource + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.resource = ""; + + /** + * OperationMetadata resourceUuid. + * @member {string} resourceUuid + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.resourceUuid = ""; + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @static + * @param {google.cloud.orchestration.airflow.service.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.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operationType); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); + if (message.resourceUuid != null && Object.hasOwnProperty.call(message, "resourceUuid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceUuid); + 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.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @static + * @param {google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.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.orchestration.airflow.service.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.operationType = reader.int32(); + break; + } + case 3: { + message.resource = reader.string(); + break; + } + case 4: { + message.resourceUuid = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + 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.orchestration.airflow.service.v1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.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.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 3: + case 4: + break; + } + if (message.operationType != null && message.hasOwnProperty("operationType")) + switch (message.operationType) { + default: + return "operationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.resourceUuid != null && message.hasOwnProperty("resourceUuid")) + if (!$util.isString(message.resourceUuid)) + return "resourceUuid: 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.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata(); + 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 "PENDING": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "SUCCEEDED": + case 3: + message.state = 3; + break; + case "SUCCESSFUL": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + } + switch (object.operationType) { + default: + if (typeof object.operationType === "number") { + message.operationType = object.operationType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.operationType = 0; + break; + case "CREATE": + case 1: + message.operationType = 1; + break; + case "DELETE": + case 2: + message.operationType = 2; + break; + case "UPDATE": + case 3: + message.operationType = 3; + break; + case "CHECK": + case 4: + message.operationType = 4; + break; + case "SAVE_SNAPSHOT": + case 5: + message.operationType = 5; + break; + case "LOAD_SNAPSHOT": + case 6: + message.operationType = 6; + break; + case "DATABASE_FAILOVER": + case 7: + message.operationType = 7; + break; + } + if (object.resource != null) + message.resource = String(object.resource); + if (object.resourceUuid != null) + message.resourceUuid = String(object.resourceUuid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.v1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata + * @static + * @param {google.cloud.orchestration.airflow.service.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.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.operationType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.resource = ""; + object.resourceUuid = ""; + object.createTime = null; + object.endTime = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State[message.state] : message.state; + if (message.operationType != null && message.hasOwnProperty("operationType")) + object.operationType = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type[message.operationType] === undefined ? message.operationType : $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type[message.operationType] : message.operationType; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.resourceUuid != null && message.hasOwnProperty("resourceUuid")) + object.resourceUuid = message.resourceUuid; + 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); + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.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.orchestration.airflow.service.v1.OperationMetadata"; + }; + + /** + * State enum. + * @name google.cloud.orchestration.airflow.service.v1.OperationMetadata.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} SUCCEEDED=3 SUCCEEDED value + * @property {number} SUCCESSFUL=3 SUCCESSFUL value + * @property {number} FAILED=4 FAILED value + */ + OperationMetadata.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "SUCCEEDED"] = 3; + values["SUCCESSFUL"] = 3; + values[valuesById[4] = "FAILED"] = 4; + return values; + })(); + + /** + * Type enum. + * @name google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} CREATE=1 CREATE value + * @property {number} DELETE=2 DELETE value + * @property {number} UPDATE=3 UPDATE value + * @property {number} CHECK=4 CHECK value + * @property {number} SAVE_SNAPSHOT=5 SAVE_SNAPSHOT value + * @property {number} LOAD_SNAPSHOT=6 LOAD_SNAPSHOT value + * @property {number} DATABASE_FAILOVER=7 DATABASE_FAILOVER value + */ + OperationMetadata.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATE"] = 1; + values[valuesById[2] = "DELETE"] = 2; + values[valuesById[3] = "UPDATE"] = 3; + values[valuesById[4] = "CHECK"] = 4; + values[valuesById[5] = "SAVE_SNAPSHOT"] = 5; + values[valuesById[6] = "LOAD_SNAPSHOT"] = 6; + values[valuesById[7] = "DATABASE_FAILOVER"] = 7; + return values; + })(); + + return OperationMetadata; + })(); + + v1.ImageVersions = (function() { + + /** + * Constructs a new ImageVersions service. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an ImageVersions + * @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 ImageVersions(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ImageVersions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ImageVersions; + + /** + * Creates new ImageVersions service using the specified rpc implementation. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersions + * @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 {ImageVersions} RPC service. Useful where requests and/or responses are streamed. + */ + ImageVersions.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.ImageVersions|listImageVersions}. + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersions + * @typedef ListImageVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} [response] ListImageVersionsResponse + */ + + /** + * Calls ListImageVersions. + * @function listImageVersions + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersions + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest} request ListImageVersionsRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1.ImageVersions.ListImageVersionsCallback} callback Node-style callback called with the error, if any, and ListImageVersionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ImageVersions.prototype.listImageVersions = function listImageVersions(request, callback) { + return this.rpcCall(listImageVersions, $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest, $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse, request, callback); + }, "name", { value: "ListImageVersions" }); + + /** + * Calls ListImageVersions. + * @function listImageVersions + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersions + * @instance + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest} request ListImageVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ImageVersions; + })(); + + v1.ListImageVersionsRequest = (function() { + + /** + * Properties of a ListImageVersionsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IListImageVersionsRequest + * @property {string|null} [parent] ListImageVersionsRequest parent + * @property {number|null} [pageSize] ListImageVersionsRequest pageSize + * @property {string|null} [pageToken] ListImageVersionsRequest pageToken + * @property {boolean|null} [includePastReleases] ListImageVersionsRequest includePastReleases + */ + + /** + * Constructs a new ListImageVersionsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a ListImageVersionsRequest. + * @implements IListImageVersionsRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest=} [properties] Properties to set + */ + function ListImageVersionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListImageVersionsRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @instance + */ + ListImageVersionsRequest.prototype.parent = ""; + + /** + * ListImageVersionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @instance + */ + ListImageVersionsRequest.prototype.pageSize = 0; + + /** + * ListImageVersionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @instance + */ + ListImageVersionsRequest.prototype.pageToken = ""; + + /** + * ListImageVersionsRequest includePastReleases. + * @member {boolean} includePastReleases + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @instance + */ + ListImageVersionsRequest.prototype.includePastReleases = false; + + /** + * Creates a new ListImageVersionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} ListImageVersionsRequest instance + */ + ListImageVersionsRequest.create = function create(properties) { + return new ListImageVersionsRequest(properties); + }; + + /** + * Encodes the specified ListImageVersionsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest} message ListImageVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImageVersionsRequest.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.includePastReleases != null && Object.hasOwnProperty.call(message, "includePastReleases")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.includePastReleases); + return writer; + }; + + /** + * Encodes the specified ListImageVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest} message ListImageVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImageVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListImageVersionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} ListImageVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImageVersionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.includePastReleases = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListImageVersionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} ListImageVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImageVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListImageVersionsRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListImageVersionsRequest.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.includePastReleases != null && message.hasOwnProperty("includePastReleases")) + if (typeof message.includePastReleases !== "boolean") + return "includePastReleases: boolean expected"; + return null; + }; + + /** + * Creates a ListImageVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} ListImageVersionsRequest + */ + ListImageVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest(); + 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.includePastReleases != null) + message.includePastReleases = Boolean(object.includePastReleases); + return message; + }; + + /** + * Creates a plain object from a ListImageVersionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} message ListImageVersionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListImageVersionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.includePastReleases = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.includePastReleases != null && message.hasOwnProperty("includePastReleases")) + object.includePastReleases = message.includePastReleases; + return object; + }; + + /** + * Converts this ListImageVersionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListImageVersionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListImageVersionsRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListImageVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest"; + }; + + return ListImageVersionsRequest; + })(); + + v1.ListImageVersionsResponse = (function() { + + /** + * Properties of a ListImageVersionsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IListImageVersionsResponse + * @property {Array.|null} [imageVersions] ListImageVersionsResponse imageVersions + * @property {string|null} [nextPageToken] ListImageVersionsResponse nextPageToken + */ + + /** + * Constructs a new ListImageVersionsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents a ListImageVersionsResponse. + * @implements IListImageVersionsResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse=} [properties] Properties to set + */ + function ListImageVersionsResponse(properties) { + this.imageVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListImageVersionsResponse imageVersions. + * @member {Array.} imageVersions + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @instance + */ + ListImageVersionsResponse.prototype.imageVersions = $util.emptyArray; + + /** + * ListImageVersionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @instance + */ + ListImageVersionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListImageVersionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} ListImageVersionsResponse instance + */ + ListImageVersionsResponse.create = function create(properties) { + return new ListImageVersionsResponse(properties); + }; + + /** + * Encodes the specified ListImageVersionsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse} message ListImageVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImageVersionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageVersions != null && message.imageVersions.length) + for (var i = 0; i < message.imageVersions.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1.ImageVersion.encode(message.imageVersions[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 ListImageVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse} message ListImageVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImageVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListImageVersionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} ListImageVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImageVersionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.imageVersions && message.imageVersions.length)) + message.imageVersions = []; + message.imageVersions.push($root.google.cloud.orchestration.airflow.service.v1.ImageVersion.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListImageVersionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} ListImageVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImageVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListImageVersionsResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListImageVersionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageVersions != null && message.hasOwnProperty("imageVersions")) { + if (!Array.isArray(message.imageVersions)) + return "imageVersions: array expected"; + for (var i = 0; i < message.imageVersions.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1.ImageVersion.verify(message.imageVersions[i]); + if (error) + return "imageVersions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListImageVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} ListImageVersionsResponse + */ + ListImageVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse(); + if (object.imageVersions) { + if (!Array.isArray(object.imageVersions)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.imageVersions: array expected"); + message.imageVersions = []; + for (var i = 0; i < object.imageVersions.length; ++i) { + if (typeof object.imageVersions[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.imageVersions: object expected"); + message.imageVersions[i] = $root.google.cloud.orchestration.airflow.service.v1.ImageVersion.fromObject(object.imageVersions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListImageVersionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} message ListImageVersionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListImageVersionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.imageVersions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.imageVersions && message.imageVersions.length) { + object.imageVersions = []; + for (var j = 0; j < message.imageVersions.length; ++j) + object.imageVersions[j] = $root.google.cloud.orchestration.airflow.service.v1.ImageVersion.toObject(message.imageVersions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListImageVersionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListImageVersionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListImageVersionsResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListImageVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse"; + }; + + return ListImageVersionsResponse; + })(); + + v1.ImageVersion = (function() { + + /** + * Properties of an ImageVersion. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @interface IImageVersion + * @property {string|null} [imageVersionId] ImageVersion imageVersionId + * @property {boolean|null} [isDefault] ImageVersion isDefault + * @property {Array.|null} [supportedPythonVersions] ImageVersion supportedPythonVersions + * @property {google.type.IDate|null} [releaseDate] ImageVersion releaseDate + * @property {boolean|null} [creationDisabled] ImageVersion creationDisabled + * @property {boolean|null} [upgradeDisabled] ImageVersion upgradeDisabled + */ + + /** + * Constructs a new ImageVersion. + * @memberof google.cloud.orchestration.airflow.service.v1 + * @classdesc Represents an ImageVersion. + * @implements IImageVersion + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1.IImageVersion=} [properties] Properties to set + */ + function ImageVersion(properties) { + this.supportedPythonVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImageVersion imageVersionId. + * @member {string} imageVersionId + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @instance + */ + ImageVersion.prototype.imageVersionId = ""; + + /** + * ImageVersion isDefault. + * @member {boolean} isDefault + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @instance + */ + ImageVersion.prototype.isDefault = false; + + /** + * ImageVersion supportedPythonVersions. + * @member {Array.} supportedPythonVersions + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @instance + */ + ImageVersion.prototype.supportedPythonVersions = $util.emptyArray; + + /** + * ImageVersion releaseDate. + * @member {google.type.IDate|null|undefined} releaseDate + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @instance + */ + ImageVersion.prototype.releaseDate = null; + + /** + * ImageVersion creationDisabled. + * @member {boolean} creationDisabled + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @instance + */ + ImageVersion.prototype.creationDisabled = false; + + /** + * ImageVersion upgradeDisabled. + * @member {boolean} upgradeDisabled + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @instance + */ + ImageVersion.prototype.upgradeDisabled = false; + + /** + * Creates a new ImageVersion instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IImageVersion=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1.ImageVersion} ImageVersion instance + */ + ImageVersion.create = function create(properties) { + return new ImageVersion(properties); + }; + + /** + * Encodes the specified ImageVersion message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ImageVersion.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IImageVersion} message ImageVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageVersionId != null && Object.hasOwnProperty.call(message, "imageVersionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageVersionId); + if (message.isDefault != null && Object.hasOwnProperty.call(message, "isDefault")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDefault); + if (message.supportedPythonVersions != null && message.supportedPythonVersions.length) + for (var i = 0; i < message.supportedPythonVersions.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.supportedPythonVersions[i]); + if (message.releaseDate != null && Object.hasOwnProperty.call(message, "releaseDate")) + $root.google.type.Date.encode(message.releaseDate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.creationDisabled != null && Object.hasOwnProperty.call(message, "creationDisabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.creationDisabled); + if (message.upgradeDisabled != null && Object.hasOwnProperty.call(message, "upgradeDisabled")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.upgradeDisabled); + return writer; + }; + + /** + * Encodes the specified ImageVersion message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ImageVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {google.cloud.orchestration.airflow.service.v1.IImageVersion} message ImageVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageVersion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1.ImageVersion} ImageVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ImageVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.imageVersionId = reader.string(); + break; + } + case 2: { + message.isDefault = reader.bool(); + break; + } + case 3: { + if (!(message.supportedPythonVersions && message.supportedPythonVersions.length)) + message.supportedPythonVersions = []; + message.supportedPythonVersions.push(reader.string()); + break; + } + case 4: { + message.releaseDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + case 5: { + message.creationDisabled = reader.bool(); + break; + } + case 6: { + message.upgradeDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImageVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1.ImageVersion} ImageVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageVersion message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageVersionId != null && message.hasOwnProperty("imageVersionId")) + if (!$util.isString(message.imageVersionId)) + return "imageVersionId: string expected"; + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + if (typeof message.isDefault !== "boolean") + return "isDefault: boolean expected"; + if (message.supportedPythonVersions != null && message.hasOwnProperty("supportedPythonVersions")) { + if (!Array.isArray(message.supportedPythonVersions)) + return "supportedPythonVersions: array expected"; + for (var i = 0; i < message.supportedPythonVersions.length; ++i) + if (!$util.isString(message.supportedPythonVersions[i])) + return "supportedPythonVersions: string[] expected"; + } + if (message.releaseDate != null && message.hasOwnProperty("releaseDate")) { + var error = $root.google.type.Date.verify(message.releaseDate); + if (error) + return "releaseDate." + error; + } + if (message.creationDisabled != null && message.hasOwnProperty("creationDisabled")) + if (typeof message.creationDisabled !== "boolean") + return "creationDisabled: boolean expected"; + if (message.upgradeDisabled != null && message.hasOwnProperty("upgradeDisabled")) + if (typeof message.upgradeDisabled !== "boolean") + return "upgradeDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ImageVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1.ImageVersion} ImageVersion + */ + ImageVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ImageVersion) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1.ImageVersion(); + if (object.imageVersionId != null) + message.imageVersionId = String(object.imageVersionId); + if (object.isDefault != null) + message.isDefault = Boolean(object.isDefault); + if (object.supportedPythonVersions) { + if (!Array.isArray(object.supportedPythonVersions)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ImageVersion.supportedPythonVersions: array expected"); + message.supportedPythonVersions = []; + for (var i = 0; i < object.supportedPythonVersions.length; ++i) + message.supportedPythonVersions[i] = String(object.supportedPythonVersions[i]); + } + if (object.releaseDate != null) { + if (typeof object.releaseDate !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1.ImageVersion.releaseDate: object expected"); + message.releaseDate = $root.google.type.Date.fromObject(object.releaseDate); + } + if (object.creationDisabled != null) + message.creationDisabled = Boolean(object.creationDisabled); + if (object.upgradeDisabled != null) + message.upgradeDisabled = Boolean(object.upgradeDisabled); + return message; + }; + + /** + * Creates a plain object from an ImageVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {google.cloud.orchestration.airflow.service.v1.ImageVersion} message ImageVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.supportedPythonVersions = []; + if (options.defaults) { + object.imageVersionId = ""; + object.isDefault = false; + object.releaseDate = null; + object.creationDisabled = false; + object.upgradeDisabled = false; + } + if (message.imageVersionId != null && message.hasOwnProperty("imageVersionId")) + object.imageVersionId = message.imageVersionId; + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + object.isDefault = message.isDefault; + if (message.supportedPythonVersions && message.supportedPythonVersions.length) { + object.supportedPythonVersions = []; + for (var j = 0; j < message.supportedPythonVersions.length; ++j) + object.supportedPythonVersions[j] = message.supportedPythonVersions[j]; + } + if (message.releaseDate != null && message.hasOwnProperty("releaseDate")) + object.releaseDate = $root.google.type.Date.toObject(message.releaseDate, options); + if (message.creationDisabled != null && message.hasOwnProperty("creationDisabled")) + object.creationDisabled = message.creationDisabled; + if (message.upgradeDisabled != null && message.hasOwnProperty("upgradeDisabled")) + object.upgradeDisabled = message.upgradeDisabled; + return object; + }; + + /** + * Converts this ImageVersion to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @instance + * @returns {Object.} JSON object + */ + ImageVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImageVersion + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ImageVersion"; + }; + + return ImageVersion; + })(); + + return v1; + })(); + + return service; + })(); + + return airflow; + })(); + + return orchestration; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @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) { + 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(); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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; + })(); + + /** + * 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) { + 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(); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a 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; + })(); + + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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 + */ + + /** + * 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; + + /** + * 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(); + 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) { + 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(); + 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; + } + 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; + } + 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"]); + } + 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; + } + 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); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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.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) { + 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(); + 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.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) { + 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(); + 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.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) { + 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(); + 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) { + 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(); + 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; + })(); + + 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) { + 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(); + 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; + })(); + + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Date = (function() { + + /** + * Properties of a Date. + * @memberof google.type + * @interface IDate + * @property {number|null} [year] Date year + * @property {number|null} [month] Date month + * @property {number|null} [day] Date day + */ + + /** + * Constructs a new Date. + * @memberof google.type + * @classdesc Represents a Date. + * @implements IDate + * @constructor + * @param {google.type.IDate=} [properties] Properties to set + */ + function Date(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Date year. + * @member {number} year + * @memberof google.type.Date + * @instance + */ + Date.prototype.year = 0; + + /** + * Date month. + * @member {number} month + * @memberof google.type.Date + * @instance + */ + Date.prototype.month = 0; + + /** + * Date day. + * @member {number} day + * @memberof google.type.Date + * @instance + */ + Date.prototype.day = 0; + + /** + * Creates a new Date instance using the specified properties. + * @function create + * @memberof google.type.Date + * @static + * @param {google.type.IDate=} [properties] Properties to set + * @returns {google.type.Date} Date instance + */ + Date.create = function create(properties) { + return new Date(properties); + }; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encode + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + return writer; + }; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Date message from the specified reader or buffer. + * @function decode + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.year = reader.int32(); + break; + } + case 2: { + message.month = reader.int32(); + break; + } + case 3: { + message.day = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Date message. + * @function verify + * @memberof google.type.Date + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Date.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + return null; + }; + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Date + * @static + * @param {Object.} object Plain object + * @returns {google.type.Date} Date + */ + Date.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Date) + return object; + var message = new $root.google.type.Date(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + return message; + }; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Date + * @static + * @param {google.type.Date} message Date + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Date.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; + } + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; + return object; + }; + + /** + * Converts this Date to JSON. + * @function toJSON + * @memberof google.type.Date + * @instance + * @returns {Object.} JSON object + */ + Date.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Date + * @function getTypeUrl + * @memberof google.type.Date + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Date"; + }; + + return Date; + })(); + + return type; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.json new file mode 100644 index 00000000000..e51326ccc4c --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.json @@ -0,0 +1,4446 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "orchestration": { + "nested": { + "airflow": { + "nested": { + "service": { + "nested": { + "v1": { + "options": { + "go_package": "cloud.google.com/go/orchestration/airflow/service/apiv1/servicepb;servicepb", + "java_multiple_files": true, + "java_package": "com.google.cloud.orchestration.airflow.service.v1", + "java_outer_classname": "OperationsProto" + }, + "nested": { + "Environments": { + "options": { + "(google.api.default_host)": "composer.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateEnvironment": { + "requestType": "CreateEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/environments", + "(google.api.http).body": "environment", + "(google.api.method_signature)": "parent,environment", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/environments", + "body": "environment" + } + }, + { + "(google.api.method_signature)": "parent,environment" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Environment", + "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + } + } + ] + }, + "GetEnvironment": { + "requestType": "GetEnvironmentRequest", + "responseType": "Environment", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/environments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/environments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListEnvironments": { + "requestType": "ListEnvironmentsRequest", + "responseType": "ListEnvironmentsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/environments", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/environments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateEnvironment": { + "requestType": "UpdateEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{name=projects/*/locations/*/environments/*}", + "(google.api.http).body": "environment", + "(google.api.method_signature)": "name,environment,update_mask", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{name=projects/*/locations/*/environments/*}", + "body": "environment" + } + }, + { + "(google.api.method_signature)": "name,environment,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Environment", + "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + } + } + ] + }, + "DeleteEnvironment": { + "requestType": "DeleteEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/environments/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/environments/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + } + } + ] + }, + "ExecuteAirflowCommand": { + "requestType": "ExecuteAirflowCommandRequest", + "responseType": "ExecuteAirflowCommandResponse", + "options": { + "(google.api.http).post": "/v1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand", + "body": "*" + } + } + ] + }, + "StopAirflowCommand": { + "requestType": "StopAirflowCommandRequest", + "responseType": "StopAirflowCommandResponse", + "options": { + "(google.api.http).post": "/v1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand", + "body": "*" + } + } + ] + }, + "PollAirflowCommand": { + "requestType": "PollAirflowCommandRequest", + "responseType": "PollAirflowCommandResponse", + "options": { + "(google.api.http).post": "/v1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand", + "body": "*" + } + } + ] + }, + "ListWorkloads": { + "requestType": "ListWorkloadsRequest", + "responseType": "ListWorkloadsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/environments/*}/workloads", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/environments/*}/workloads" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CheckUpgrade": { + "requestType": "CheckUpgradeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{environment=projects/*/locations/*/environments/*}:checkUpgrade", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{environment=projects/*/locations/*/environments/*}:checkUpgrade", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse", + "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + } + } + ] + }, + "CreateUserWorkloadsSecret": { + "requestType": "CreateUserWorkloadsSecretRequest", + "responseType": "UserWorkloadsSecret", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets", + "(google.api.http).body": "user_workloads_secret", + "(google.api.method_signature)": "parent,user_workloads_secret" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets", + "body": "user_workloads_secret" + } + }, + { + "(google.api.method_signature)": "parent,user_workloads_secret" + } + ] + }, + "GetUserWorkloadsSecret": { + "requestType": "GetUserWorkloadsSecretRequest", + "responseType": "UserWorkloadsSecret", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListUserWorkloadsSecrets": { + "requestType": "ListUserWorkloadsSecretsRequest", + "responseType": "ListUserWorkloadsSecretsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateUserWorkloadsSecret": { + "requestType": "UpdateUserWorkloadsSecretRequest", + "responseType": "UserWorkloadsSecret", + "options": { + "(google.api.http).put": "/v1/{user_workloads_secret.name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}", + "(google.api.http).body": "user_workloads_secret", + "(google.api.method_signature)": "user_workloads_secret" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v1/{user_workloads_secret.name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}", + "body": "user_workloads_secret" + } + }, + { + "(google.api.method_signature)": "user_workloads_secret" + } + ] + }, + "DeleteUserWorkloadsSecret": { + "requestType": "DeleteUserWorkloadsSecretRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateUserWorkloadsConfigMap": { + "requestType": "CreateUserWorkloadsConfigMapRequest", + "responseType": "UserWorkloadsConfigMap", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps", + "(google.api.http).body": "user_workloads_config_map", + "(google.api.method_signature)": "parent,user_workloads_config_map" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps", + "body": "user_workloads_config_map" + } + }, + { + "(google.api.method_signature)": "parent,user_workloads_config_map" + } + ] + }, + "GetUserWorkloadsConfigMap": { + "requestType": "GetUserWorkloadsConfigMapRequest", + "responseType": "UserWorkloadsConfigMap", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListUserWorkloadsConfigMaps": { + "requestType": "ListUserWorkloadsConfigMapsRequest", + "responseType": "ListUserWorkloadsConfigMapsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateUserWorkloadsConfigMap": { + "requestType": "UpdateUserWorkloadsConfigMapRequest", + "responseType": "UserWorkloadsConfigMap", + "options": { + "(google.api.http).put": "/v1/{user_workloads_config_map.name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}", + "(google.api.http).body": "user_workloads_config_map", + "(google.api.method_signature)": "user_workloads_config_map" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v1/{user_workloads_config_map.name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}", + "body": "user_workloads_config_map" + } + }, + { + "(google.api.method_signature)": "user_workloads_config_map" + } + ] + }, + "DeleteUserWorkloadsConfigMap": { + "requestType": "DeleteUserWorkloadsConfigMapRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "SaveSnapshot": { + "requestType": "SaveSnapshotRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{environment=projects/*/locations/*/environments/*}:saveSnapshot", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{environment=projects/*/locations/*/environments/*}:saveSnapshot", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse", + "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + } + } + ] + }, + "LoadSnapshot": { + "requestType": "LoadSnapshotRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{environment=projects/*/locations/*/environments/*}:loadSnapshot", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{environment=projects/*/locations/*/environments/*}:loadSnapshot", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse", + "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + } + } + ] + }, + "DatabaseFailover": { + "requestType": "DatabaseFailoverRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{environment=projects/*/locations/*/environments/*}:databaseFailover", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{environment=projects/*/locations/*/environments/*}:databaseFailover", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse", + "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" + } + } + ] + }, + "FetchDatabaseProperties": { + "requestType": "FetchDatabasePropertiesRequest", + "responseType": "FetchDatabasePropertiesResponse", + "options": { + "(google.api.http).get": "/v1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties" + } + } + ] + } + } + }, + "CreateEnvironmentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "environment": { + "type": "Environment", + "id": 2 + } + } + }, + "GetEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListEnvironmentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListEnvironmentsResponse": { + "fields": { + "environments": { + "rule": "repeated", + "type": "Environment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "UpdateEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 2 + }, + "environment": { + "type": "Environment", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3 + } + } + }, + "ExecuteAirflowCommandRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1 + }, + "command": { + "type": "string", + "id": 2 + }, + "subcommand": { + "type": "string", + "id": 3 + }, + "parameters": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "ExecuteAirflowCommandResponse": { + "fields": { + "executionId": { + "type": "string", + "id": 1 + }, + "pod": { + "type": "string", + "id": 2 + }, + "podNamespace": { + "type": "string", + "id": 3 + }, + "error": { + "type": "string", + "id": 4 + } + } + }, + "StopAirflowCommandRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1 + }, + "executionId": { + "type": "string", + "id": 2 + }, + "pod": { + "type": "string", + "id": 3 + }, + "podNamespace": { + "type": "string", + "id": 4 + }, + "force": { + "type": "bool", + "id": 5 + } + } + }, + "StopAirflowCommandResponse": { + "fields": { + "isDone": { + "type": "bool", + "id": 1 + }, + "output": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "PollAirflowCommandRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1 + }, + "executionId": { + "type": "string", + "id": 2 + }, + "pod": { + "type": "string", + "id": 3 + }, + "podNamespace": { + "type": "string", + "id": 4 + }, + "nextLineNumber": { + "type": "int32", + "id": 5 + } + } + }, + "PollAirflowCommandResponse": { + "fields": { + "output": { + "rule": "repeated", + "type": "Line", + "id": 1 + }, + "outputEnd": { + "type": "bool", + "id": 2 + }, + "exitInfo": { + "type": "ExitInfo", + "id": 3 + } + }, + "nested": { + "Line": { + "fields": { + "lineNumber": { + "type": "int32", + "id": 1 + }, + "content": { + "type": "string", + "id": 2 + } + } + }, + "ExitInfo": { + "fields": { + "exitCode": { + "type": "int32", + "id": 1 + }, + "error": { + "type": "string", + "id": 2 + } + } + } + } + }, + "CreateUserWorkloadsSecretRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/Environment" + } + }, + "userWorkloadsSecret": { + "type": "UserWorkloadsSecret", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetUserWorkloadsSecretRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/UserWorkloadsSecret" + } + } + } + }, + "ListUserWorkloadsSecretsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/Environment" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateUserWorkloadsSecretRequest": { + "fields": { + "userWorkloadsSecret": { + "type": "UserWorkloadsSecret", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteUserWorkloadsSecretRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/UserWorkloadsSecret" + } + } + } + }, + "CreateUserWorkloadsConfigMapRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/Environment" + } + }, + "userWorkloadsConfigMap": { + "type": "UserWorkloadsConfigMap", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetUserWorkloadsConfigMapRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/UserWorkloadsConfigMap" + } + } + } + }, + "ListUserWorkloadsConfigMapsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/Environment" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateUserWorkloadsConfigMapRequest": { + "fields": { + "userWorkloadsConfigMap": { + "type": "UserWorkloadsConfigMap", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteUserWorkloadsConfigMapRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/UserWorkloadsConfigMap" + } + } + } + }, + "UserWorkloadsSecret": { + "options": { + "(google.api.resource).type": "composer.googleapis.com/UserWorkloadsSecret", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}", + "(google.api.resource).plural": "userWorkloadsSecrets", + "(google.api.resource).singular": "userWorkloadsSecret" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "data": { + "keyType": "string", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListUserWorkloadsSecretsResponse": { + "fields": { + "userWorkloadsSecrets": { + "rule": "repeated", + "type": "UserWorkloadsSecret", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UserWorkloadsConfigMap": { + "options": { + "(google.api.resource).type": "composer.googleapis.com/UserWorkloadsConfigMap", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}", + "(google.api.resource).plural": "userWorkloadsConfigMaps", + "(google.api.resource).singular": "userWorkloadsConfigMap" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "data": { + "keyType": "string", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListUserWorkloadsConfigMapsResponse": { + "fields": { + "userWorkloadsConfigMaps": { + "rule": "repeated", + "type": "UserWorkloadsConfigMap", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListWorkloadsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/Environment" + } + }, + "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" + } + } + } + }, + "ListWorkloadsResponse": { + "fields": { + "workloads": { + "rule": "repeated", + "type": "ComposerWorkload", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + }, + "nested": { + "ComposerWorkload": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "ComposerWorkloadType", + "id": 2 + }, + "status": { + "type": "ComposerWorkloadStatus", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ComposerWorkloadType": { + "values": { + "COMPOSER_WORKLOAD_TYPE_UNSPECIFIED": 0, + "CELERY_WORKER": 1, + "KUBERNETES_WORKER": 2, + "KUBERNETES_OPERATOR_POD": 3, + "SCHEDULER": 4, + "DAG_PROCESSOR": 5, + "TRIGGERER": 6, + "WEB_SERVER": 7, + "REDIS": 8 + } + }, + "ComposerWorkloadStatus": { + "fields": { + "state": { + "type": "ComposerWorkloadState", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "detailedStatusMessage": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ComposerWorkloadState": { + "values": { + "COMPOSER_WORKLOAD_STATE_UNSPECIFIED": 0, + "PENDING": 1, + "OK": 2, + "WARNING": 3, + "ERROR": 4, + "SUCCEEDED": 5, + "FAILED": 6 + } + } + } + }, + "SaveSnapshotRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1 + }, + "snapshotLocation": { + "type": "string", + "id": 2 + } + } + }, + "SaveSnapshotResponse": { + "fields": { + "snapshotPath": { + "type": "string", + "id": 1 + } + } + }, + "LoadSnapshotRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1 + }, + "snapshotPath": { + "type": "string", + "id": 2 + }, + "skipPypiPackagesInstallation": { + "type": "bool", + "id": 3 + }, + "skipEnvironmentVariablesSetting": { + "type": "bool", + "id": 4 + }, + "skipAirflowOverridesSetting": { + "type": "bool", + "id": 5 + }, + "skipGcsDataCopying": { + "type": "bool", + "id": 6 + } + } + }, + "LoadSnapshotResponse": { + "fields": {} + }, + "DatabaseFailoverRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1 + } + } + }, + "DatabaseFailoverResponse": { + "fields": {} + }, + "FetchDatabasePropertiesRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/Environment" + } + } + } + }, + "FetchDatabasePropertiesResponse": { + "fields": { + "primaryGceZone": { + "type": "string", + "id": 1 + }, + "secondaryGceZone": { + "type": "string", + "id": 2 + }, + "isFailoverReplicaAvailable": { + "type": "bool", + "id": 3 + } + } + }, + "StorageConfig": { + "fields": { + "bucket": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "EnvironmentConfig": { + "fields": { + "gkeCluster": { + "type": "string", + "id": 1 + }, + "dagGcsPrefix": { + "type": "string", + "id": 2 + }, + "nodeCount": { + "type": "int32", + "id": 3 + }, + "softwareConfig": { + "type": "SoftwareConfig", + "id": 4 + }, + "nodeConfig": { + "type": "NodeConfig", + "id": 5 + }, + "privateEnvironmentConfig": { + "type": "PrivateEnvironmentConfig", + "id": 7 + }, + "webServerNetworkAccessControl": { + "type": "WebServerNetworkAccessControl", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "databaseConfig": { + "type": "DatabaseConfig", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServerConfig": { + "type": "WebServerConfig", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "encryptionConfig": { + "type": "EncryptionConfig", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maintenanceWindow": { + "type": "MaintenanceWindow", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "workloadsConfig": { + "type": "WorkloadsConfig", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "environmentSize": { + "type": "EnvironmentSize", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "airflowUri": { + "type": "string", + "id": 6 + }, + "airflowByoidUri": { + "type": "string", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "masterAuthorizedNetworksConfig": { + "type": "MasterAuthorizedNetworksConfig", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "recoveryConfig": { + "type": "RecoveryConfig", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "resilienceMode": { + "type": "ResilienceMode", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataRetentionConfig": { + "type": "DataRetentionConfig", + "id": 21, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EnvironmentSize": { + "values": { + "ENVIRONMENT_SIZE_UNSPECIFIED": 0, + "ENVIRONMENT_SIZE_SMALL": 1, + "ENVIRONMENT_SIZE_MEDIUM": 2, + "ENVIRONMENT_SIZE_LARGE": 3 + } + }, + "ResilienceMode": { + "values": { + "RESILIENCE_MODE_UNSPECIFIED": 0, + "HIGH_RESILIENCE": 1 + } + } + } + }, + "WebServerNetworkAccessControl": { + "fields": { + "allowedIpRanges": { + "rule": "repeated", + "type": "AllowedIpRange", + "id": 1 + } + }, + "nested": { + "AllowedIpRange": { + "fields": { + "value": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "DatabaseConfig": { + "fields": { + "machineType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "WebServerConfig": { + "fields": { + "machineType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "EncryptionConfig": { + "fields": { + "kmsKeyName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "MaintenanceWindow": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "recurrence": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SoftwareConfig": { + "fields": { + "imageVersion": { + "type": "string", + "id": 1 + }, + "airflowConfigOverrides": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "pypiPackages": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "envVariables": { + "keyType": "string", + "type": "string", + "id": 4 + }, + "pythonVersion": { + "type": "string", + "id": 6 + }, + "schedulerCount": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloudDataLineageIntegration": { + "type": "CloudDataLineageIntegration", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServerPluginsMode": { + "type": "WebServerPluginsMode", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "WebServerPluginsMode": { + "values": { + "WEB_SERVER_PLUGINS_MODE_UNSPECIFIED": 0, + "PLUGINS_DISABLED": 1, + "PLUGINS_ENABLED": 2 + } + } + } + }, + "IPAllocationPolicy": { + "oneofs": { + "clusterIpAllocation": { + "oneof": [ + "clusterSecondaryRangeName", + "clusterIpv4CidrBlock" + ] + }, + "servicesIpAllocation": { + "oneof": [ + "servicesSecondaryRangeName", + "servicesIpv4CidrBlock" + ] + } + }, + "fields": { + "useIpAliases": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clusterSecondaryRangeName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clusterIpv4CidrBlock": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "servicesSecondaryRangeName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "servicesIpv4CidrBlock": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "NodeConfig": { + "fields": { + "location": { + "type": "string", + "id": 1 + }, + "machineType": { + "type": "string", + "id": 2 + }, + "network": { + "type": "string", + "id": 3 + }, + "subnetwork": { + "type": "string", + "id": 4 + }, + "diskSizeGb": { + "type": "int32", + "id": 5 + }, + "oauthScopes": { + "rule": "repeated", + "type": "string", + "id": 6 + }, + "serviceAccount": { + "type": "string", + "id": 7 + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 8 + }, + "ipAllocationPolicy": { + "type": "IPAllocationPolicy", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "enableIpMasqAgent": { + "type": "bool", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "composerNetworkAttachment": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "composerInternalIpv4CidrBlock": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PrivateClusterConfig": { + "fields": { + "enablePrivateEndpoint": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "masterIpv4CidrBlock": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "masterIpv4ReservedRange": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "NetworkingConfig": { + "fields": { + "connectionType": { + "type": "ConnectionType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ConnectionType": { + "values": { + "CONNECTION_TYPE_UNSPECIFIED": 0, + "VPC_PEERING": 1, + "PRIVATE_SERVICE_CONNECT": 2 + } + } + } + }, + "PrivateEnvironmentConfig": { + "fields": { + "enablePrivateEnvironment": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "enablePrivateBuildsOnly": { + "type": "bool", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "privateClusterConfig": { + "type": "PrivateClusterConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServerIpv4CidrBlock": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloudSqlIpv4CidrBlock": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServerIpv4ReservedRange": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cloudComposerNetworkIpv4CidrBlock": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloudComposerNetworkIpv4ReservedRange": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "enablePrivatelyUsedPublicIps": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloudComposerConnectionSubnetwork": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "networkingConfig": { + "type": "NetworkingConfig", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "WorkloadsConfig": { + "fields": { + "scheduler": { + "type": "SchedulerResource", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServer": { + "type": "WebServerResource", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "worker": { + "type": "WorkerResource", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "triggerer": { + "type": "TriggererResource", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dagProcessor": { + "type": "DagProcessorResource", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "SchedulerResource": { + "fields": { + "cpu": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "memoryGb": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "storageGb": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "count": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "WebServerResource": { + "fields": { + "cpu": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "memoryGb": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "storageGb": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "WorkerResource": { + "fields": { + "cpu": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "memoryGb": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "storageGb": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "minCount": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxCount": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TriggererResource": { + "fields": { + "count": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cpu": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "memoryGb": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DagProcessorResource": { + "fields": { + "cpu": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "memoryGb": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "storageGb": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "count": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "RecoveryConfig": { + "fields": { + "scheduledSnapshotsConfig": { + "type": "ScheduledSnapshotsConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ScheduledSnapshotsConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "snapshotLocation": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "snapshotCreationSchedule": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "timeZone": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "MasterAuthorizedNetworksConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "cidrBlocks": { + "rule": "repeated", + "type": "CidrBlock", + "id": 2 + } + }, + "nested": { + "CidrBlock": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "cidrBlock": { + "type": "string", + "id": 2 + } + } + } + } + }, + "CloudDataLineageIntegration": { + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Environment": { + "options": { + "(google.api.resource).type": "composer.googleapis.com/Environment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/environments/{environment}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "config": { + "type": "EnvironmentConfig", + "id": 2 + }, + "uuid": { + "type": "string", + "id": 3 + }, + "state": { + "type": "State", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7 + }, + "satisfiesPzs": { + "type": "bool", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "storageConfig": { + "type": "StorageConfig", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "RUNNING": 2, + "UPDATING": 3, + "DELETING": 4, + "ERROR": 5 + } + } + } + }, + "CheckUpgradeRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "imageVersion": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "CheckUpgradeResponse": { + "fields": { + "buildLogUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "containsPypiModulesConflict": { + "type": "ConflictResult", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pypiConflictBuildLogExtract": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "imageVersion": { + "type": "string", + "id": 5 + }, + "pypiDependencies": { + "keyType": "string", + "type": "string", + "id": 6 + } + }, + "nested": { + "ConflictResult": { + "values": { + "CONFLICT_RESULT_UNSPECIFIED": 0, + "CONFLICT": 1, + "NO_CONFLICT": 2 + } + } + } + }, + "DataRetentionConfig": { + "fields": { + "airflowMetadataRetentionConfig": { + "type": "AirflowMetadataRetentionPolicyConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "taskLogsRetentionConfig": { + "type": "TaskLogsRetentionConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TaskLogsRetentionConfig": { + "fields": { + "storageMode": { + "type": "TaskLogsStorageMode", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "TaskLogsStorageMode": { + "values": { + "TASK_LOGS_STORAGE_MODE_UNSPECIFIED": 0, + "CLOUD_LOGGING_AND_CLOUD_STORAGE": 1, + "CLOUD_LOGGING_ONLY": 2 + } + } + } + }, + "AirflowMetadataRetentionPolicyConfig": { + "fields": { + "retentionMode": { + "type": "RetentionMode", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "retentionDays": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "RetentionMode": { + "values": { + "RETENTION_MODE_UNSPECIFIED": 0, + "RETENTION_MODE_ENABLED": 1, + "RETENTION_MODE_DISABLED": 2 + } + } + } + }, + "OperationMetadata": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "operationType": { + "type": "Type", + "id": 2 + }, + "resource": { + "type": "string", + "id": 3 + }, + "resourceUuid": { + "type": "string", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + } + }, + "nested": { + "State": { + "options": { + "allow_alias": true + }, + "values": { + "STATE_UNSPECIFIED": 0, + "PENDING": 1, + "RUNNING": 2, + "SUCCEEDED": 3, + "SUCCESSFUL": 3, + "FAILED": 4 + } + }, + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "CREATE": 1, + "DELETE": 2, + "UPDATE": 3, + "CHECK": 4, + "SAVE_SNAPSHOT": 5, + "LOAD_SNAPSHOT": 6, + "DATABASE_FAILOVER": 7 + } + } + } + }, + "ImageVersions": { + "options": { + "(google.api.default_host)": "composer.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListImageVersions": { + "requestType": "ListImageVersionsRequest", + "responseType": "ListImageVersionsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/imageVersions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=projects/*/locations/*}/imageVersions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "ListImageVersionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "includePastReleases": { + "type": "bool", + "id": 4 + } + } + }, + "ListImageVersionsResponse": { + "fields": { + "imageVersions": { + "rule": "repeated", + "type": "ImageVersion", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ImageVersion": { + "fields": { + "imageVersionId": { + "type": "string", + "id": 1 + }, + "isDefault": { + "type": "bool", + "id": 2 + }, + "supportedPythonVersions": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "releaseDate": { + "type": "google.type.Date", + "id": 4 + }, + "creationDisabled": { + "type": "bool", + "id": 5 + }, + "upgradeDisabled": { + "type": "bool", + "id": 6 + } + } + } + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "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 + } + }, + "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 + } + } + } + } + }, + "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": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "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": { + "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, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "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": { + "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": { + "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": { + "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": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "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": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "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": { + "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": { + "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": { + "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, + "options": { + "packed": false + } + }, + "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": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "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": { + "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": { + "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": { + "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": { + "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": { + "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": { + "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": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "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 + } + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "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 + } + } + } + } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/date;date", + "java_multiple_files": true, + "java_outer_classname": "DateProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Date": { + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.check_upgrade.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.check_upgrade.js new file mode 100644 index 00000000000..b594695a08f --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.check_upgrade.js @@ -0,0 +1,87 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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(environment) { + // [START composer_v1_generated_Environments_CheckUpgrade_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 environment to check upgrade for, in the + * form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const environment = 'abc123' + /** + * Optional. The version of the software running in the environment. + * This encapsulates both the version of Cloud Composer functionality and the + * version of Apache Airflow. It must match the regular expression + * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. + * When used as input, the server also checks if the provided version is + * supported and denies the request for an unsupported version. + * The Cloud Composer portion of the image version is a full + * semantic version (https://semver.org), or an alias in the form of major + * version number or `latest`. When an alias is provided, the server replaces + * it with the current Cloud Composer version that satisfies the alias. + * The Apache Airflow portion of the image version is a full semantic version + * that points to one of the supported Apache Airflow versions, or an alias in + * the form of only major or major.minor versions specified. When an alias is + * provided, the server replaces it with the latest Apache Airflow version + * that satisfies the alias and is supported in the given Cloud Composer + * version. + * In all cases, the resolved image version is stored in the same field. + * See also version + * list (/composer/docs/concepts/versioning/composer-versions) and versioning + * overview (/composer/docs/concepts/versioning/composer-versioning-overview). + */ + // const imageVersion = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callCheckUpgrade() { + // Construct request + const request = { + environment, + }; + + // Run request + const [operation] = await serviceClient.checkUpgrade(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCheckUpgrade(); + // [END composer_v1_generated_Environments_CheckUpgrade_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-orchestration-airflow-service/v1/samples/generated/v1/environments.create_environment.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_environment.js new file mode 100644 index 00000000000..22f0e829ca3 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_environment.js @@ -0,0 +1,66 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1_generated_Environments_CreateEnvironment_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. + */ + /** + * The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + */ + // const parent = 'abc123' + /** + * The environment to create. + */ + // const environment = {} + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callCreateEnvironment() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await serviceClient.createEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateEnvironment(); + // [END composer_v1_generated_Environments_CreateEnvironment_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-orchestration-airflow-service/v1/samples/generated/v1/environments.create_user_workloads_config_map.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_user_workloads_config_map.js new file mode 100644 index 00000000000..4c20921479a --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_user_workloads_config_map.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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, userWorkloadsConfigMap) { + // [START composer_v1_generated_Environments_CreateUserWorkloadsConfigMap_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 environment name to create a ConfigMap for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const parent = 'abc123' + /** + * Required. User workloads ConfigMap to create. + */ + // const userWorkloadsConfigMap = {} + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callCreateUserWorkloadsConfigMap() { + // Construct request + const request = { + parent, + userWorkloadsConfigMap, + }; + + // Run request + const response = await serviceClient.createUserWorkloadsConfigMap(request); + console.log(response); + } + + callCreateUserWorkloadsConfigMap(); + // [END composer_v1_generated_Environments_CreateUserWorkloadsConfigMap_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-orchestration-airflow-service/v1/samples/generated/v1/environments.create_user_workloads_secret.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_user_workloads_secret.js new file mode 100644 index 00000000000..75852c31d7f --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_user_workloads_secret.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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, userWorkloadsSecret) { + // [START composer_v1_generated_Environments_CreateUserWorkloadsSecret_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 environment name to create a Secret for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const parent = 'abc123' + /** + * Required. User workloads Secret to create. + */ + // const userWorkloadsSecret = {} + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callCreateUserWorkloadsSecret() { + // Construct request + const request = { + parent, + userWorkloadsSecret, + }; + + // Run request + const response = await serviceClient.createUserWorkloadsSecret(request); + console.log(response); + } + + callCreateUserWorkloadsSecret(); + // [END composer_v1_generated_Environments_CreateUserWorkloadsSecret_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-orchestration-airflow-service/v1/samples/generated/v1/environments.database_failover.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.database_failover.js new file mode 100644 index 00000000000..af9cde8a706 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.database_failover.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1_generated_Environments_DatabaseFailover_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. + */ + /** + * Target environment: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const environment = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callDatabaseFailover() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await serviceClient.databaseFailover(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDatabaseFailover(); + // [END composer_v1_generated_Environments_DatabaseFailover_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-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_environment.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_environment.js new file mode 100644 index 00000000000..b9d992858e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_environment.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1_generated_Environments_DeleteEnvironment_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. + */ + /** + * The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callDeleteEnvironment() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await serviceClient.deleteEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteEnvironment(); + // [END composer_v1_generated_Environments_DeleteEnvironment_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-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_user_workloads_config_map.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_user_workloads_config_map.js new file mode 100644 index 00000000000..8f28c379029 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_user_workloads_config_map.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 composer_v1_generated_Environments_DeleteUserWorkloadsConfigMap_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 ConfigMap to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callDeleteUserWorkloadsConfigMap() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await serviceClient.deleteUserWorkloadsConfigMap(request); + console.log(response); + } + + callDeleteUserWorkloadsConfigMap(); + // [END composer_v1_generated_Environments_DeleteUserWorkloadsConfigMap_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-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_user_workloads_secret.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_user_workloads_secret.js new file mode 100644 index 00000000000..9ac2ee56366 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_user_workloads_secret.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 composer_v1_generated_Environments_DeleteUserWorkloadsSecret_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 Secret to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callDeleteUserWorkloadsSecret() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await serviceClient.deleteUserWorkloadsSecret(request); + console.log(response); + } + + callDeleteUserWorkloadsSecret(); + // [END composer_v1_generated_Environments_DeleteUserWorkloadsSecret_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-orchestration-airflow-service/v1/samples/generated/v1/environments.execute_airflow_command.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.execute_airflow_command.js new file mode 100644 index 00000000000..af19babf6c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.execute_airflow_command.js @@ -0,0 +1,76 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1_generated_Environments_ExecuteAirflowCommand_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. + */ + /** + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + */ + // const environment = 'abc123' + /** + * Airflow command. + */ + // const command = 'abc123' + /** + * Airflow subcommand. + */ + // const subcommand = 'abc123' + /** + * Parameters for the Airflow command/subcommand as an array of arguments. + * It may contain positional arguments like `["my-dag-id"]`, key-value + * parameters like `["--foo=bar"]` or `["--foo","bar"]`, + * or other flags like `["-f"]`. + */ + // const parameters = ['abc','def'] + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callExecuteAirflowCommand() { + // Construct request + const request = { + }; + + // Run request + const response = await serviceClient.executeAirflowCommand(request); + console.log(response); + } + + callExecuteAirflowCommand(); + // [END composer_v1_generated_Environments_ExecuteAirflowCommand_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-orchestration-airflow-service/v1/samples/generated/v1/environments.fetch_database_properties.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.fetch_database_properties.js new file mode 100644 index 00000000000..39b89991384 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.fetch_database_properties.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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(environment) { + // [START composer_v1_generated_Environments_FetchDatabaseProperties_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 environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const environment = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callFetchDatabaseProperties() { + // Construct request + const request = { + environment, + }; + + // Run request + const response = await serviceClient.fetchDatabaseProperties(request); + console.log(response); + } + + callFetchDatabaseProperties(); + // [END composer_v1_generated_Environments_FetchDatabaseProperties_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-orchestration-airflow-service/v1/samples/generated/v1/environments.get_environment.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_environment.js new file mode 100644 index 00000000000..44e616d7efa --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_environment.js @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1_generated_Environments_GetEnvironment_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. + */ + /** + * The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callGetEnvironment() { + // Construct request + const request = { + }; + + // Run request + const response = await serviceClient.getEnvironment(request); + console.log(response); + } + + callGetEnvironment(); + // [END composer_v1_generated_Environments_GetEnvironment_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-orchestration-airflow-service/v1/samples/generated/v1/environments.get_user_workloads_config_map.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_user_workloads_config_map.js new file mode 100644 index 00000000000..c9fbf65a785 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_user_workloads_config_map.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 composer_v1_generated_Environments_GetUserWorkloadsConfigMap_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 ConfigMap to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callGetUserWorkloadsConfigMap() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await serviceClient.getUserWorkloadsConfigMap(request); + console.log(response); + } + + callGetUserWorkloadsConfigMap(); + // [END composer_v1_generated_Environments_GetUserWorkloadsConfigMap_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-orchestration-airflow-service/v1/samples/generated/v1/environments.get_user_workloads_secret.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_user_workloads_secret.js new file mode 100644 index 00000000000..e81364b058f --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_user_workloads_secret.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 composer_v1_generated_Environments_GetUserWorkloadsSecret_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 Secret to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callGetUserWorkloadsSecret() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await serviceClient.getUserWorkloadsSecret(request); + console.log(response); + } + + callGetUserWorkloadsSecret(); + // [END composer_v1_generated_Environments_GetUserWorkloadsSecret_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-orchestration-airflow-service/v1/samples/generated/v1/environments.list_environments.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_environments.js new file mode 100644 index 00000000000..39900edd8d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_environments.js @@ -0,0 +1,71 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1_generated_Environments_ListEnvironments_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. + */ + /** + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + */ + // const parent = 'abc123' + /** + * The maximum number of environments to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous List request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callListEnvironments() { + // Construct request + const request = { + }; + + // Run request + const iterable = serviceClient.listEnvironmentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEnvironments(); + // [END composer_v1_generated_Environments_ListEnvironments_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-orchestration-airflow-service/v1/samples/generated/v1/environments.list_user_workloads_config_maps.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_user_workloads_config_maps.js new file mode 100644 index 00000000000..47e7653c6b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_user_workloads_config_maps.js @@ -0,0 +1,73 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 composer_v1_generated_Environments_ListUserWorkloadsConfigMaps_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. List ConfigMaps in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of ConfigMaps to return. + */ + // const pageSize = 1234 + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + */ + // const pageToken = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callListUserWorkloadsConfigMaps() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = serviceClient.listUserWorkloadsConfigMapsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListUserWorkloadsConfigMaps(); + // [END composer_v1_generated_Environments_ListUserWorkloadsConfigMaps_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-orchestration-airflow-service/v1/samples/generated/v1/environments.list_user_workloads_secrets.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_user_workloads_secrets.js new file mode 100644 index 00000000000..ce912dca061 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_user_workloads_secrets.js @@ -0,0 +1,73 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 composer_v1_generated_Environments_ListUserWorkloadsSecrets_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. List Secrets in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of Secrets to return. + */ + // const pageSize = 1234 + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + */ + // const pageToken = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callListUserWorkloadsSecrets() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = serviceClient.listUserWorkloadsSecretsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListUserWorkloadsSecrets(); + // [END composer_v1_generated_Environments_ListUserWorkloadsSecrets_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-orchestration-airflow-service/v1/samples/generated/v1/environments.list_workloads.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_workloads.js new file mode 100644 index 00000000000..3999b121fe9 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_workloads.js @@ -0,0 +1,82 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 composer_v1_generated_Environments_ListWorkloads_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 environment name to get workloads for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of environments to return. + */ + // const pageSize = 1234 + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + */ + // const pageToken = 'abc123' + /** + * Optional. The list filter. + * Currently only supports equality on the type field. The value of a field + * specified in the filter expression must be one ComposerWorkloadType enum + * option. It's possible to get multiple types using "OR" operator, e.g.: + * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are + * returned. + */ + // const filter = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callListWorkloads() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = serviceClient.listWorkloadsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListWorkloads(); + // [END composer_v1_generated_Environments_ListWorkloads_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-orchestration-airflow-service/v1/samples/generated/v1/environments.load_snapshot.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.load_snapshot.js new file mode 100644 index 00000000000..438863f550f --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.load_snapshot.js @@ -0,0 +1,87 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1_generated_Environments_LoadSnapshot_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. + */ + /** + * The resource name of the target environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const environment = 'abc123' + /** + * A Cloud Storage path to a snapshot to load, e.g.: + * "gs://my-bucket/snapshots/project_location_environment_timestamp". + */ + // const snapshotPath = 'abc123' + /** + * Whether or not to skip installing Pypi packages when loading the + * environment's state. + */ + // const skipPypiPackagesInstallation = true + /** + * Whether or not to skip setting environment variables when loading the + * environment's state. + */ + // const skipEnvironmentVariablesSetting = true + /** + * Whether or not to skip setting Airflow overrides when loading the + * environment's state. + */ + // const skipAirflowOverridesSetting = true + /** + * Whether or not to skip copying Cloud Storage data when loading the + * environment's state. + */ + // const skipGcsDataCopying = true + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callLoadSnapshot() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await serviceClient.loadSnapshot(request); + const [response] = await operation.promise(); + console.log(response); + } + + callLoadSnapshot(); + // [END composer_v1_generated_Environments_LoadSnapshot_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-orchestration-airflow-service/v1/samples/generated/v1/environments.poll_airflow_command.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.poll_airflow_command.js new file mode 100644 index 00000000000..ff29827a5df --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.poll_airflow_command.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1_generated_Environments_PollAirflowCommand_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. + */ + /** + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const environment = 'abc123' + /** + * The unique ID of the command execution. + */ + // const executionId = 'abc123' + /** + * The name of the pod where the command is executed. + */ + // const pod = 'abc123' + /** + * The namespace of the pod where the command is executed. + */ + // const podNamespace = 'abc123' + /** + * Line number from which new logs should be fetched. + */ + // const nextLineNumber = 1234 + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callPollAirflowCommand() { + // Construct request + const request = { + }; + + // Run request + const response = await serviceClient.pollAirflowCommand(request); + console.log(response); + } + + callPollAirflowCommand(); + // [END composer_v1_generated_Environments_PollAirflowCommand_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-orchestration-airflow-service/v1/samples/generated/v1/environments.save_snapshot.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.save_snapshot.js new file mode 100644 index 00000000000..70c2382f835 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.save_snapshot.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1_generated_Environments_SaveSnapshot_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. + */ + /** + * The resource name of the source environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const environment = 'abc123' + /** + * Location in a Cloud Storage where the snapshot is going to be stored, e.g.: + * "gs://my-bucket/snapshots". + */ + // const snapshotLocation = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callSaveSnapshot() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await serviceClient.saveSnapshot(request); + const [response] = await operation.promise(); + console.log(response); + } + + callSaveSnapshot(); + // [END composer_v1_generated_Environments_SaveSnapshot_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-orchestration-airflow-service/v1/samples/generated/v1/environments.stop_airflow_command.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.stop_airflow_command.js new file mode 100644 index 00000000000..f73bb01b6e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.stop_airflow_command.js @@ -0,0 +1,78 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1_generated_Environments_StopAirflowCommand_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. + */ + /** + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + */ + // const environment = 'abc123' + /** + * The unique ID of the command execution. + */ + // const executionId = 'abc123' + /** + * The name of the pod where the command is executed. + */ + // const pod = 'abc123' + /** + * The namespace of the pod where the command is executed. + */ + // const podNamespace = 'abc123' + /** + * If true, the execution is terminated forcefully (SIGKILL). If false, the + * execution is stopped gracefully, giving it time for cleanup. + */ + // const force = true + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callStopAirflowCommand() { + // Construct request + const request = { + }; + + // Run request + const response = await serviceClient.stopAirflowCommand(request); + console.log(response); + } + + callStopAirflowCommand(); + // [END composer_v1_generated_Environments_StopAirflowCommand_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-orchestration-airflow-service/v1/samples/generated/v1/environments.update_environment.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_environment.js new file mode 100644 index 00000000000..0282e75ad83 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_environment.js @@ -0,0 +1,184 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1_generated_Environments_UpdateEnvironment_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. + */ + /** + * The relative resource name of the environment to update, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const name = 'abc123' + /** + * A patch environment. Fields specified by the `updateMask` will be copied + * from the patch environment into the environment under update. + */ + // const environment = {} + /** + * Required. A comma-separated list of paths, relative to `Environment`, of + * fields to update. + * For example, to set the version of scikit-learn to install in the + * environment to 0.19.0 and to remove an existing installation of + * numpy, the `updateMask` parameter would include the following two + * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + * "config.softwareConfig.pypiPackages.numpy". The included patch + * environment would specify the scikit-learn version as follows: + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "scikit-learn":"==0.19.0" + * } + * } + * } + * } + * Note that in the above example, any existing PyPI packages + * other than scikit-learn and numpy will be unaffected. + * Only one update type may be included in a single request's `updateMask`. + * For example, one cannot update both the PyPI packages and + * labels in the same request. However, it is possible to update multiple + * members of a map field simultaneously in the same request. For example, + * to set the labels "label1" and "label2" while clearing "label3" (assuming + * it already exists), one can + * provide the paths "labels.label1", "labels.label2", and "labels.label3" + * and populate the patch environment as follows: + * { + * "labels":{ + * "label1":"new-label1-value" + * "label2":"new-label2-value" + * } + * } + * Note that in the above example, any existing labels that are not + * included in the `updateMask` will be unaffected. + * It is also possible to replace an entire map field by providing the + * map field's path in the `updateMask`. The new value of the field will + * be that which is provided in the patch environment. For example, to + * delete all pre-existing user-specified PyPI packages and + * install botocore at version 1.7.14, the `updateMask` would contain + * the path "config.softwareConfig.pypiPackages", and + * the patch environment would be the following: + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "botocore":"==1.7.14" + * } + * } + * } + * } + * **Note:** Only the following fields can be updated: + * * `config.softwareConfig.pypiPackages` + * * Replace all custom custom PyPI packages. If a replacement + * package map is not included in `environment`, all custom + * PyPI packages are cleared. It is an error to provide both + * this mask and a mask specifying an individual package. + * * `config.softwareConfig.pypiPackages.`packagename + * * Update the custom PyPI package *packagename*, + * preserving other packages. To delete the package, include it in + * `updateMask`, and omit the mapping for it in + * `environment.config.softwareConfig.pypiPackages`. It is an error + * to provide both a mask of this form and the + * `config.softwareConfig.pypiPackages` mask. + * * `labels` + * * Replace all environment labels. If a replacement labels map is not + * included in `environment`, all labels are cleared. It is an error to + * provide both this mask and a mask specifying one or more individual + * labels. + * * `labels.`labelName + * * Set the label named *labelName*, while preserving other + * labels. To delete the label, include it in `updateMask` and omit its + * mapping in `environment.labels`. It is an error to provide both a + * mask of this form and the `labels` mask. + * * `config.nodeCount` + * * Horizontally scale the number of nodes in the environment. An integer + * greater than or equal to 3 must be provided in the `config.nodeCount` + * field. Supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * * `config.webServerNetworkAccessControl` + * * Replace the environment's current `WebServerNetworkAccessControl`. + * * `config.softwareConfig.airflowConfigOverrides` + * * Replace all Apache Airflow config overrides. If a replacement config + * overrides map is not included in `environment`, all config overrides + * are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual config overrides. + * * `config.softwareConfig.airflowConfigOverrides.`section-name + * * Override the Apache Airflow config property *name* in the + * section named *section*, preserving other properties. To + * delete the property override, include it in `updateMask` and omit its + * mapping in + * `environment.config.softwareConfig.airflowConfigOverrides`. + * It is an error to provide both a mask of this form and the + * `config.softwareConfig.airflowConfigOverrides` mask. + * * `config.softwareConfig.envVariables` + * * Replace all environment variables. If a replacement environment + * variable map is not included in `environment`, all custom environment + * variables are cleared. + * * `config.softwareConfig.schedulerCount` + * * Horizontally scale the number of schedulers in Airflow. A positive + * integer not greater than the number of nodes must be provided in the + * `config.softwareConfig.schedulerCount` field. Supported for Cloud + * Composer environments in versions composer-1.*.*-airflow-2.*.*. + * * `config.databaseConfig.machineType` + * * Cloud SQL machine type used by Airflow database. + * It has to be one of: db-n1-standard-2, db-n1-standard-4, + * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer + * environments in versions composer-1.*.*-airflow-*.*.*. + * * `config.webServerConfig.machineType` + * * Machine type on which Airflow web server is running. + * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 + * or composer-n1-webserver-8. Supported for Cloud Composer environments + * in versions composer-1.*.*-airflow-*.*.*. + */ + // const updateMask = {} + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callUpdateEnvironment() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await serviceClient.updateEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateEnvironment(); + // [END composer_v1_generated_Environments_UpdateEnvironment_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-orchestration-airflow-service/v1/samples/generated/v1/environments.update_user_workloads_config_map.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_user_workloads_config_map.js new file mode 100644 index 00000000000..99cfd1b4a3e --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_user_workloads_config_map.js @@ -0,0 +1,60 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1_generated_Environments_UpdateUserWorkloadsConfigMap_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. User workloads ConfigMap to override. + */ + // const userWorkloadsConfigMap = {} + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callUpdateUserWorkloadsConfigMap() { + // Construct request + const request = { + }; + + // Run request + const response = await serviceClient.updateUserWorkloadsConfigMap(request); + console.log(response); + } + + callUpdateUserWorkloadsConfigMap(); + // [END composer_v1_generated_Environments_UpdateUserWorkloadsConfigMap_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-orchestration-airflow-service/v1/samples/generated/v1/environments.update_user_workloads_secret.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_user_workloads_secret.js new file mode 100644 index 00000000000..3f12fb0b7db --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_user_workloads_secret.js @@ -0,0 +1,60 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1_generated_Environments_UpdateUserWorkloadsSecret_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. User workloads Secret to override. + */ + // const userWorkloadsSecret = {} + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callUpdateUserWorkloadsSecret() { + // Construct request + const request = { + }; + + // Run request + const response = await serviceClient.updateUserWorkloadsSecret(request); + console.log(response); + } + + callUpdateUserWorkloadsSecret(); + // [END composer_v1_generated_Environments_UpdateUserWorkloadsSecret_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-orchestration-airflow-service/v1/samples/generated/v1/image_versions.list_image_versions.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/image_versions.list_image_versions.js new file mode 100644 index 00000000000..1c70cd85eb6 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/image_versions.list_image_versions.js @@ -0,0 +1,75 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1_generated_ImageVersions_ListImageVersions_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. + */ + /** + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + */ + // const parent = 'abc123' + /** + * The maximum number of image_versions to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous List request, if any. + */ + // const pageToken = 'abc123' + /** + * Whether or not image versions from old releases should be included. + */ + // const includePastReleases = true + + // Imports the Service library + const {ImageVersionsClient} = require('@google-cloud/orchestration-airflow').v1; + + // Instantiates a client + const serviceClient = new ImageVersionsClient(); + + async function callListImageVersions() { + // Construct request + const request = { + }; + + // Run request + const iterable = serviceClient.listImageVersionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListImageVersions(); + // [END composer_v1_generated_ImageVersions_ListImageVersions_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-orchestration-airflow-service/v1/samples/generated/v1/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json new file mode 100644 index 00000000000..b85ea225bf1 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json @@ -0,0 +1,1155 @@ +{ + "clientLibrary": { + "name": "nodejs-service", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.orchestration.airflow.service.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "regionTag": "composer_v1_generated_Environments_CreateEnvironment_async", + "title": "Environments createEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Create a new environment.", + "canonical": true, + "file": "environments.create_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateEnvironment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "environment", + "type": ".google.cloud.orchestration.airflow.service.v1.Environment" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_GetEnvironment_async", + "title": "Environments getEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Get an existing environment.", + "canonical": true, + "file": "environments.get_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.Environment", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_ListEnvironments_async", + "title": "Environments listEnvironments Sample", + "origin": "API_DEFINITION", + "description": " List environments.", + "canonical": true, + "file": "environments.list_environments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListEnvironments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListEnvironments", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_UpdateEnvironment_async", + "title": "Environments updateEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Update an environment.", + "canonical": true, + "file": "environments.update_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 176, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "environment", + "type": ".google.cloud.orchestration.airflow.service.v1.Environment" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_DeleteEnvironment_async", + "title": "Environments deleteEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Delete an environment.", + "canonical": true, + "file": "environments.delete_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_ExecuteAirflowCommand_async", + "title": "Environments executeAirflowCommand Sample", + "origin": "API_DEFINITION", + "description": " Executes Airflow CLI command.", + "canonical": true, + "file": "environments.execute_airflow_command.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExecuteAirflowCommand", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ExecuteAirflowCommand", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + }, + { + "name": "command", + "type": "TYPE_STRING" + }, + { + "name": "subcommand", + "type": "TYPE_STRING" + }, + { + "name": "parameters", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "ExecuteAirflowCommand", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ExecuteAirflowCommand", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_StopAirflowCommand_async", + "title": "Environments stopAirflowCommand Sample", + "origin": "API_DEFINITION", + "description": " Stops Airflow CLI command execution.", + "canonical": true, + "file": "environments.stop_airflow_command.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "StopAirflowCommand", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.StopAirflowCommand", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + }, + { + "name": "execution_id", + "type": "TYPE_STRING" + }, + { + "name": "pod", + "type": "TYPE_STRING" + }, + { + "name": "pod_namespace", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "StopAirflowCommand", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.StopAirflowCommand", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_PollAirflowCommand_async", + "title": "Environments pollAirflowCommand Sample", + "origin": "API_DEFINITION", + "description": " Polls Airflow CLI command execution and fetches logs.", + "canonical": true, + "file": "environments.poll_airflow_command.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PollAirflowCommand", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.PollAirflowCommand", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + }, + { + "name": "execution_id", + "type": "TYPE_STRING" + }, + { + "name": "pod", + "type": "TYPE_STRING" + }, + { + "name": "pod_namespace", + "type": "TYPE_STRING" + }, + { + "name": "next_line_number", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "PollAirflowCommand", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.PollAirflowCommand", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_ListWorkloads_async", + "title": "Environments listWorkloads Sample", + "origin": "API_DEFINITION", + "description": " Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer component. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.list_workloads.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListWorkloads", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListWorkloads", + "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" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "ListWorkloads", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListWorkloads", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_CheckUpgrade_async", + "title": "Environments checkUpgrade Sample", + "origin": "API_DEFINITION", + "description": " Check if an upgrade operation on the environment will succeed. In case of problems detailed info can be found in the returned Operation.", + "canonical": true, + "file": "environments.check_upgrade.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CheckUpgrade", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CheckUpgrade", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + }, + { + "name": "image_version", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "CheckUpgrade", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CheckUpgrade", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_CreateUserWorkloadsSecret_async", + "title": "Environments createUserWorkloadsSecret Sample", + "origin": "API_DEFINITION", + "description": " Creates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.create_user_workloads_secret.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateUserWorkloadsSecret", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateUserWorkloadsSecret", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "user_workloads_secret", + "type": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "CreateUserWorkloadsSecret", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateUserWorkloadsSecret", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_GetUserWorkloadsSecret_async", + "title": "Environments getUserWorkloadsSecret Sample", + "origin": "API_DEFINITION", + "description": " Gets an existing user workloads Secret. Values of the \"data\" field in the response are cleared. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.get_user_workloads_secret.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetUserWorkloadsSecret", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetUserWorkloadsSecret", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "GetUserWorkloadsSecret", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetUserWorkloadsSecret", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_ListUserWorkloadsSecrets_async", + "title": "Environments listUserWorkloadsSecrets Sample", + "origin": "API_DEFINITION", + "description": " Lists user workloads Secrets. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.list_user_workloads_secrets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListUserWorkloadsSecrets", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListUserWorkloadsSecrets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "ListUserWorkloadsSecrets", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListUserWorkloadsSecrets", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_UpdateUserWorkloadsSecret_async", + "title": "Environments updateUserWorkloadsSecret Sample", + "origin": "API_DEFINITION", + "description": " Updates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.update_user_workloads_secret.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateUserWorkloadsSecret", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateUserWorkloadsSecret", + "async": true, + "parameters": [ + { + "name": "user_workloads_secret", + "type": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "UpdateUserWorkloadsSecret", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateUserWorkloadsSecret", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_DeleteUserWorkloadsSecret_async", + "title": "Environments deleteUserWorkloadsSecret Sample", + "origin": "API_DEFINITION", + "description": " Deletes a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.delete_user_workloads_secret.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteUserWorkloadsSecret", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteUserWorkloadsSecret", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "DeleteUserWorkloadsSecret", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteUserWorkloadsSecret", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_CreateUserWorkloadsConfigMap_async", + "title": "Environments createUserWorkloadsConfigMap Sample", + "origin": "API_DEFINITION", + "description": " Creates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.create_user_workloads_config_map.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateUserWorkloadsConfigMap", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateUserWorkloadsConfigMap", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "user_workloads_config_map", + "type": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "CreateUserWorkloadsConfigMap", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateUserWorkloadsConfigMap", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_GetUserWorkloadsConfigMap_async", + "title": "Environments getUserWorkloadsConfigMap Sample", + "origin": "API_DEFINITION", + "description": " Gets an existing user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.get_user_workloads_config_map.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetUserWorkloadsConfigMap", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetUserWorkloadsConfigMap", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "GetUserWorkloadsConfigMap", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetUserWorkloadsConfigMap", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_ListUserWorkloadsConfigMaps_async", + "title": "Environments listUserWorkloadsConfigMaps Sample", + "origin": "API_DEFINITION", + "description": " Lists user workloads ConfigMaps. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.list_user_workloads_config_maps.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListUserWorkloadsConfigMaps", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListUserWorkloadsConfigMaps", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "ListUserWorkloadsConfigMaps", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListUserWorkloadsConfigMaps", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_UpdateUserWorkloadsConfigMap_async", + "title": "Environments updateUserWorkloadsConfigMap Sample", + "origin": "API_DEFINITION", + "description": " Updates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.update_user_workloads_config_map.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateUserWorkloadsConfigMap", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateUserWorkloadsConfigMap", + "async": true, + "parameters": [ + { + "name": "user_workloads_config_map", + "type": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "UpdateUserWorkloadsConfigMap", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateUserWorkloadsConfigMap", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_DeleteUserWorkloadsConfigMap_async", + "title": "Environments deleteUserWorkloadsConfigMap Sample", + "origin": "API_DEFINITION", + "description": " Deletes a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.delete_user_workloads_config_map.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteUserWorkloadsConfigMap", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteUserWorkloadsConfigMap", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "DeleteUserWorkloadsConfigMap", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteUserWorkloadsConfigMap", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_SaveSnapshot_async", + "title": "Environments saveSnapshot Sample", + "origin": "API_DEFINITION", + "description": " Creates a snapshots of a Cloud Composer environment. As a result of this operation, snapshot of environment's state is stored in a location specified in the SaveSnapshotRequest.", + "canonical": true, + "file": "environments.save_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SaveSnapshot", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.SaveSnapshot", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + }, + { + "name": "snapshot_location", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "SaveSnapshot", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.SaveSnapshot", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_LoadSnapshot_async", + "title": "Environments loadSnapshot Sample", + "origin": "API_DEFINITION", + "description": " Loads a snapshot of a Cloud Composer environment. As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest is loaded into the environment.", + "canonical": true, + "file": "environments.load_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "LoadSnapshot", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.LoadSnapshot", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + }, + { + "name": "snapshot_path", + "type": "TYPE_STRING" + }, + { + "name": "skip_pypi_packages_installation", + "type": "TYPE_BOOL" + }, + { + "name": "skip_environment_variables_setting", + "type": "TYPE_BOOL" + }, + { + "name": "skip_airflow_overrides_setting", + "type": "TYPE_BOOL" + }, + { + "name": "skip_gcs_data_copying", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "LoadSnapshot", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.LoadSnapshot", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_DatabaseFailover_async", + "title": "Environments databaseFailover Sample", + "origin": "API_DEFINITION", + "description": " Triggers database failover (only for highly resilient environments).", + "canonical": true, + "file": "environments.database_failover.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DatabaseFailover", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DatabaseFailover", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "DatabaseFailover", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DatabaseFailover", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_Environments_FetchDatabaseProperties_async", + "title": "Environments fetchDatabaseProperties Sample", + "origin": "API_DEFINITION", + "description": " Fetches database properties.", + "canonical": true, + "file": "environments.fetch_database_properties.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchDatabaseProperties", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.FetchDatabaseProperties", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" + }, + "method": { + "shortName": "FetchDatabaseProperties", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.FetchDatabaseProperties", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1_generated_ImageVersions_ListImageVersions_async", + "title": "Environments listImageVersions Sample", + "origin": "API_DEFINITION", + "description": " List ImageVersions for provided location.", + "canonical": true, + "file": "image_versions.list_image_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersions.ListImageVersions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "include_past_releases", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse", + "client": { + "shortName": "ImageVersionsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersionsClient" + }, + "method": { + "shortName": "ListImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersions.ListImageVersions", + "service": { + "shortName": "ImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersions" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/index.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/index.ts new file mode 100644 index 00000000000..2336d08b148 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 v1 from './v1'; +const EnvironmentsClient = v1.EnvironmentsClient; +type EnvironmentsClient = v1.EnvironmentsClient; +const ImageVersionsClient = v1.ImageVersionsClient; +type ImageVersionsClient = v1.ImageVersionsClient; +export {v1, EnvironmentsClient, ImageVersionsClient}; +export default {v1, EnvironmentsClient, ImageVersionsClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_client.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_client.ts new file mode 100644 index 00000000000..7d3dd51e622 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_client.ts @@ -0,0 +1,3311 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); + +/** + * Client JSON configuration object, loaded from + * `src/v1/environments_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './environments_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Managed Apache Airflow Environments. + * @class + * @memberof v1 + */ +export class EnvironmentsClient { + 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; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + environmentsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of EnvironmentsClient. + * + * @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://developers.google.com/identity/protocols/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 EnvironmentsClient({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 EnvironmentsClient; + 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 = 'composer.' + 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; + } + + // 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 = { + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/environments/{environment}' + ), + userWorkloadsConfigMapPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}' + ), + userWorkloadsSecretPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}' + ), + }; + + // 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 = { + listEnvironments: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'environments'), + listWorkloads: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'workloads'), + listUserWorkloadsSecrets: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'userWorkloadsSecrets'), + listUserWorkloadsConfigMaps: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'userWorkloadsConfigMaps') + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(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.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 createEnvironmentResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.Environment') as gax.protobuf.Type; + const createEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.OperationMetadata') as gax.protobuf.Type; + const updateEnvironmentResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.Environment') as gax.protobuf.Type; + const updateEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.OperationMetadata') as gax.protobuf.Type; + const deleteEnvironmentResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.OperationMetadata') as gax.protobuf.Type; + const checkUpgradeResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse') as gax.protobuf.Type; + const checkUpgradeMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.OperationMetadata') as gax.protobuf.Type; + const saveSnapshotResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse') as gax.protobuf.Type; + const saveSnapshotMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.OperationMetadata') as gax.protobuf.Type; + const loadSnapshotResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse') as gax.protobuf.Type; + const loadSnapshotMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.OperationMetadata') as gax.protobuf.Type; + const databaseFailoverResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse') as gax.protobuf.Type; + const databaseFailoverMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createEnvironmentResponse.decode.bind(createEnvironmentResponse), + createEnvironmentMetadata.decode.bind(createEnvironmentMetadata)), + updateEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateEnvironmentResponse.decode.bind(updateEnvironmentResponse), + updateEnvironmentMetadata.decode.bind(updateEnvironmentMetadata)), + deleteEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteEnvironmentResponse.decode.bind(deleteEnvironmentResponse), + deleteEnvironmentMetadata.decode.bind(deleteEnvironmentMetadata)), + checkUpgrade: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + checkUpgradeResponse.decode.bind(checkUpgradeResponse), + checkUpgradeMetadata.decode.bind(checkUpgradeMetadata)), + saveSnapshot: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + saveSnapshotResponse.decode.bind(saveSnapshotResponse), + saveSnapshotMetadata.decode.bind(saveSnapshotMetadata)), + loadSnapshot: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + loadSnapshotResponse.decode.bind(loadSnapshotResponse), + loadSnapshotMetadata.decode.bind(loadSnapshotMetadata)), + databaseFailover: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + databaseFailoverResponse.decode.bind(databaseFailoverResponse), + databaseFailoverMetadata.decode.bind(databaseFailoverMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.orchestration.airflow.service.v1.Environments', 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.environmentsStub) { + return this.environmentsStub; + } + + // Put together the "service stub" for + // google.cloud.orchestration.airflow.service.v1.Environments. + this.environmentsStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.orchestration.airflow.service.v1.Environments') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.orchestration.airflow.service.v1.Environments, + 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 environmentsStubMethods = + ['createEnvironment', 'getEnvironment', 'listEnvironments', 'updateEnvironment', 'deleteEnvironment', 'executeAirflowCommand', 'stopAirflowCommand', 'pollAirflowCommand', 'listWorkloads', 'checkUpgrade', 'createUserWorkloadsSecret', 'getUserWorkloadsSecret', 'listUserWorkloadsSecrets', 'updateUserWorkloadsSecret', 'deleteUserWorkloadsSecret', 'createUserWorkloadsConfigMap', 'getUserWorkloadsConfigMap', 'listUserWorkloadsConfigMaps', 'updateUserWorkloadsConfigMap', 'deleteUserWorkloadsConfigMap', 'saveSnapshot', 'loadSnapshot', 'databaseFailover', 'fetchDatabaseProperties']; + for (const methodName of environmentsStubMethods) { + const callPromise = this.environmentsStub.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.environmentsStub; + } + + /** + * 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 'composer.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 'composer.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 -- + // ------------------- +/** + * Get an existing environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @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.orchestration.airflow.service.v1.Environment|Environment}. + * 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/environments.get_environment.js + * region_tag:composer_v1_generated_Environments_GetEnvironment_async + */ + getEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest|undefined, {}|undefined + ]>; + getEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>): void; + getEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>): void; + getEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest|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(); + return this.innerApiCalls.getEnvironment(request, options, callback); + } +/** + * Executes Airflow CLI command. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + * @param {string} request.command + * Airflow command. + * @param {string} request.subcommand + * Airflow subcommand. + * @param {string[]} request.parameters + * Parameters for the Airflow command/subcommand as an array of arguments. + * It may contain positional arguments like `["my-dag-id"]`, key-value + * parameters like `["--foo=bar"]` or `["--foo","bar"]`, + * or other flags like `["-f"]`. + * @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.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse|ExecuteAirflowCommandResponse}. + * 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/environments.execute_airflow_command.js + * region_tag:composer_v1_generated_Environments_ExecuteAirflowCommand_async + */ + executeAirflowCommand( + request?: protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest|undefined, {}|undefined + ]>; + executeAirflowCommand( + request: protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest|null|undefined, + {}|null|undefined>): void; + executeAirflowCommand( + request: protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest|null|undefined, + {}|null|undefined>): void; + executeAirflowCommand( + request?: protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest|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({ + 'environment': request.environment ?? '', + }); + this.initialize(); + return this.innerApiCalls.executeAirflowCommand(request, options, callback); + } +/** + * Stops Airflow CLI command execution. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + * @param {string} request.executionId + * The unique ID of the command execution. + * @param {string} request.pod + * The name of the pod where the command is executed. + * @param {string} request.podNamespace + * The namespace of the pod where the command is executed. + * @param {boolean} request.force + * If true, the execution is terminated forcefully (SIGKILL). If false, the + * execution is stopped gracefully, giving it time for cleanup. + * @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.orchestration.airflow.service.v1.StopAirflowCommandResponse|StopAirflowCommandResponse}. + * 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/environments.stop_airflow_command.js + * region_tag:composer_v1_generated_Environments_StopAirflowCommand_async + */ + stopAirflowCommand( + request?: protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest|undefined, {}|undefined + ]>; + stopAirflowCommand( + request: protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest|null|undefined, + {}|null|undefined>): void; + stopAirflowCommand( + request: protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest|null|undefined, + {}|null|undefined>): void; + stopAirflowCommand( + request?: protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest|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({ + 'environment': request.environment ?? '', + }); + this.initialize(); + return this.innerApiCalls.stopAirflowCommand(request, options, callback); + } +/** + * Polls Airflow CLI command execution and fetches logs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {string} request.executionId + * The unique ID of the command execution. + * @param {string} request.pod + * The name of the pod where the command is executed. + * @param {string} request.podNamespace + * The namespace of the pod where the command is executed. + * @param {number} request.nextLineNumber + * Line number from which new logs should be fetched. + * @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.orchestration.airflow.service.v1.PollAirflowCommandResponse|PollAirflowCommandResponse}. + * 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/environments.poll_airflow_command.js + * region_tag:composer_v1_generated_Environments_PollAirflowCommand_async + */ + pollAirflowCommand( + request?: protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest|undefined, {}|undefined + ]>; + pollAirflowCommand( + request: protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest|null|undefined, + {}|null|undefined>): void; + pollAirflowCommand( + request: protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest|null|undefined, + {}|null|undefined>): void; + pollAirflowCommand( + request?: protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest|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({ + 'environment': request.environment ?? '', + }); + this.initialize(); + return this.innerApiCalls.pollAirflowCommand(request, options, callback); + } +/** + * Creates a user workloads Secret. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The environment name to create a Secret for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} request.userWorkloadsSecret + * Required. User workloads Secret to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret|UserWorkloadsSecret}. + * 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/environments.create_user_workloads_secret.js + * region_tag:composer_v1_generated_Environments_CreateUserWorkloadsSecret_async + */ + createUserWorkloadsSecret( + request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest|undefined, {}|undefined + ]>; + createUserWorkloadsSecret( + request: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): void; + createUserWorkloadsSecret( + request: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): void; + createUserWorkloadsSecret( + request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest|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(); + return this.innerApiCalls.createUserWorkloadsSecret(request, options, callback); + } +/** + * Gets an existing user workloads Secret. + * Values of the "data" field in the response are cleared. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Secret to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * @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.orchestration.airflow.service.v1.UserWorkloadsSecret|UserWorkloadsSecret}. + * 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/environments.get_user_workloads_secret.js + * region_tag:composer_v1_generated_Environments_GetUserWorkloadsSecret_async + */ + getUserWorkloadsSecret( + request?: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest|undefined, {}|undefined + ]>; + getUserWorkloadsSecret( + request: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): void; + getUserWorkloadsSecret( + request: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): void; + getUserWorkloadsSecret( + request?: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest|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(); + return this.innerApiCalls.getUserWorkloadsSecret(request, options, callback); + } +/** + * Updates a user workloads Secret. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} [request.userWorkloadsSecret] + * Optional. User workloads Secret to override. + * @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.orchestration.airflow.service.v1.UserWorkloadsSecret|UserWorkloadsSecret}. + * 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/environments.update_user_workloads_secret.js + * region_tag:composer_v1_generated_Environments_UpdateUserWorkloadsSecret_async + */ + updateUserWorkloadsSecret( + request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest|undefined, {}|undefined + ]>; + updateUserWorkloadsSecret( + request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): void; + updateUserWorkloadsSecret( + request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): void; + updateUserWorkloadsSecret( + request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest|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({ + 'user_workloads_secret.name': request.userWorkloadsSecret!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateUserWorkloadsSecret(request, options, callback); + } +/** + * Deletes a user workloads Secret. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The Secret to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * @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.protobuf.Empty|Empty}. + * 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/environments.delete_user_workloads_secret.js + * region_tag:composer_v1_generated_Environments_DeleteUserWorkloadsSecret_async + */ + deleteUserWorkloadsSecret( + request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest|undefined, {}|undefined + ]>; + deleteUserWorkloadsSecret( + request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): void; + deleteUserWorkloadsSecret( + request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): void; + deleteUserWorkloadsSecret( + request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest|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(); + return this.innerApiCalls.deleteUserWorkloadsSecret(request, options, callback); + } +/** + * Creates a user workloads ConfigMap. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The environment name to create a ConfigMap for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} request.userWorkloadsConfigMap + * Required. User workloads ConfigMap to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. + * 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/environments.create_user_workloads_config_map.js + * region_tag:composer_v1_generated_Environments_CreateUserWorkloadsConfigMap_async + */ + createUserWorkloadsConfigMap( + request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest|undefined, {}|undefined + ]>; + createUserWorkloadsConfigMap( + request: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): void; + createUserWorkloadsConfigMap( + request: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): void; + createUserWorkloadsConfigMap( + request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest|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(); + return this.innerApiCalls.createUserWorkloadsConfigMap(request, options, callback); + } +/** + * Gets an existing user workloads ConfigMap. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the ConfigMap to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * @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.orchestration.airflow.service.v1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. + * 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/environments.get_user_workloads_config_map.js + * region_tag:composer_v1_generated_Environments_GetUserWorkloadsConfigMap_async + */ + getUserWorkloadsConfigMap( + request?: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest|undefined, {}|undefined + ]>; + getUserWorkloadsConfigMap( + request: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): void; + getUserWorkloadsConfigMap( + request: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): void; + getUserWorkloadsConfigMap( + request?: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest|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(); + return this.innerApiCalls.getUserWorkloadsConfigMap(request, options, callback); + } +/** + * Updates a user workloads ConfigMap. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} [request.userWorkloadsConfigMap] + * Optional. User workloads ConfigMap to override. + * @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.orchestration.airflow.service.v1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. + * 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/environments.update_user_workloads_config_map.js + * region_tag:composer_v1_generated_Environments_UpdateUserWorkloadsConfigMap_async + */ + updateUserWorkloadsConfigMap( + request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest|undefined, {}|undefined + ]>; + updateUserWorkloadsConfigMap( + request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): void; + updateUserWorkloadsConfigMap( + request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): void; + updateUserWorkloadsConfigMap( + request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest|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({ + 'user_workloads_config_map.name': request.userWorkloadsConfigMap!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateUserWorkloadsConfigMap(request, options, callback); + } +/** + * Deletes a user workloads ConfigMap. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The ConfigMap to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * @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.protobuf.Empty|Empty}. + * 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/environments.delete_user_workloads_config_map.js + * region_tag:composer_v1_generated_Environments_DeleteUserWorkloadsConfigMap_async + */ + deleteUserWorkloadsConfigMap( + request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest|undefined, {}|undefined + ]>; + deleteUserWorkloadsConfigMap( + request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): void; + deleteUserWorkloadsConfigMap( + request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): void; + deleteUserWorkloadsConfigMap( + request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest|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(); + return this.innerApiCalls.deleteUserWorkloadsConfigMap(request, options, callback); + } +/** + * Fetches database properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * Required. The resource name of the environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @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.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse|FetchDatabasePropertiesResponse}. + * 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/environments.fetch_database_properties.js + * region_tag:composer_v1_generated_Environments_FetchDatabaseProperties_async + */ + fetchDatabaseProperties( + request?: protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, + protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest|undefined, {}|undefined + ]>; + fetchDatabaseProperties( + request: protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, + protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest|null|undefined, + {}|null|undefined>): void; + fetchDatabaseProperties( + request: protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, + protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest|null|undefined, + {}|null|undefined>): void; + fetchDatabaseProperties( + request?: protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, + protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, + protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, + protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest|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({ + 'environment': request.environment ?? '', + }); + this.initialize(); + return this.innerApiCalls.fetchDatabaseProperties(request, options, callback); + } + +/** + * Create a new environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + * @param {google.cloud.orchestration.airflow.service.v1.Environment} request.environment + * The environment to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/environments.create_environment.js + * region_tag:composer_v1_generated_Environments_CreateEnvironment_async + */ + createEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, + 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(); + return this.innerApiCalls.createEnvironment(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createEnvironment()`. + * @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/environments.create_environment.js + * region_tag:composer_v1_generated_Environments_CreateEnvironment_async + */ + async checkCreateEnvironmentProgress(name: string): Promise>{ + 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.createEnvironment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Update an environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The relative resource name of the environment to update, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {google.cloud.orchestration.airflow.service.v1.Environment} request.environment + * A patch environment. Fields specified by the `updateMask` will be copied + * from the patch environment into the environment under update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A comma-separated list of paths, relative to `Environment`, of + * fields to update. + * For example, to set the version of scikit-learn to install in the + * environment to 0.19.0 and to remove an existing installation of + * numpy, the `updateMask` parameter would include the following two + * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + * "config.softwareConfig.pypiPackages.numpy". The included patch + * environment would specify the scikit-learn version as follows: + * + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "scikit-learn":"==0.19.0" + * } + * } + * } + * } + * + * Note that in the above example, any existing PyPI packages + * other than scikit-learn and numpy will be unaffected. + * + * Only one update type may be included in a single request's `updateMask`. + * For example, one cannot update both the PyPI packages and + * labels in the same request. However, it is possible to update multiple + * members of a map field simultaneously in the same request. For example, + * to set the labels "label1" and "label2" while clearing "label3" (assuming + * it already exists), one can + * provide the paths "labels.label1", "labels.label2", and "labels.label3" + * and populate the patch environment as follows: + * + * { + * "labels":{ + * "label1":"new-label1-value" + * "label2":"new-label2-value" + * } + * } + * + * Note that in the above example, any existing labels that are not + * included in the `updateMask` will be unaffected. + * + * It is also possible to replace an entire map field by providing the + * map field's path in the `updateMask`. The new value of the field will + * be that which is provided in the patch environment. For example, to + * delete all pre-existing user-specified PyPI packages and + * install botocore at version 1.7.14, the `updateMask` would contain + * the path "config.softwareConfig.pypiPackages", and + * the patch environment would be the following: + * + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "botocore":"==1.7.14" + * } + * } + * } + * } + * + * **Note:** Only the following fields can be updated: + * + * * `config.softwareConfig.pypiPackages` + * * Replace all custom custom PyPI packages. If a replacement + * package map is not included in `environment`, all custom + * PyPI packages are cleared. It is an error to provide both + * this mask and a mask specifying an individual package. + * * `config.softwareConfig.pypiPackages.`packagename + * * Update the custom PyPI package *packagename*, + * preserving other packages. To delete the package, include it in + * `updateMask`, and omit the mapping for it in + * `environment.config.softwareConfig.pypiPackages`. It is an error + * to provide both a mask of this form and the + * `config.softwareConfig.pypiPackages` mask. + * * `labels` + * * Replace all environment labels. If a replacement labels map is not + * included in `environment`, all labels are cleared. It is an error to + * provide both this mask and a mask specifying one or more individual + * labels. + * * `labels.`labelName + * * Set the label named *labelName*, while preserving other + * labels. To delete the label, include it in `updateMask` and omit its + * mapping in `environment.labels`. It is an error to provide both a + * mask of this form and the `labels` mask. + * * `config.nodeCount` + * * Horizontally scale the number of nodes in the environment. An integer + * greater than or equal to 3 must be provided in the `config.nodeCount` + * field. Supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * * `config.webServerNetworkAccessControl` + * * Replace the environment's current `WebServerNetworkAccessControl`. + * * `config.softwareConfig.airflowConfigOverrides` + * * Replace all Apache Airflow config overrides. If a replacement config + * overrides map is not included in `environment`, all config overrides + * are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual config overrides. + * * `config.softwareConfig.airflowConfigOverrides.`section-name + * * Override the Apache Airflow config property *name* in the + * section named *section*, preserving other properties. To + * delete the property override, include it in `updateMask` and omit its + * mapping in + * `environment.config.softwareConfig.airflowConfigOverrides`. + * It is an error to provide both a mask of this form and the + * `config.softwareConfig.airflowConfigOverrides` mask. + * * `config.softwareConfig.envVariables` + * * Replace all environment variables. If a replacement environment + * variable map is not included in `environment`, all custom environment + * variables are cleared. + * * `config.softwareConfig.schedulerCount` + * * Horizontally scale the number of schedulers in Airflow. A positive + * integer not greater than the number of nodes must be provided in the + * `config.softwareConfig.schedulerCount` field. Supported for Cloud + * Composer environments in versions composer-1.*.*-airflow-2.*.*. + * * `config.databaseConfig.machineType` + * * Cloud SQL machine type used by Airflow database. + * It has to be one of: db-n1-standard-2, db-n1-standard-4, + * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer + * environments in versions composer-1.*.*-airflow-*.*.*. + * * `config.webServerConfig.machineType` + * * Machine type on which Airflow web server is running. + * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 + * or composer-n1-webserver-8. Supported for Cloud Composer environments + * in versions composer-1.*.*-airflow-*.*.*. + * @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/environments.update_environment.js + * region_tag:composer_v1_generated_Environments_UpdateEnvironment_async + */ + updateEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, + 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(); + return this.innerApiCalls.updateEnvironment(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateEnvironment()`. + * @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/environments.update_environment.js + * region_tag:composer_v1_generated_Environments_UpdateEnvironment_async + */ + async checkUpdateEnvironmentProgress(name: string): Promise>{ + 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.updateEnvironment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Delete an environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @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/environments.delete_environment.js + * region_tag:composer_v1_generated_Environments_DeleteEnvironment_async + */ + deleteEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, + 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(); + return this.innerApiCalls.deleteEnvironment(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteEnvironment()`. + * @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/environments.delete_environment.js + * region_tag:composer_v1_generated_Environments_DeleteEnvironment_async + */ + async checkDeleteEnvironmentProgress(name: string): Promise>{ + 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.deleteEnvironment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Check if an upgrade operation on the environment will succeed. + * + * In case of problems detailed info can be found in the returned Operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * Required. The resource name of the environment to check upgrade for, in the + * form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {string} [request.imageVersion] + * Optional. The version of the software running in the environment. + * This encapsulates both the version of Cloud Composer functionality and the + * version of Apache Airflow. It must match the regular expression + * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. + * When used as input, the server also checks if the provided version is + * supported and denies the request for an unsupported version. + * + * The Cloud Composer portion of the image version is a full + * [semantic version](https://semver.org), or an alias in the form of major + * version number or `latest`. When an alias is provided, the server replaces + * it with the current Cloud Composer version that satisfies the alias. + * + * The Apache Airflow portion of the image version is a full semantic version + * that points to one of the supported Apache Airflow versions, or an alias in + * the form of only major or major.minor versions specified. When an alias is + * provided, the server replaces it with the latest Apache Airflow version + * that satisfies the alias and is supported in the given Cloud Composer + * version. + * + * In all cases, the resolved image version is stored in the same field. + * + * See also [version + * list](/composer/docs/concepts/versioning/composer-versions) and [versioning + * overview](/composer/docs/concepts/versioning/composer-versioning-overview). + * @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/environments.check_upgrade.js + * region_tag:composer_v1_generated_Environments_CheckUpgrade_async + */ + checkUpgrade( + request?: protos.google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + checkUpgrade( + request: protos.google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + checkUpgrade( + request: protos.google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + checkUpgrade( + request?: protos.google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest, + 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({ + 'environment': request.environment ?? '', + }); + this.initialize(); + return this.innerApiCalls.checkUpgrade(request, options, callback); + } +/** + * Check the status of the long running operation returned by `checkUpgrade()`. + * @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/environments.check_upgrade.js + * region_tag:composer_v1_generated_Environments_CheckUpgrade_async + */ + async checkCheckUpgradeProgress(name: string): Promise>{ + 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.checkUpgrade, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a snapshots of a Cloud Composer environment. + * + * As a result of this operation, snapshot of environment's state is stored + * in a location specified in the SaveSnapshotRequest. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * The resource name of the source environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {string} request.snapshotLocation + * Location in a Cloud Storage where the snapshot is going to be stored, e.g.: + * "gs://my-bucket/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/environments.save_snapshot.js + * region_tag:composer_v1_generated_Environments_SaveSnapshot_async + */ + saveSnapshot( + request?: protos.google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + saveSnapshot( + request: protos.google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + saveSnapshot( + request: protos.google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + saveSnapshot( + request?: protos.google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest, + 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({ + 'environment': request.environment ?? '', + }); + this.initialize(); + return this.innerApiCalls.saveSnapshot(request, options, callback); + } +/** + * Check the status of the long running operation returned by `saveSnapshot()`. + * @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/environments.save_snapshot.js + * region_tag:composer_v1_generated_Environments_SaveSnapshot_async + */ + async checkSaveSnapshotProgress(name: string): Promise>{ + 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.saveSnapshot, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Loads a snapshot of a Cloud Composer environment. + * + * As a result of this operation, a snapshot of environment's specified in + * LoadSnapshotRequest is loaded into the environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * The resource name of the target environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {string} request.snapshotPath + * A Cloud Storage path to a snapshot to load, e.g.: + * "gs://my-bucket/snapshots/project_location_environment_timestamp". + * @param {boolean} request.skipPypiPackagesInstallation + * Whether or not to skip installing Pypi packages when loading the + * environment's state. + * @param {boolean} request.skipEnvironmentVariablesSetting + * Whether or not to skip setting environment variables when loading the + * environment's state. + * @param {boolean} request.skipAirflowOverridesSetting + * Whether or not to skip setting Airflow overrides when loading the + * environment's state. + * @param {boolean} request.skipGcsDataCopying + * Whether or not to skip copying Cloud Storage data when loading the + * environment's state. + * @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/environments.load_snapshot.js + * region_tag:composer_v1_generated_Environments_LoadSnapshot_async + */ + loadSnapshot( + request?: protos.google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + loadSnapshot( + request: protos.google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + loadSnapshot( + request: protos.google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + loadSnapshot( + request?: protos.google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest, + 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({ + 'environment': request.environment ?? '', + }); + this.initialize(); + return this.innerApiCalls.loadSnapshot(request, options, callback); + } +/** + * Check the status of the long running operation returned by `loadSnapshot()`. + * @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/environments.load_snapshot.js + * region_tag:composer_v1_generated_Environments_LoadSnapshot_async + */ + async checkLoadSnapshotProgress(name: string): Promise>{ + 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.loadSnapshot, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Triggers database failover (only for highly resilient environments). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * Target environment: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @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/environments.database_failover.js + * region_tag:composer_v1_generated_Environments_DatabaseFailover_async + */ + databaseFailover( + request?: protos.google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + databaseFailover( + request: protos.google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + databaseFailover( + request: protos.google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + databaseFailover( + request?: protos.google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest, + 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({ + 'environment': request.environment ?? '', + }); + this.initialize(); + return this.innerApiCalls.databaseFailover(request, options, callback); + } +/** + * Check the status of the long running operation returned by `databaseFailover()`. + * @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/environments.database_failover.js + * region_tag:composer_v1_generated_Environments_DatabaseFailover_async + */ + async checkDatabaseFailoverProgress(name: string): Promise>{ + 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.databaseFailover, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * List environments. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of environments to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @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.orchestration.airflow.service.v1.Environment|Environment}. + * 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 `listEnvironmentsAsync()` + * 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. + */ + listEnvironments( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment[], + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse + ]>; + listEnvironments( + request: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment>): void; + listEnvironments( + request: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment>): void; + listEnvironments( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment>, + callback?: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IEnvironment[], + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse + ]>|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(); + return this.innerApiCalls.listEnvironments(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of environments to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @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.orchestration.airflow.service.v1.Environment|Environment} 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 `listEnvironmentsAsync()` + * 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. + */ + listEnvironmentsStream( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + 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['listEnvironments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEnvironments.createStream( + this.innerApiCalls.listEnvironments as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listEnvironments`, 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 + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of environments to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @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.orchestration.airflow.service.v1.Environment|Environment}. 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/environments.list_environments.js + * region_tag:composer_v1_generated_Environments_ListEnvironments_async + */ + listEnvironmentsAsync( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, + 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['listEnvironments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEnvironments.asyncIterate( + this.innerApiCalls['listEnvironments'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists workloads in a Cloud Composer environment. Workload is a unit that + * runs a single Composer component. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The environment name to get workloads for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of environments to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @param {string} [request.filter] + * Optional. The list filter. + * Currently only supports equality on the type field. The value of a field + * specified in the filter expression must be one ComposerWorkloadType enum + * option. It's possible to get multiple types using "OR" operator, e.g.: + * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are + * returned. + * @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.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload|ComposerWorkload}. + * 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 `listWorkloadsAsync()` + * 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. + */ + listWorkloads( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload[], + protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse + ]>; + listWorkloads( + request: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload>): void; + listWorkloads( + request: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload>): void; + listWorkloads( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload>, + callback?: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload[], + protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse + ]>|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(); + return this.innerApiCalls.listWorkloads(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The environment name to get workloads for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of environments to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @param {string} [request.filter] + * Optional. The list filter. + * Currently only supports equality on the type field. The value of a field + * specified in the filter expression must be one ComposerWorkloadType enum + * option. It's possible to get multiple types using "OR" operator, e.g.: + * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are + * returned. + * @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.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload|ComposerWorkload} 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 `listWorkloadsAsync()` + * 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. + */ + listWorkloadsStream( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, + 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['listWorkloads']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkloads.createStream( + this.innerApiCalls.listWorkloads as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listWorkloads`, 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 environment name to get workloads for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of environments to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @param {string} [request.filter] + * Optional. The list filter. + * Currently only supports equality on the type field. The value of a field + * specified in the filter expression must be one ComposerWorkloadType enum + * option. It's possible to get multiple types using "OR" operator, e.g.: + * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are + * returned. + * @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.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload|ComposerWorkload}. 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/environments.list_workloads.js + * region_tag:composer_v1_generated_Environments_ListWorkloads_async + */ + listWorkloadsAsync( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, + 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['listWorkloads']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkloads.asyncIterate( + this.innerApiCalls['listWorkloads'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists user workloads Secrets. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. List Secrets in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of Secrets to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @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.orchestration.airflow.service.v1.UserWorkloadsSecret|UserWorkloadsSecret}. + * 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 `listUserWorkloadsSecretsAsync()` + * 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. + */ + listUserWorkloadsSecrets( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret[], + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse + ]>; + listUserWorkloadsSecrets( + request: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret>): void; + listUserWorkloadsSecrets( + request: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret>): void; + listUserWorkloadsSecrets( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret>, + callback?: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret[], + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse + ]>|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(); + return this.innerApiCalls.listUserWorkloadsSecrets(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. List Secrets in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of Secrets to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @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.orchestration.airflow.service.v1.UserWorkloadsSecret|UserWorkloadsSecret} 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 `listUserWorkloadsSecretsAsync()` + * 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. + */ + listUserWorkloadsSecretsStream( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, + 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['listUserWorkloadsSecrets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listUserWorkloadsSecrets.createStream( + this.innerApiCalls.listUserWorkloadsSecrets as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listUserWorkloadsSecrets`, 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. List Secrets in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of Secrets to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @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.orchestration.airflow.service.v1.UserWorkloadsSecret|UserWorkloadsSecret}. 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/environments.list_user_workloads_secrets.js + * region_tag:composer_v1_generated_Environments_ListUserWorkloadsSecrets_async + */ + listUserWorkloadsSecretsAsync( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, + 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['listUserWorkloadsSecrets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listUserWorkloadsSecrets.asyncIterate( + this.innerApiCalls['listUserWorkloadsSecrets'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists user workloads ConfigMaps. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. List ConfigMaps in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of ConfigMaps to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @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.orchestration.airflow.service.v1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. + * 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 `listUserWorkloadsConfigMapsAsync()` + * 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. + */ + listUserWorkloadsConfigMaps( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap[], + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse + ]>; + listUserWorkloadsConfigMaps( + request: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap>): void; + listUserWorkloadsConfigMaps( + request: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap>): void; + listUserWorkloadsConfigMaps( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap>, + callback?: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap[], + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse + ]>|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(); + return this.innerApiCalls.listUserWorkloadsConfigMaps(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. List ConfigMaps in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of ConfigMaps to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @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.orchestration.airflow.service.v1.UserWorkloadsConfigMap|UserWorkloadsConfigMap} 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 `listUserWorkloadsConfigMapsAsync()` + * 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. + */ + listUserWorkloadsConfigMapsStream( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, + 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['listUserWorkloadsConfigMaps']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listUserWorkloadsConfigMaps.createStream( + this.innerApiCalls.listUserWorkloadsConfigMaps as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listUserWorkloadsConfigMaps`, 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. List ConfigMaps in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of ConfigMaps to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @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.orchestration.airflow.service.v1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. 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/environments.list_user_workloads_config_maps.js + * region_tag:composer_v1_generated_Environments_ListUserWorkloadsConfigMaps_async + */ + listUserWorkloadsConfigMapsAsync( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, + 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['listUserWorkloadsConfigMaps']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate( + this.innerApiCalls['listUserWorkloadsConfigMaps'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * 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, + options?: + | 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]> { + 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 { + 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, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + 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, + options?: + | 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 { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project:string,location:string,environment:string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).location; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + } + + /** + * Return a fully-qualified userWorkloadsConfigMap resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} environment + * @param {string} user_workloads_config_map + * @returns {string} Resource name string. + */ + userWorkloadsConfigMapPath(project:string,location:string,environment:string,userWorkloadsConfigMap:string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.render({ + project: project, + location: location, + environment: environment, + user_workloads_config_map: userWorkloadsConfigMap, + }); + } + + /** + * Parse the project from UserWorkloadsConfigMap resource. + * + * @param {string} userWorkloadsConfigMapName + * A fully-qualified path representing UserWorkloadsConfigMap resource. + * @returns {string} A string representing the project. + */ + matchProjectFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).project; + } + + /** + * Parse the location from UserWorkloadsConfigMap resource. + * + * @param {string} userWorkloadsConfigMapName + * A fully-qualified path representing UserWorkloadsConfigMap resource. + * @returns {string} A string representing the location. + */ + matchLocationFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).location; + } + + /** + * Parse the environment from UserWorkloadsConfigMap resource. + * + * @param {string} userWorkloadsConfigMapName + * A fully-qualified path representing UserWorkloadsConfigMap resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).environment; + } + + /** + * Parse the user_workloads_config_map from UserWorkloadsConfigMap resource. + * + * @param {string} userWorkloadsConfigMapName + * A fully-qualified path representing UserWorkloadsConfigMap resource. + * @returns {string} A string representing the user_workloads_config_map. + */ + matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).user_workloads_config_map; + } + + /** + * Return a fully-qualified userWorkloadsSecret resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} environment + * @param {string} user_workloads_secret + * @returns {string} Resource name string. + */ + userWorkloadsSecretPath(project:string,location:string,environment:string,userWorkloadsSecret:string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.render({ + project: project, + location: location, + environment: environment, + user_workloads_secret: userWorkloadsSecret, + }); + } + + /** + * Parse the project from UserWorkloadsSecret resource. + * + * @param {string} userWorkloadsSecretName + * A fully-qualified path representing UserWorkloadsSecret resource. + * @returns {string} A string representing the project. + */ + matchProjectFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).project; + } + + /** + * Parse the location from UserWorkloadsSecret resource. + * + * @param {string} userWorkloadsSecretName + * A fully-qualified path representing UserWorkloadsSecret resource. + * @returns {string} A string representing the location. + */ + matchLocationFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).location; + } + + /** + * Parse the environment from UserWorkloadsSecret resource. + * + * @param {string} userWorkloadsSecretName + * A fully-qualified path representing UserWorkloadsSecret resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).environment; + } + + /** + * Parse the user_workloads_secret from UserWorkloadsSecret resource. + * + * @param {string} userWorkloadsSecretName + * A fully-qualified path representing UserWorkloadsSecret resource. + * @returns {string} A string representing the user_workloads_secret. + */ + matchUserWorkloadsSecretFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).user_workloads_secret; + } + + /** + * 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.environmentsStub && !this._terminated) { + return this.environmentsStub.then(stub => { + this._terminated = true; + stub.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_client_config.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_client_config.json new file mode 100644 index 00000000000..151b1adc1d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_client_config.json @@ -0,0 +1,122 @@ +{ + "interfaces": { + "google.cloud.orchestration.airflow.service.v1.Environments": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "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 + } + }, + "methods": { + "CreateEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListEnvironments": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ExecuteAirflowCommand": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "StopAirflowCommand": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PollAirflowCommand": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListWorkloads": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CheckUpgrade": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateUserWorkloadsSecret": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetUserWorkloadsSecret": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListUserWorkloadsSecrets": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateUserWorkloadsSecret": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteUserWorkloadsSecret": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateUserWorkloadsConfigMap": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetUserWorkloadsConfigMap": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListUserWorkloadsConfigMaps": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateUserWorkloadsConfigMap": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteUserWorkloadsConfigMap": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SaveSnapshot": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "LoadSnapshot": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DatabaseFailover": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchDatabaseProperties": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_proto_list.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_proto_list.json new file mode 100644 index 00000000000..674df9932cf --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/orchestration/airflow/service/v1/environments.proto", + "../../protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto", + "../../protos/google/cloud/orchestration/airflow/service/v1/operations.proto" +] diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/gapic_metadata.json new file mode 100644 index 00000000000..fd6919aa2c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/gapic_metadata.json @@ -0,0 +1,307 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.orchestration.airflow.service.v1", + "libraryPackage": "@google-cloud/orchestration-airflow", + "services": { + "Environments": { + "clients": { + "grpc": { + "libraryClient": "EnvironmentsClient", + "rpcs": { + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "ExecuteAirflowCommand": { + "methods": [ + "executeAirflowCommand" + ] + }, + "StopAirflowCommand": { + "methods": [ + "stopAirflowCommand" + ] + }, + "PollAirflowCommand": { + "methods": [ + "pollAirflowCommand" + ] + }, + "CreateUserWorkloadsSecret": { + "methods": [ + "createUserWorkloadsSecret" + ] + }, + "GetUserWorkloadsSecret": { + "methods": [ + "getUserWorkloadsSecret" + ] + }, + "UpdateUserWorkloadsSecret": { + "methods": [ + "updateUserWorkloadsSecret" + ] + }, + "DeleteUserWorkloadsSecret": { + "methods": [ + "deleteUserWorkloadsSecret" + ] + }, + "CreateUserWorkloadsConfigMap": { + "methods": [ + "createUserWorkloadsConfigMap" + ] + }, + "GetUserWorkloadsConfigMap": { + "methods": [ + "getUserWorkloadsConfigMap" + ] + }, + "UpdateUserWorkloadsConfigMap": { + "methods": [ + "updateUserWorkloadsConfigMap" + ] + }, + "DeleteUserWorkloadsConfigMap": { + "methods": [ + "deleteUserWorkloadsConfigMap" + ] + }, + "FetchDatabaseProperties": { + "methods": [ + "fetchDatabaseProperties" + ] + }, + "CreateEnvironment": { + "methods": [ + "createEnvironment" + ] + }, + "UpdateEnvironment": { + "methods": [ + "updateEnvironment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "deleteEnvironment" + ] + }, + "CheckUpgrade": { + "methods": [ + "checkUpgrade" + ] + }, + "SaveSnapshot": { + "methods": [ + "saveSnapshot" + ] + }, + "LoadSnapshot": { + "methods": [ + "loadSnapshot" + ] + }, + "DatabaseFailover": { + "methods": [ + "databaseFailover" + ] + }, + "ListEnvironments": { + "methods": [ + "listEnvironments", + "listEnvironmentsStream", + "listEnvironmentsAsync" + ] + }, + "ListWorkloads": { + "methods": [ + "listWorkloads", + "listWorkloadsStream", + "listWorkloadsAsync" + ] + }, + "ListUserWorkloadsSecrets": { + "methods": [ + "listUserWorkloadsSecrets", + "listUserWorkloadsSecretsStream", + "listUserWorkloadsSecretsAsync" + ] + }, + "ListUserWorkloadsConfigMaps": { + "methods": [ + "listUserWorkloadsConfigMaps", + "listUserWorkloadsConfigMapsStream", + "listUserWorkloadsConfigMapsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "EnvironmentsClient", + "rpcs": { + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "ExecuteAirflowCommand": { + "methods": [ + "executeAirflowCommand" + ] + }, + "StopAirflowCommand": { + "methods": [ + "stopAirflowCommand" + ] + }, + "PollAirflowCommand": { + "methods": [ + "pollAirflowCommand" + ] + }, + "CreateUserWorkloadsSecret": { + "methods": [ + "createUserWorkloadsSecret" + ] + }, + "GetUserWorkloadsSecret": { + "methods": [ + "getUserWorkloadsSecret" + ] + }, + "UpdateUserWorkloadsSecret": { + "methods": [ + "updateUserWorkloadsSecret" + ] + }, + "DeleteUserWorkloadsSecret": { + "methods": [ + "deleteUserWorkloadsSecret" + ] + }, + "CreateUserWorkloadsConfigMap": { + "methods": [ + "createUserWorkloadsConfigMap" + ] + }, + "GetUserWorkloadsConfigMap": { + "methods": [ + "getUserWorkloadsConfigMap" + ] + }, + "UpdateUserWorkloadsConfigMap": { + "methods": [ + "updateUserWorkloadsConfigMap" + ] + }, + "DeleteUserWorkloadsConfigMap": { + "methods": [ + "deleteUserWorkloadsConfigMap" + ] + }, + "FetchDatabaseProperties": { + "methods": [ + "fetchDatabaseProperties" + ] + }, + "CreateEnvironment": { + "methods": [ + "createEnvironment" + ] + }, + "UpdateEnvironment": { + "methods": [ + "updateEnvironment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "deleteEnvironment" + ] + }, + "CheckUpgrade": { + "methods": [ + "checkUpgrade" + ] + }, + "SaveSnapshot": { + "methods": [ + "saveSnapshot" + ] + }, + "LoadSnapshot": { + "methods": [ + "loadSnapshot" + ] + }, + "DatabaseFailover": { + "methods": [ + "databaseFailover" + ] + }, + "ListEnvironments": { + "methods": [ + "listEnvironments", + "listEnvironmentsStream", + "listEnvironmentsAsync" + ] + }, + "ListWorkloads": { + "methods": [ + "listWorkloads", + "listWorkloadsStream", + "listWorkloadsAsync" + ] + }, + "ListUserWorkloadsSecrets": { + "methods": [ + "listUserWorkloadsSecrets", + "listUserWorkloadsSecretsStream", + "listUserWorkloadsSecretsAsync" + ] + }, + "ListUserWorkloadsConfigMaps": { + "methods": [ + "listUserWorkloadsConfigMaps", + "listUserWorkloadsConfigMapsStream", + "listUserWorkloadsConfigMapsAsync" + ] + } + } + } + } + }, + "ImageVersions": { + "clients": { + "grpc": { + "libraryClient": "ImageVersionsClient", + "rpcs": { + "ListImageVersions": { + "methods": [ + "listImageVersions", + "listImageVersionsStream", + "listImageVersionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ImageVersionsClient", + "rpcs": { + "ListImageVersions": { + "methods": [ + "listImageVersions", + "listImageVersionsStream", + "listImageVersionsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_client.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_client.ts new file mode 100644 index 00000000000..c63f5309111 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_client.ts @@ -0,0 +1,714 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); + +/** + * Client JSON configuration object, loaded from + * `src/v1/image_versions_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './image_versions_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Readonly service to query available ImageVersions. + * @class + * @memberof v1 + */ +export class ImageVersionsClient { + 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; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + imageVersionsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ImageVersionsClient. + * + * @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://developers.google.com/identity/protocols/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 ImageVersionsClient({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 ImageVersionsClient; + 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 = 'composer.' + 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; + } + + // 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 = { + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/environments/{environment}' + ), + userWorkloadsConfigMapPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}' + ), + userWorkloadsSecretPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}' + ), + }; + + // 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 = { + listImageVersions: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'imageVersions') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.orchestration.airflow.service.v1.ImageVersions', 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.imageVersionsStub) { + return this.imageVersionsStub; + } + + // Put together the "service stub" for + // google.cloud.orchestration.airflow.service.v1.ImageVersions. + this.imageVersionsStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.orchestration.airflow.service.v1.ImageVersions') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.orchestration.airflow.service.v1.ImageVersions, + 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 imageVersionsStubMethods = + ['listImageVersions']; + for (const methodName of imageVersionsStubMethods) { + const callPromise = this.imageVersionsStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.imageVersionsStub; + } + + /** + * 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 'composer.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 'composer.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 -- + // ------------------- + + /** + * List ImageVersions for provided location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of image_versions to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {boolean} request.includePastReleases + * Whether or not image versions from old releases should be included. + * @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.orchestration.airflow.service.v1.ImageVersion|ImageVersion}. + * 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 `listImageVersionsAsync()` + * 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. + */ + listImageVersions( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IImageVersion[], + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse + ]>; + listImageVersions( + request: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.IImageVersion>): void; + listImageVersions( + request: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.IImageVersion>): void; + listImageVersions( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.IImageVersion>, + callback?: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1.IImageVersion>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1.IImageVersion[], + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse + ]>|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(); + return this.innerApiCalls.listImageVersions(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of image_versions to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {boolean} request.includePastReleases + * Whether or not image versions from old releases should be included. + * @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.orchestration.airflow.service.v1.ImageVersion|ImageVersion} 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 `listImageVersionsAsync()` + * 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. + */ + listImageVersionsStream( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + 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['listImageVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listImageVersions.createStream( + this.innerApiCalls.listImageVersions as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listImageVersions`, 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 + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of image_versions to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {boolean} request.includePastReleases + * Whether or not image versions from old releases should be included. + * @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.orchestration.airflow.service.v1.ImageVersion|ImageVersion}. 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/image_versions.list_image_versions.js + * region_tag:composer_v1_generated_ImageVersions_ListImageVersions_async + */ + listImageVersionsAsync( + request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, + 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['listImageVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listImageVersions.asyncIterate( + this.innerApiCalls['listImageVersions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project:string,location:string,environment:string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).location; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + } + + /** + * Return a fully-qualified userWorkloadsConfigMap resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} environment + * @param {string} user_workloads_config_map + * @returns {string} Resource name string. + */ + userWorkloadsConfigMapPath(project:string,location:string,environment:string,userWorkloadsConfigMap:string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.render({ + project: project, + location: location, + environment: environment, + user_workloads_config_map: userWorkloadsConfigMap, + }); + } + + /** + * Parse the project from UserWorkloadsConfigMap resource. + * + * @param {string} userWorkloadsConfigMapName + * A fully-qualified path representing UserWorkloadsConfigMap resource. + * @returns {string} A string representing the project. + */ + matchProjectFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).project; + } + + /** + * Parse the location from UserWorkloadsConfigMap resource. + * + * @param {string} userWorkloadsConfigMapName + * A fully-qualified path representing UserWorkloadsConfigMap resource. + * @returns {string} A string representing the location. + */ + matchLocationFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).location; + } + + /** + * Parse the environment from UserWorkloadsConfigMap resource. + * + * @param {string} userWorkloadsConfigMapName + * A fully-qualified path representing UserWorkloadsConfigMap resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).environment; + } + + /** + * Parse the user_workloads_config_map from UserWorkloadsConfigMap resource. + * + * @param {string} userWorkloadsConfigMapName + * A fully-qualified path representing UserWorkloadsConfigMap resource. + * @returns {string} A string representing the user_workloads_config_map. + */ + matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).user_workloads_config_map; + } + + /** + * Return a fully-qualified userWorkloadsSecret resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} environment + * @param {string} user_workloads_secret + * @returns {string} Resource name string. + */ + userWorkloadsSecretPath(project:string,location:string,environment:string,userWorkloadsSecret:string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.render({ + project: project, + location: location, + environment: environment, + user_workloads_secret: userWorkloadsSecret, + }); + } + + /** + * Parse the project from UserWorkloadsSecret resource. + * + * @param {string} userWorkloadsSecretName + * A fully-qualified path representing UserWorkloadsSecret resource. + * @returns {string} A string representing the project. + */ + matchProjectFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).project; + } + + /** + * Parse the location from UserWorkloadsSecret resource. + * + * @param {string} userWorkloadsSecretName + * A fully-qualified path representing UserWorkloadsSecret resource. + * @returns {string} A string representing the location. + */ + matchLocationFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).location; + } + + /** + * Parse the environment from UserWorkloadsSecret resource. + * + * @param {string} userWorkloadsSecretName + * A fully-qualified path representing UserWorkloadsSecret resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).environment; + } + + /** + * Parse the user_workloads_secret from UserWorkloadsSecret resource. + * + * @param {string} userWorkloadsSecretName + * A fully-qualified path representing UserWorkloadsSecret resource. + * @returns {string} A string representing the user_workloads_secret. + */ + matchUserWorkloadsSecretFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).user_workloads_secret; + } + + /** + * 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.imageVersionsStub && !this._terminated) { + return this.imageVersionsStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_client_config.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_client_config.json new file mode 100644 index 00000000000..6ae2b5fc9c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_client_config.json @@ -0,0 +1,30 @@ +{ + "interfaces": { + "google.cloud.orchestration.airflow.service.v1.ImageVersions": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "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 + } + }, + "methods": { + "ListImageVersions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_proto_list.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_proto_list.json new file mode 100644 index 00000000000..674df9932cf --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/orchestration/airflow/service/v1/environments.proto", + "../../protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto", + "../../protos/google/cloud/orchestration/airflow/service/v1/operations.proto" +] diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/index.ts new file mode 100644 index 00000000000..38cec48d623 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/index.ts @@ -0,0 +1,20 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 {EnvironmentsClient} from './environments_client'; +export {ImageVersionsClient} from './image_versions_client'; diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..2ef4b0dcd16 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/fixtures/sample/src/index.js @@ -0,0 +1,28 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 service = require('@google-cloud/orchestration-airflow'); + +function main() { + const environmentsClient = new service.EnvironmentsClient(); + const imageVersionsClient = new service.ImageVersionsClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..dd47e569943 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,38 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 {EnvironmentsClient, ImageVersionsClient} from '@google-cloud/orchestration-airflow'; + +// check that the client class type name can be used +function doStuffWithEnvironmentsClient(client: EnvironmentsClient) { + client.close(); +} +function doStuffWithImageVersionsClient(client: ImageVersionsClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const environmentsClient = new EnvironmentsClient(); + doStuffWithEnvironmentsClient(environmentsClient); + // check that the client instance can be created + const imageVersionsClient = new ImageVersionsClient(); + doStuffWithImageVersionsClient(imageVersionsClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/install.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/install.ts new file mode 100644 index 00000000000..fd5bfdc71d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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-orchestration-airflow-service/v1/test/gapic_environments_v1.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/test/gapic_environments_v1.ts new file mode 100644 index 00000000000..5b3ae585219 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/test/gapic_environments_v1.ts @@ -0,0 +1,4159 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 environmentsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} 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.EnvironmentsClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new environmentsModule.v1.EnvironmentsClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'composer.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new environmentsModule.v1.EnvironmentsClient(); + 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 = environmentsModule.v1.EnvironmentsClient.servicePath; + assert.strictEqual(servicePath, 'composer.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = environmentsModule.v1.EnvironmentsClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'composer.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new environmentsModule.v1.EnvironmentsClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'composer.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new environmentsModule.v1.EnvironmentsClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'composer.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 environmentsModule.v1.EnvironmentsClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'composer.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 environmentsModule.v1.EnvironmentsClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'composer.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 environmentsModule.v1.EnvironmentsClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = environmentsModule.v1.EnvironmentsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new environmentsModule.v1.EnvironmentsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.environmentsStub, undefined); + await client.initialize(); + assert(client.environmentsStub); + }); + + it('has close method for the initialized client', done => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.environmentsStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.environmentsStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new environmentsModule.v1.EnvironmentsClient({ + 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 environmentsModule.v1.EnvironmentsClient({ + 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('getEnvironment', () => { + it('invokes getEnvironment without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.Environment() + ); + client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); + const [response] = await client.getEnvironment(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEnvironment without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.Environment() + ); + client.innerApiCalls.getEnvironment = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEnvironment( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IEnvironment|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEnvironment with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getEnvironment = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getEnvironment(request), expectedError); + const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEnvironment with closed client', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getEnvironment(request), expectedError); + }); + }); + + describe('executeAirflowCommand', () => { + it('invokes executeAirflowCommand without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse() + ); + client.innerApiCalls.executeAirflowCommand = stubSimpleCall(expectedResponse); + const [response] = await client.executeAirflowCommand(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeAirflowCommand without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse() + ); + client.innerApiCalls.executeAirflowCommand = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.executeAirflowCommand( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeAirflowCommand with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.executeAirflowCommand = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.executeAirflowCommand(request), expectedError); + const actualRequest = (client.innerApiCalls.executeAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeAirflowCommand with closed client', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.executeAirflowCommand(request), expectedError); + }); + }); + + describe('stopAirflowCommand', () => { + it('invokes stopAirflowCommand without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse() + ); + client.innerApiCalls.stopAirflowCommand = stubSimpleCall(expectedResponse); + const [response] = await client.stopAirflowCommand(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.stopAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.stopAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes stopAirflowCommand without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse() + ); + client.innerApiCalls.stopAirflowCommand = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.stopAirflowCommand( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.stopAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.stopAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes stopAirflowCommand with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.stopAirflowCommand = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.stopAirflowCommand(request), expectedError); + const actualRequest = (client.innerApiCalls.stopAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.stopAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes stopAirflowCommand with closed client', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.stopAirflowCommand(request), expectedError); + }); + }); + + describe('pollAirflowCommand', () => { + it('invokes pollAirflowCommand without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse() + ); + client.innerApiCalls.pollAirflowCommand = stubSimpleCall(expectedResponse); + const [response] = await client.pollAirflowCommand(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.pollAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.pollAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pollAirflowCommand without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse() + ); + client.innerApiCalls.pollAirflowCommand = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.pollAirflowCommand( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.pollAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.pollAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pollAirflowCommand with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.pollAirflowCommand = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.pollAirflowCommand(request), expectedError); + const actualRequest = (client.innerApiCalls.pollAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.pollAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pollAirflowCommand with closed client', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.pollAirflowCommand(request), expectedError); + }); + }); + + describe('createUserWorkloadsSecret', () => { + it('invokes createUserWorkloadsSecret without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret() + ); + client.innerApiCalls.createUserWorkloadsSecret = stubSimpleCall(expectedResponse); + const [response] = await client.createUserWorkloadsSecret(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserWorkloadsSecret without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret() + ); + client.innerApiCalls.createUserWorkloadsSecret = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createUserWorkloadsSecret( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserWorkloadsSecret with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createUserWorkloadsSecret = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createUserWorkloadsSecret(request), expectedError); + const actualRequest = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserWorkloadsSecret with closed client', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createUserWorkloadsSecret(request), expectedError); + }); + }); + + describe('getUserWorkloadsSecret', () => { + it('invokes getUserWorkloadsSecret without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret() + ); + client.innerApiCalls.getUserWorkloadsSecret = stubSimpleCall(expectedResponse); + const [response] = await client.getUserWorkloadsSecret(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserWorkloadsSecret without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret() + ); + client.innerApiCalls.getUserWorkloadsSecret = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getUserWorkloadsSecret( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserWorkloadsSecret with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getUserWorkloadsSecret = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getUserWorkloadsSecret(request), expectedError); + const actualRequest = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserWorkloadsSecret with closed client', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getUserWorkloadsSecret(request), expectedError); + }); + }); + + describe('updateUserWorkloadsSecret', () => { + it('invokes updateUserWorkloadsSecret without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest() + ); + request.userWorkloadsSecret ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest', ['userWorkloadsSecret', 'name']); + request.userWorkloadsSecret.name = defaultValue1; + const expectedHeaderRequestParams = `user_workloads_secret.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret() + ); + client.innerApiCalls.updateUserWorkloadsSecret = stubSimpleCall(expectedResponse); + const [response] = await client.updateUserWorkloadsSecret(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserWorkloadsSecret without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest() + ); + request.userWorkloadsSecret ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest', ['userWorkloadsSecret', 'name']); + request.userWorkloadsSecret.name = defaultValue1; + const expectedHeaderRequestParams = `user_workloads_secret.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret() + ); + client.innerApiCalls.updateUserWorkloadsSecret = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateUserWorkloadsSecret( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserWorkloadsSecret with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest() + ); + request.userWorkloadsSecret ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest', ['userWorkloadsSecret', 'name']); + request.userWorkloadsSecret.name = defaultValue1; + const expectedHeaderRequestParams = `user_workloads_secret.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateUserWorkloadsSecret = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateUserWorkloadsSecret(request), expectedError); + const actualRequest = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserWorkloadsSecret with closed client', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest() + ); + request.userWorkloadsSecret ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest', ['userWorkloadsSecret', 'name']); + request.userWorkloadsSecret.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateUserWorkloadsSecret(request), expectedError); + }); + }); + + describe('deleteUserWorkloadsSecret', () => { + it('invokes deleteUserWorkloadsSecret without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteUserWorkloadsSecret = stubSimpleCall(expectedResponse); + const [response] = await client.deleteUserWorkloadsSecret(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserWorkloadsSecret without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteUserWorkloadsSecret = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteUserWorkloadsSecret( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserWorkloadsSecret with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteUserWorkloadsSecret = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteUserWorkloadsSecret(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserWorkloadsSecret with closed client', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteUserWorkloadsSecret(request), expectedError); + }); + }); + + describe('createUserWorkloadsConfigMap', () => { + it('invokes createUserWorkloadsConfigMap without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap() + ); + client.innerApiCalls.createUserWorkloadsConfigMap = stubSimpleCall(expectedResponse); + const [response] = await client.createUserWorkloadsConfigMap(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserWorkloadsConfigMap without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap() + ); + client.innerApiCalls.createUserWorkloadsConfigMap = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createUserWorkloadsConfigMap( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserWorkloadsConfigMap with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createUserWorkloadsConfigMap = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createUserWorkloadsConfigMap(request), expectedError); + const actualRequest = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserWorkloadsConfigMap with closed client', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createUserWorkloadsConfigMap(request), expectedError); + }); + }); + + describe('getUserWorkloadsConfigMap', () => { + it('invokes getUserWorkloadsConfigMap without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap() + ); + client.innerApiCalls.getUserWorkloadsConfigMap = stubSimpleCall(expectedResponse); + const [response] = await client.getUserWorkloadsConfigMap(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserWorkloadsConfigMap without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap() + ); + client.innerApiCalls.getUserWorkloadsConfigMap = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getUserWorkloadsConfigMap( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserWorkloadsConfigMap with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getUserWorkloadsConfigMap = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getUserWorkloadsConfigMap(request), expectedError); + const actualRequest = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserWorkloadsConfigMap with closed client', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getUserWorkloadsConfigMap(request), expectedError); + }); + }); + + describe('updateUserWorkloadsConfigMap', () => { + it('invokes updateUserWorkloadsConfigMap without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest() + ); + request.userWorkloadsConfigMap ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest', ['userWorkloadsConfigMap', 'name']); + request.userWorkloadsConfigMap.name = defaultValue1; + const expectedHeaderRequestParams = `user_workloads_config_map.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap() + ); + client.innerApiCalls.updateUserWorkloadsConfigMap = stubSimpleCall(expectedResponse); + const [response] = await client.updateUserWorkloadsConfigMap(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserWorkloadsConfigMap without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest() + ); + request.userWorkloadsConfigMap ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest', ['userWorkloadsConfigMap', 'name']); + request.userWorkloadsConfigMap.name = defaultValue1; + const expectedHeaderRequestParams = `user_workloads_config_map.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap() + ); + client.innerApiCalls.updateUserWorkloadsConfigMap = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateUserWorkloadsConfigMap( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserWorkloadsConfigMap with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest() + ); + request.userWorkloadsConfigMap ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest', ['userWorkloadsConfigMap', 'name']); + request.userWorkloadsConfigMap.name = defaultValue1; + const expectedHeaderRequestParams = `user_workloads_config_map.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateUserWorkloadsConfigMap = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateUserWorkloadsConfigMap(request), expectedError); + const actualRequest = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserWorkloadsConfigMap with closed client', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest() + ); + request.userWorkloadsConfigMap ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest', ['userWorkloadsConfigMap', 'name']); + request.userWorkloadsConfigMap.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateUserWorkloadsConfigMap(request), expectedError); + }); + }); + + describe('deleteUserWorkloadsConfigMap', () => { + it('invokes deleteUserWorkloadsConfigMap without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteUserWorkloadsConfigMap = stubSimpleCall(expectedResponse); + const [response] = await client.deleteUserWorkloadsConfigMap(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserWorkloadsConfigMap without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteUserWorkloadsConfigMap = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteUserWorkloadsConfigMap( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserWorkloadsConfigMap with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteUserWorkloadsConfigMap = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteUserWorkloadsConfigMap(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserWorkloadsConfigMap with closed client', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteUserWorkloadsConfigMap(request), expectedError); + }); + }); + + describe('fetchDatabaseProperties', () => { + it('invokes fetchDatabaseProperties without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse() + ); + client.innerApiCalls.fetchDatabaseProperties = stubSimpleCall(expectedResponse); + const [response] = await client.fetchDatabaseProperties(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchDatabaseProperties without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse() + ); + client.innerApiCalls.fetchDatabaseProperties = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchDatabaseProperties( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchDatabaseProperties with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchDatabaseProperties = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.fetchDatabaseProperties(request), expectedError); + const actualRequest = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchDatabaseProperties with closed client', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest', ['environment']); + request.environment = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchDatabaseProperties(request), expectedError); + }); + }); + + describe('createEnvironment', () => { + it('invokes createEnvironment without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEnvironment = stubLongRunningCall(expectedResponse); + const [operation] = await client.createEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEnvironment without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEnvironment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createEnvironment( + 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.createEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEnvironment with call error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createEnvironment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createEnvironment(request), expectedError); + const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEnvironment with LRO error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createEnvironment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateEnvironmentProgress without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkCreateEnvironmentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateEnvironmentProgress with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateEnvironmentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateEnvironment', () => { + it('invokes updateEnvironment without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEnvironment = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEnvironment without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEnvironment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateEnvironment( + 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.updateEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEnvironment with call error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEnvironment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateEnvironment(request), expectedError); + const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEnvironment with LRO error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEnvironment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateEnvironmentProgress without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkUpdateEnvironmentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateEnvironmentProgress with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateEnvironmentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteEnvironment', () => { + it('invokes deleteEnvironment without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEnvironment = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEnvironment without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEnvironment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteEnvironment( + 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.deleteEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEnvironment with call error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEnvironment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteEnvironment(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEnvironment with LRO error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEnvironment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteEnvironmentProgress without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkDeleteEnvironmentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteEnvironmentProgress with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteEnvironmentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('checkUpgrade', () => { + it('invokes checkUpgrade without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.checkUpgrade = stubLongRunningCall(expectedResponse); + const [operation] = await client.checkUpgrade(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpgrade without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.checkUpgrade = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.checkUpgrade( + 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.checkUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpgrade with call error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.checkUpgrade = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.checkUpgrade(request), expectedError); + const actualRequest = (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpgrade with LRO error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.checkUpgrade = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.checkUpgrade(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCheckUpgradeProgress without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkCheckUpgradeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCheckUpgradeProgress with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCheckUpgradeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('saveSnapshot', () => { + it('invokes saveSnapshot without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.saveSnapshot = stubLongRunningCall(expectedResponse); + const [operation] = await client.saveSnapshot(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.saveSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.saveSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes saveSnapshot without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.saveSnapshot = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.saveSnapshot( + 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.saveSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.saveSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes saveSnapshot with call error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.saveSnapshot = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.saveSnapshot(request), expectedError); + const actualRequest = (client.innerApiCalls.saveSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.saveSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes saveSnapshot with LRO error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.saveSnapshot = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.saveSnapshot(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.saveSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.saveSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkSaveSnapshotProgress without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkSaveSnapshotProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkSaveSnapshotProgress with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkSaveSnapshotProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('loadSnapshot', () => { + it('invokes loadSnapshot without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.loadSnapshot = stubLongRunningCall(expectedResponse); + const [operation] = await client.loadSnapshot(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.loadSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.loadSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes loadSnapshot without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.loadSnapshot = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.loadSnapshot( + 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.loadSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.loadSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes loadSnapshot with call error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.loadSnapshot = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.loadSnapshot(request), expectedError); + const actualRequest = (client.innerApiCalls.loadSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.loadSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes loadSnapshot with LRO error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.loadSnapshot = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.loadSnapshot(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.loadSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.loadSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkLoadSnapshotProgress without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkLoadSnapshotProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkLoadSnapshotProgress with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkLoadSnapshotProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('databaseFailover', () => { + it('invokes databaseFailover without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.databaseFailover = stubLongRunningCall(expectedResponse); + const [operation] = await client.databaseFailover(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.databaseFailover as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.databaseFailover as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes databaseFailover without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.databaseFailover = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.databaseFailover( + 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.databaseFailover as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.databaseFailover as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes databaseFailover with call error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.databaseFailover = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.databaseFailover(request), expectedError); + const actualRequest = (client.innerApiCalls.databaseFailover as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.databaseFailover as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes databaseFailover with LRO error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.databaseFailover = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.databaseFailover(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.databaseFailover as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.databaseFailover as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDatabaseFailoverProgress without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkDatabaseFailoverProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDatabaseFailoverProgress with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDatabaseFailoverProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listEnvironments', () => { + it('invokes listEnvironments without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), + ]; + client.innerApiCalls.listEnvironments = stubSimpleCall(expectedResponse); + const [response] = await client.listEnvironments(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEnvironments without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), + ]; + client.innerApiCalls.listEnvironments = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listEnvironments( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IEnvironment[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEnvironments with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listEnvironments = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listEnvironments(request), expectedError); + const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEnvironmentsStream without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), + ]; + client.descriptors.page.listEnvironments.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listEnvironmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.Environment[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.Environment) => { + 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.listEnvironments.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listEnvironments, request)); + assert( + (client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listEnvironmentsStream with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listEnvironments.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listEnvironmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.Environment[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.Environment) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listEnvironments, request)); + assert( + (client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listEnvironments without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), + ]; + client.descriptors.page.listEnvironments.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.orchestration.airflow.service.v1.IEnvironment[] = []; + const iterable = client.listEnvironmentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listEnvironments with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listEnvironments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listEnvironmentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.IEnvironment[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listWorkloads', () => { + it('invokes listWorkloads without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), + ]; + client.innerApiCalls.listWorkloads = stubSimpleCall(expectedResponse); + const [response] = await client.listWorkloads(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listWorkloads as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listWorkloads as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkloads without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), + ]; + client.innerApiCalls.listWorkloads = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listWorkloads( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listWorkloads as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listWorkloads as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkloads with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listWorkloads = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listWorkloads(request), expectedError); + const actualRequest = (client.innerApiCalls.listWorkloads as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listWorkloads as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkloadsStream without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), + ]; + client.descriptors.page.listWorkloads.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listWorkloadsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload) => { + 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.listWorkloads.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listWorkloads, request)); + assert( + (client.descriptors.page.listWorkloads.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listWorkloadsStream with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkloads.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listWorkloadsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listWorkloads.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listWorkloads, request)); + assert( + (client.descriptors.page.listWorkloads.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listWorkloads without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), + ]; + client.descriptors.page.listWorkloads.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload[] = []; + const iterable = client.listWorkloadsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listWorkloads.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listWorkloads.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listWorkloads with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkloads.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listWorkloadsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listWorkloads.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listWorkloads.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listUserWorkloadsSecrets', () => { + it('invokes listUserWorkloadsSecrets without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), + ]; + client.innerApiCalls.listUserWorkloadsSecrets = stubSimpleCall(expectedResponse); + const [response] = await client.listUserWorkloadsSecrets(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserWorkloadsSecrets without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), + ]; + client.innerApiCalls.listUserWorkloadsSecrets = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listUserWorkloadsSecrets( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserWorkloadsSecrets with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listUserWorkloadsSecrets = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listUserWorkloadsSecrets(request), expectedError); + const actualRequest = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserWorkloadsSecretsStream without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), + ]; + client.descriptors.page.listUserWorkloadsSecrets.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listUserWorkloadsSecretsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret) => { + 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.listUserWorkloadsSecrets.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUserWorkloadsSecrets, request)); + assert( + (client.descriptors.page.listUserWorkloadsSecrets.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listUserWorkloadsSecretsStream with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserWorkloadsSecrets.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listUserWorkloadsSecretsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listUserWorkloadsSecrets.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUserWorkloadsSecrets, request)); + assert( + (client.descriptors.page.listUserWorkloadsSecrets.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserWorkloadsSecrets without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), + ]; + client.descriptors.page.listUserWorkloadsSecrets.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret[] = []; + const iterable = client.listUserWorkloadsSecretsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listUserWorkloadsSecrets.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUserWorkloadsSecrets.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserWorkloadsSecrets with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserWorkloadsSecrets.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listUserWorkloadsSecretsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listUserWorkloadsSecrets.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUserWorkloadsSecrets.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listUserWorkloadsConfigMaps', () => { + it('invokes listUserWorkloadsConfigMaps without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), + ]; + client.innerApiCalls.listUserWorkloadsConfigMaps = stubSimpleCall(expectedResponse); + const [response] = await client.listUserWorkloadsConfigMaps(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserWorkloadsConfigMaps without error using callback', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), + ]; + client.innerApiCalls.listUserWorkloadsConfigMaps = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listUserWorkloadsConfigMaps( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserWorkloadsConfigMaps with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listUserWorkloadsConfigMaps = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listUserWorkloadsConfigMaps(request), expectedError); + const actualRequest = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserWorkloadsConfigMapsStream without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), + ]; + client.descriptors.page.listUserWorkloadsConfigMaps.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listUserWorkloadsConfigMapsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap) => { + 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.listUserWorkloadsConfigMaps.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUserWorkloadsConfigMaps, request)); + assert( + (client.descriptors.page.listUserWorkloadsConfigMaps.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listUserWorkloadsConfigMapsStream with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserWorkloadsConfigMaps.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listUserWorkloadsConfigMapsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listUserWorkloadsConfigMaps.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUserWorkloadsConfigMaps, request)); + assert( + (client.descriptors.page.listUserWorkloadsConfigMaps.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserWorkloadsConfigMaps without error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), + ]; + client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap[] = []; + const iterable = client.listUserWorkloadsConfigMapsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserWorkloadsConfigMaps with error', async () => { + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listUserWorkloadsConfigMapsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUserWorkloadsConfigMaps.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 environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 environmentsModule.v1.EnvironmentsClient({ + 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); + } + }); + }); + 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 environmentsModule.v1.EnvironmentsClient({ + 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 environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 environmentsModule.v1.EnvironmentsClient({ + 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); + } + }); + }); + 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 environmentsModule.v1.EnvironmentsClient({ + 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 environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 environmentsModule.v1.EnvironmentsClient({ + 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); + } + }); + }); + 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 environmentsModule.v1.EnvironmentsClient({ + 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 environmentsModule.v1.EnvironmentsClient({ + 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.ListOperationsResponse[] = []; + 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 environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.ListOperationsResponse[] = []; + 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('environment', () => { + const fakePath = "/rendered/path/environment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + environment: "environmentValue", + }; + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath("projectValue", "locationValue", "environmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userWorkloadsConfigMap', () => { + const fakePath = "/rendered/path/userWorkloadsConfigMap"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + environment: "environmentValue", + user_workloads_config_map: "userWorkloadsConfigMapValue", + }; + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.userWorkloadsConfigMapPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userWorkloadsConfigMapPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userWorkloadsConfigMapPath', () => { + const result = client.userWorkloadsConfigMapPath("projectValue", "locationValue", "environmentValue", "userWorkloadsConfigMapValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromUserWorkloadsConfigMapName', () => { + const result = client.matchProjectFromUserWorkloadsConfigMapName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromUserWorkloadsConfigMapName', () => { + const result = client.matchLocationFromUserWorkloadsConfigMapName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromUserWorkloadsConfigMapName', () => { + const result = client.matchEnvironmentFromUserWorkloadsConfigMapName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName', () => { + const result = client.matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(fakePath); + assert.strictEqual(result, "userWorkloadsConfigMapValue"); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userWorkloadsSecret', () => { + const fakePath = "/rendered/path/userWorkloadsSecret"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + environment: "environmentValue", + user_workloads_secret: "userWorkloadsSecretValue", + }; + const client = new environmentsModule.v1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.userWorkloadsSecretPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userWorkloadsSecretPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userWorkloadsSecretPath', () => { + const result = client.userWorkloadsSecretPath("projectValue", "locationValue", "environmentValue", "userWorkloadsSecretValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromUserWorkloadsSecretName', () => { + const result = client.matchProjectFromUserWorkloadsSecretName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromUserWorkloadsSecretName', () => { + const result = client.matchLocationFromUserWorkloadsSecretName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromUserWorkloadsSecretName', () => { + const result = client.matchEnvironmentFromUserWorkloadsSecretName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserWorkloadsSecretFromUserWorkloadsSecretName', () => { + const result = client.matchUserWorkloadsSecretFromUserWorkloadsSecretName(fakePath); + assert.strictEqual(result, "userWorkloadsSecretValue"); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/test/gapic_image_versions_v1.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/test/gapic_image_versions_v1.ts new file mode 100644 index 00000000000..dc1217ab83e --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/test/gapic_image_versions_v1.ts @@ -0,0 +1,663 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 imageversionsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.ImageVersionsClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new imageversionsModule.v1.ImageVersionsClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'composer.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new imageversionsModule.v1.ImageVersionsClient(); + 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 = imageversionsModule.v1.ImageVersionsClient.servicePath; + assert.strictEqual(servicePath, 'composer.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = imageversionsModule.v1.ImageVersionsClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'composer.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new imageversionsModule.v1.ImageVersionsClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'composer.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new imageversionsModule.v1.ImageVersionsClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'composer.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 imageversionsModule.v1.ImageVersionsClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'composer.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 imageversionsModule.v1.ImageVersionsClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'composer.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 imageversionsModule.v1.ImageVersionsClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = imageversionsModule.v1.ImageVersionsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new imageversionsModule.v1.ImageVersionsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageVersionsStub, undefined); + await client.initialize(); + assert(client.imageVersionsStub); + }); + + it('has close method for the initialized client', done => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.imageVersionsStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageVersionsStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new imageversionsModule.v1.ImageVersionsClient({ + 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 imageversionsModule.v1.ImageVersionsClient({ + 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('listImageVersions', () => { + it('invokes listImageVersions without error', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), + ]; + client.innerApiCalls.listImageVersions = stubSimpleCall(expectedResponse); + const [response] = await client.listImageVersions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listImageVersions without error using callback', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), + ]; + client.innerApiCalls.listImageVersions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listImageVersions( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IImageVersion[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listImageVersions with error', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listImageVersions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listImageVersions(request), expectedError); + const actualRequest = (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listImageVersionsStream without error', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), + ]; + client.descriptors.page.listImageVersions.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listImageVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.ImageVersion[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.ImageVersion) => { + 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.listImageVersions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listImageVersions, request)); + assert( + (client.descriptors.page.listImageVersions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listImageVersionsStream with error', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listImageVersions.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listImageVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.ImageVersion[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.ImageVersion) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listImageVersions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listImageVersions, request)); + assert( + (client.descriptors.page.listImageVersions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listImageVersions without error', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), + ]; + client.descriptors.page.listImageVersions.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.orchestration.airflow.service.v1.IImageVersion[] = []; + const iterable = client.listImageVersionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listImageVersions with error', async () => { + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listImageVersions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listImageVersionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.orchestration.airflow.service.v1.IImageVersion[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('environment', () => { + const fakePath = "/rendered/path/environment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + environment: "environmentValue", + }; + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath("projectValue", "locationValue", "environmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userWorkloadsConfigMap', () => { + const fakePath = "/rendered/path/userWorkloadsConfigMap"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + environment: "environmentValue", + user_workloads_config_map: "userWorkloadsConfigMapValue", + }; + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.userWorkloadsConfigMapPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userWorkloadsConfigMapPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userWorkloadsConfigMapPath', () => { + const result = client.userWorkloadsConfigMapPath("projectValue", "locationValue", "environmentValue", "userWorkloadsConfigMapValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromUserWorkloadsConfigMapName', () => { + const result = client.matchProjectFromUserWorkloadsConfigMapName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromUserWorkloadsConfigMapName', () => { + const result = client.matchLocationFromUserWorkloadsConfigMapName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromUserWorkloadsConfigMapName', () => { + const result = client.matchEnvironmentFromUserWorkloadsConfigMapName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName', () => { + const result = client.matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(fakePath); + assert.strictEqual(result, "userWorkloadsConfigMapValue"); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userWorkloadsSecret', () => { + const fakePath = "/rendered/path/userWorkloadsSecret"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + environment: "environmentValue", + user_workloads_secret: "userWorkloadsSecretValue", + }; + const client = new imageversionsModule.v1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.userWorkloadsSecretPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userWorkloadsSecretPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userWorkloadsSecretPath', () => { + const result = client.userWorkloadsSecretPath("projectValue", "locationValue", "environmentValue", "userWorkloadsSecretValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromUserWorkloadsSecretName', () => { + const result = client.matchProjectFromUserWorkloadsSecretName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromUserWorkloadsSecretName', () => { + const result = client.matchLocationFromUserWorkloadsSecretName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromUserWorkloadsSecretName', () => { + const result = client.matchEnvironmentFromUserWorkloadsSecretName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserWorkloadsSecretFromUserWorkloadsSecretName', () => { + const result = client.matchUserWorkloadsSecretFromUserWorkloadsSecretName(fakePath); + assert.strictEqual(result, "userWorkloadsSecretValue"); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/tsconfig.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/webpack.config.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/webpack.config.js new file mode 100644 index 00000000000..9b7becac60a --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/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: 'Environments', + filename: './environments.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/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.eslintignore b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.eslintignore new file mode 100644 index 00000000000..cfc348ec4d1 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.eslintrc.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.gitignore b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.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-orchestration-airflow-service/v1beta1/.jsdoc.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.jsdoc.js new file mode 100644 index 00000000000..86e4179a983 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 2024 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/orchestration-airflow', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.mocharc.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.mocharc.js new file mode 100644 index 00000000000..13b67c34edc --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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-orchestration-airflow-service/v1beta1/.prettierrc.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.prettierrc.js new file mode 100644 index 00000000000..9a8fd690982 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.prettierrc.js @@ -0,0 +1,22 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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-orchestration-airflow-service/v1beta1/README.md b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/README.md new file mode 100644 index 00000000000..536af38a9bb --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/README.md @@ -0,0 +1 @@ +Service: Nodejs Client diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/package.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/package.json new file mode 100644 index 00000000000..5d2f497a88a --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/package.json @@ -0,0 +1,59 @@ +{ + "name": "@google-cloud/orchestration-airflow", + "version": "0.1.0", + "description": "Service client for Node.js", + "repository": "googleapis/nodejs-service", + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google service", + "service", + "environments", + "image versions" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "fix": "gts fix", + "lint": "gts check", + "prepare": "npm run compile-protos && npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test" + }, + "dependencies": { + "google-gax": "^4.3.4" + }, + "devDependencies": { + "@types/mocha": "^10.0.6", + "@types/node": "^20.12.12", + "@types/sinon": "^10.0.20", + "c8": "^9.1.0", + "gapic-tools": "^0.4.2", + "gts": "5.3.0", + "jsdoc": "^4.0.3", + "jsdoc-fresh": "^3.0.0", + "jsdoc-region-tag": "^3.0.0", + "mocha": "^10.4.0", + "pack-n-play": "^2.0.3", + "sinon": "^15.2.0", + "typescript": "5.1.6" + }, + "engines": { + "node": ">=v14" + } +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto new file mode 100644 index 00000000000..cd66e2d6e18 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto @@ -0,0 +1,2145 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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.orchestration.airflow.service.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/orchestration/airflow/service/v1beta1/operations.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/orchestration/airflow/service/apiv1beta1/servicepb;servicepb"; +option java_multiple_files = true; +option java_package = "com.google.cloud.orchestration.airflow.service.v1beta1"; + +// Managed Apache Airflow Environments. +service Environments { + option (google.api.default_host) = "composer.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Create a new environment. + rpc CreateEnvironment(CreateEnvironmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*}/environments" + body: "environment" + }; + option (google.api.method_signature) = "parent,environment"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Get an existing environment. + rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + } + + // List environments. + rpc ListEnvironments(ListEnvironmentsRequest) + returns (ListEnvironmentsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/environments" + }; + option (google.api.method_signature) = "parent"; + } + + // Update an environment. + rpc UpdateEnvironment(UpdateEnvironmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + patch: "/v1beta1/{name=projects/*/locations/*/environments/*}" + body: "environment" + }; + option (google.api.method_signature) = "name,environment,update_mask"; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Delete an environment. + rpc DeleteEnvironment(DeleteEnvironmentRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/environments/*}" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Restart Airflow web server. + rpc RestartWebServer(RestartWebServerRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{name=projects/*/locations/*/environments/*}:restartWebServer" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Environment" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Check if an upgrade operation on the environment will succeed. + // + // In case of problems detailed info can be found in the returned Operation. + rpc CheckUpgrade(CheckUpgradeRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:checkUpgrade" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Executes Airflow CLI command. + rpc ExecuteAirflowCommand(ExecuteAirflowCommandRequest) + returns (ExecuteAirflowCommandResponse) { + option (google.api.http) = { + post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand" + body: "*" + }; + } + + // Stops Airflow CLI command execution. + rpc StopAirflowCommand(StopAirflowCommandRequest) + returns (StopAirflowCommandResponse) { + option (google.api.http) = { + post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand" + body: "*" + }; + } + + // Polls Airflow CLI command execution and fetches logs. + rpc PollAirflowCommand(PollAirflowCommandRequest) + returns (PollAirflowCommandResponse) { + option (google.api.http) = { + post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand" + body: "*" + }; + } + + // Lists workloads in a Cloud Composer environment. Workload is a unit that + // runs a single Composer component. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc ListWorkloads(ListWorkloadsRequest) returns (ListWorkloadsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/environments/*}/workloads" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates a user workloads Secret. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc CreateUserWorkloadsSecret(CreateUserWorkloadsSecretRequest) + returns (UserWorkloadsSecret) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets" + body: "user_workloads_secret" + }; + option (google.api.method_signature) = "parent,user_workloads_secret"; + } + + // Gets an existing user workloads Secret. + // Values of the "data" field in the response are cleared. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc GetUserWorkloadsSecret(GetUserWorkloadsSecretRequest) + returns (UserWorkloadsSecret) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists user workloads Secrets. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc ListUserWorkloadsSecrets(ListUserWorkloadsSecretsRequest) + returns (ListUserWorkloadsSecretsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates a user workloads Secret. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc UpdateUserWorkloadsSecret(UpdateUserWorkloadsSecretRequest) + returns (UserWorkloadsSecret) { + option (google.api.http) = { + put: "/v1beta1/{user_workloads_secret.name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" + body: "user_workloads_secret" + }; + option (google.api.method_signature) = "user_workloads_secret"; + } + + // Deletes a user workloads Secret. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc DeleteUserWorkloadsSecret(DeleteUserWorkloadsSecretRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a user workloads ConfigMap. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc CreateUserWorkloadsConfigMap(CreateUserWorkloadsConfigMapRequest) + returns (UserWorkloadsConfigMap) { + option (google.api.http) = { + post: "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps" + body: "user_workloads_config_map" + }; + option (google.api.method_signature) = "parent,user_workloads_config_map"; + } + + // Gets an existing user workloads ConfigMap. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc GetUserWorkloadsConfigMap(GetUserWorkloadsConfigMapRequest) + returns (UserWorkloadsConfigMap) { + option (google.api.http) = { + get: "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists user workloads ConfigMaps. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc ListUserWorkloadsConfigMaps(ListUserWorkloadsConfigMapsRequest) + returns (ListUserWorkloadsConfigMapsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps" + }; + option (google.api.method_signature) = "parent"; + } + + // Updates a user workloads ConfigMap. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc UpdateUserWorkloadsConfigMap(UpdateUserWorkloadsConfigMapRequest) + returns (UserWorkloadsConfigMap) { + option (google.api.http) = { + put: "/v1beta1/{user_workloads_config_map.name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" + body: "user_workloads_config_map" + }; + option (google.api.method_signature) = "user_workloads_config_map"; + } + + // Deletes a user workloads ConfigMap. + // + // This method is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + rpc DeleteUserWorkloadsConfigMap(DeleteUserWorkloadsConfigMapRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a snapshots of a Cloud Composer environment. + // + // As a result of this operation, snapshot of environment's state is stored + // in a location specified in the SaveSnapshotRequest. + rpc SaveSnapshot(SaveSnapshotRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:saveSnapshot" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Loads a snapshot of a Cloud Composer environment. + // + // As a result of this operation, a snapshot of environment's specified in + // LoadSnapshotRequest is loaded into the environment. + rpc LoadSnapshot(LoadSnapshotRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:loadSnapshot" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Triggers database failover (only for highly resilient environments). + rpc DatabaseFailover(DatabaseFailoverRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:databaseFailover" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse" + metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }; + } + + // Fetches database properties. + rpc FetchDatabaseProperties(FetchDatabasePropertiesRequest) + returns (FetchDatabasePropertiesResponse) { + option (google.api.http) = { + get: "/v1beta1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties" + }; + } +} + +// Create a new environment. +message CreateEnvironmentRequest { + // The parent must be of the form + // "projects/{projectId}/locations/{locationId}". + string parent = 1; + + // The environment to create. + Environment environment = 2; +} + +// Get an environment. +message GetEnvironmentRequest { + // The resource name of the environment to get, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 1; +} + +// List environments in a project and location. +message ListEnvironmentsRequest { + // List environments in the given project and location, in the form: + // "projects/{projectId}/locations/{locationId}" + string parent = 1; + + // The maximum number of environments to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; +} + +// The environments in a project and location. +message ListEnvironmentsResponse { + // The list of environments returned by a ListEnvironmentsRequest. + repeated Environment environments = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// Delete an environment. +message DeleteEnvironmentRequest { + // The environment to delete, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 1; +} + +// Update an environment. +message UpdateEnvironmentRequest { + // The relative resource name of the environment to update, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 2; + + // A patch environment. Fields specified by the `updateMask` will be copied + // from the patch environment into the environment under update. + Environment environment = 1; + + // Required. A comma-separated list of paths, relative to `Environment`, of + // fields to update. + // For example, to set the version of scikit-learn to install in the + // environment to 0.19.0 and to remove an existing installation of + // argparse, the `updateMask` parameter would include the following two + // `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + // "config.softwareConfig.pypiPackages.argparse". The included patch + // environment would specify the scikit-learn version as follows: + // + // { + // "config":{ + // "softwareConfig":{ + // "pypiPackages":{ + // "scikit-learn":"==0.19.0" + // } + // } + // } + // } + // + // Note that in the above example, any existing PyPI packages + // other than scikit-learn and argparse will be unaffected. + // + // Only one update type may be included in a single request's `updateMask`. + // For example, one cannot update both the PyPI packages and + // labels in the same request. However, it is possible to update multiple + // members of a map field simultaneously in the same request. For example, + // to set the labels "label1" and "label2" while clearing "label3" (assuming + // it already exists), one can + // provide the paths "labels.label1", "labels.label2", and "labels.label3" + // and populate the patch environment as follows: + // + // { + // "labels":{ + // "label1":"new-label1-value" + // "label2":"new-label2-value" + // } + // } + // + // Note that in the above example, any existing labels that are not + // included in the `updateMask` will be unaffected. + // + // It is also possible to replace an entire map field by providing the + // map field's path in the `updateMask`. The new value of the field will + // be that which is provided in the patch environment. For example, to + // delete all pre-existing user-specified PyPI packages and + // install botocore at version 1.7.14, the `updateMask` would contain + // the path "config.softwareConfig.pypiPackages", and + // the patch environment would be the following: + // + // { + // "config":{ + // "softwareConfig":{ + // "pypiPackages":{ + // "botocore":"==1.7.14" + // } + // } + // } + // } + // + // **Note:** Only the following fields can be updated: + // + // * `config.softwareConfig.pypiPackages` + // * Replace all custom custom PyPI packages. If a replacement + // package map is not included in `environment`, all custom + // PyPI packages are cleared. It is an error to provide both + // this mask and a mask specifying an individual package. + // * `config.softwareConfig.pypiPackages.`packagename + // * Update the custom PyPI package *packagename*, + // preserving other packages. To delete the package, include it in + // `updateMask`, and omit the mapping for it in + // `environment.config.softwareConfig.pypiPackages`. It is an error + // to provide both a mask of this form and the + // `config.softwareConfig.pypiPackages` mask. + // * `labels` + // * Replace all environment labels. If a replacement labels map is not + // included in `environment`, all labels are cleared. It is an error to + // provide both this mask and a mask specifying one or more individual + // labels. + // * `labels.`labelName + // * Set the label named *labelName*, while preserving other + // labels. To delete the label, include it in `updateMask` and omit its + // mapping in `environment.labels`. It is an error to provide both a + // mask of this form and the `labels` mask. + // * `config.nodeCount` + // * Horizontally scale the number of nodes in the environment. An integer + // greater than or equal to 3 must be provided in the `config.nodeCount` + // field. Supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + // * `config.webServerNetworkAccessControl` + // * Replace the environment's current WebServerNetworkAccessControl. + // * `config.softwareConfig.airflowConfigOverrides` + // * Replace all Apache Airflow config overrides. If a replacement config + // overrides map is not included in `environment`, all config overrides + // are cleared. + // It is an error to provide both this mask and a mask specifying one or + // more individual config overrides. + // * `config.softwareConfig.airflowConfigOverrides.`section-name + // * Override the Apache Airflow config property *name* in the + // section named *section*, preserving other properties. To + // delete the property override, include it in `updateMask` and omit its + // mapping in + // `environment.config.softwareConfig.airflowConfigOverrides`. + // It is an error to provide both a mask of this form and the + // `config.softwareConfig.airflowConfigOverrides` mask. + // * `config.softwareConfig.envVariables` + // * Replace all environment variables. If a replacement environment + // variable map is not included in `environment`, all custom environment + // variables are cleared. + // * `config.softwareConfig.imageVersion` + // * Upgrade the version of the environment in-place. Refer to + // `SoftwareConfig.image_version` for information on how to format the + // new image version. Additionally, the new image version cannot effect + // a version downgrade, and must match the current image version's + // Composer and Airflow major versions. Consult the [Cloud Composer + // version list](/composer/docs/concepts/versioning/composer-versions) + // for valid values. + // * `config.softwareConfig.schedulerCount` + // * Horizontally scale the number of schedulers in Airflow. A positive + // integer not greater than the number of nodes must be provided in the + // `config.softwareConfig.schedulerCount` field. Supported for Cloud + // Composer environments in versions composer-1.*.*-airflow-2.*.*. + // * `config.softwareConfig.cloudDataLineageIntegration` + // * Configuration for Cloud Data Lineage integration. + // * `config.databaseConfig.machineType` + // * Cloud SQL machine type used by Airflow database. + // It has to be one of: db-n1-standard-2, db-n1-standard-4, + // db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer + // environments in versions composer-1.*.*-airflow-*.*.*. + // * `config.webServerConfig.machineType` + // * Machine type on which Airflow web server is running. + // It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 + // or composer-n1-webserver-8. Supported for Cloud Composer environments + // in versions composer-1.*.*-airflow-*.*.*. + // * `config.maintenanceWindow` + // * Maintenance window during which Cloud Composer components may be + // under maintenance. + // * `config.workloadsConfig` + // * The workloads configuration settings for the GKE cluster associated + // with the Cloud Composer environment. Supported for Cloud Composer + // environments in versions composer-2.*.*-airflow-*.*.* and newer. + // * `config.environmentSize` + // * The size of the Cloud Composer environment. Supported for Cloud + // Composer environments in versions composer-2.*.*-airflow-*.*.* and + // newer. + google.protobuf.FieldMask update_mask = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Restart Airflow web server. +message RestartWebServerRequest { + // The resource name of the environment to restart the web server for, in the + // form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string name = 1; +} + +// Execute Airflow Command request. +message ExecuteAirflowCommandRequest { + // The resource name of the environment in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + string environment = 1; + + // Airflow command. + string command = 2; + + // Airflow subcommand. + string subcommand = 3; + + // Parameters for the Airflow command/subcommand as an array of arguments. + // It may contain positional arguments like `["my-dag-id"]`, key-value + // parameters like `["--foo=bar"]` or `["--foo","bar"]`, + // or other flags like `["-f"]`. + repeated string parameters = 4; +} + +// Response to ExecuteAirflowCommandRequest. +message ExecuteAirflowCommandResponse { + // The unique ID of the command execution for polling. + string execution_id = 1; + + // The name of the pod where the command is executed. + string pod = 2; + + // The namespace of the pod where the command is executed. + string pod_namespace = 3; + + // Error message. Empty if there was no error. + string error = 4; +} + +// Stop Airflow Command request. +message StopAirflowCommandRequest { + // The resource name of the environment in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + string environment = 1; + + // The unique ID of the command execution. + string execution_id = 2; + + // The name of the pod where the command is executed. + string pod = 3; + + // The namespace of the pod where the command is executed. + string pod_namespace = 4; + + // If true, the execution is terminated forcefully (SIGKILL). If false, the + // execution is stopped gracefully, giving it time for cleanup. + bool force = 5; +} + +// Response to StopAirflowCommandRequest. +message StopAirflowCommandResponse { + // Whether the execution is still running. + bool is_done = 1; + + // Output message from stopping execution request. + repeated string output = 2; +} + +// Poll Airflow Command request. +message PollAirflowCommandRequest { + // The resource name of the environment in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1; + + // The unique ID of the command execution. + string execution_id = 2; + + // The name of the pod where the command is executed. + string pod = 3; + + // The namespace of the pod where the command is executed. + string pod_namespace = 4; + + // Line number from which new logs should be fetched. + int32 next_line_number = 5; +} + +// Response to PollAirflowCommandRequest. +message PollAirflowCommandResponse { + // Contains information about a single line from logs. + message Line { + // Number of the line. + int32 line_number = 1; + + // Text content of the log line. + string content = 2; + } + + // Information about how a command ended. + message ExitInfo { + // The exit code from the command execution. + int32 exit_code = 1; + + // Error message. Empty if there was no error. + string error = 2; + } + + // Output from the command execution. It may not contain the full output + // and the caller may need to poll for more lines. + repeated Line output = 1; + + // Whether the command execution has finished and there is no more output. + bool output_end = 2; + + // The result exit status of the command. + ExitInfo exit_info = 3; +} + +// Create user workloads Secret request. +message CreateUserWorkloadsSecretRequest { + // Required. The environment name to create a Secret for, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/Environment" + } + ]; + + // Required. User workloads Secret to create. + UserWorkloadsSecret user_workloads_secret = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Get user workloads Secret request. +message GetUserWorkloadsSecretRequest { + // Required. The resource name of the Secret to get, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/UserWorkloadsSecret" + } + ]; +} + +// List user workloads Secrets request. +message ListUserWorkloadsSecretsRequest { + // Required. List Secrets in the given environment, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/Environment" + } + ]; + + // Optional. The maximum number of Secrets to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous List request, + // if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update user workloads Secret request. +message UpdateUserWorkloadsSecretRequest { + // Optional. User workloads Secret to override. + UserWorkloadsSecret user_workloads_secret = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete user workloads Secret request. +message DeleteUserWorkloadsSecretRequest { + // Required. The Secret to delete, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/UserWorkloadsSecret" + } + ]; +} + +// Create user workloads ConfigMap request. +message CreateUserWorkloadsConfigMapRequest { + // Required. The environment name to create a ConfigMap for, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/Environment" + } + ]; + + // Required. User workloads ConfigMap to create. + UserWorkloadsConfigMap user_workloads_config_map = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Get user workloads ConfigMap request. +message GetUserWorkloadsConfigMapRequest { + // Required. The resource name of the ConfigMap to get, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/UserWorkloadsConfigMap" + } + ]; +} + +// List user workloads ConfigMaps request. +message ListUserWorkloadsConfigMapsRequest { + // Required. List ConfigMaps in the given environment, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/Environment" + } + ]; + + // Optional. The maximum number of ConfigMaps to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous List request, + // if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Update user workloads ConfigMap request. +message UpdateUserWorkloadsConfigMapRequest { + // Optional. User workloads ConfigMap to override. + UserWorkloadsConfigMap user_workloads_config_map = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Delete user workloads ConfigMap request. +message DeleteUserWorkloadsConfigMapRequest { + // Required. The ConfigMap to delete, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/UserWorkloadsConfigMap" + } + ]; +} + +// User workloads Secret used by Airflow tasks that run with Kubernetes executor +// or KubernetesPodOperator. +message UserWorkloadsSecret { + option (google.api.resource) = { + type: "composer.googleapis.com/UserWorkloadsSecret" + pattern: "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}" + plural: "userWorkloadsSecrets" + singular: "userWorkloadsSecret" + }; + + // Identifier. The resource name of the Secret, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The "data" field of Kubernetes Secret, organized in key-value + // pairs, which can contain sensitive values such as a password, a token, or a + // key. The values for all keys have to be base64-encoded strings. For details + // see: https://kubernetes.io/docs/concepts/configuration/secret/ + map data = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The user workloads Secrets for a given environment. +message ListUserWorkloadsSecretsResponse { + // The list of Secrets returned by a ListUserWorkloadsSecretsRequest. + repeated UserWorkloadsSecret user_workloads_secrets = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// User workloads ConfigMap used by Airflow tasks that run with Kubernetes +// executor or KubernetesPodOperator. +message UserWorkloadsConfigMap { + option (google.api.resource) = { + type: "composer.googleapis.com/UserWorkloadsConfigMap" + pattern: "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}" + plural: "userWorkloadsConfigMaps" + singular: "userWorkloadsConfigMap" + }; + + // Identifier. The resource name of the ConfigMap, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Optional. The "data" field of Kubernetes ConfigMap, organized in key-value + // pairs. For details see: + // https://kubernetes.io/docs/concepts/configuration/configmap/ + map data = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The user workloads ConfigMaps for a given environment. +message ListUserWorkloadsConfigMapsResponse { + // The list of ConfigMaps returned by a ListUserWorkloadsConfigMapsRequest. + repeated UserWorkloadsConfigMap user_workloads_config_maps = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// Request for listing workloads in a Cloud Composer environment. +message ListWorkloadsRequest { + // Required. The environment name to get workloads for, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/Environment" + } + ]; + + // Optional. The maximum number of environments to return. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The next_page_token value returned from a previous List request, + // if any. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list filter. + // Currently only supports equality on the type field. The value of a field + // specified in the filter expression must be one ComposerWorkloadType enum + // option. It's possible to get multiple types using "OR" operator, e.g.: + // "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are + // returned. + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response to ListWorkloadsRequest. +message ListWorkloadsResponse { + // Information about a single workload. + message ComposerWorkload { + // Name of a workload. + string name = 1; + + // Type of a workload. + ComposerWorkloadType type = 2; + + // Output only. Status of a workload. + ComposerWorkloadStatus status = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Supported workload types. + enum ComposerWorkloadType { + // Not able to determine the type of the workload. + COMPOSER_WORKLOAD_TYPE_UNSPECIFIED = 0; + + // Celery worker. + CELERY_WORKER = 1; + + // Kubernetes worker. + KUBERNETES_WORKER = 2; + + // Workload created by Kubernetes Pod Operator. + KUBERNETES_OPERATOR_POD = 3; + + // Airflow scheduler. + SCHEDULER = 4; + + // Airflow Dag processor. + DAG_PROCESSOR = 5; + + // Airflow triggerer. + TRIGGERER = 6; + + // Airflow web server UI. + WEB_SERVER = 7; + + // Redis. + REDIS = 8; + } + + // Workload status. + message ComposerWorkloadStatus { + // Output only. Workload state. + ComposerWorkloadState state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Text to provide more descriptive status. + string status_message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Detailed message of the status. + string detailed_status_message = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + } + + // Workload states. + enum ComposerWorkloadState { + // Not able to determine the status of the workload. + COMPOSER_WORKLOAD_STATE_UNSPECIFIED = 0; + + // Workload is in pending state and has not yet started. + PENDING = 1; + + // Workload is running fine. + OK = 2; + + // Workload is running but there are some non-critical problems. + WARNING = 3; + + // Workload is not running due to an error. + ERROR = 4; + + // Workload has finished execution with success. + SUCCEEDED = 5; + + // Workload has finished execution with failure. + FAILED = 6; + } + + // The list of environment workloads. + repeated ComposerWorkload workloads = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// Request to create a snapshot of a Cloud Composer environment. +message SaveSnapshotRequest { + // The resource name of the source environment in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1; + + // Location in a Cloud Storage where the snapshot is going to be stored, e.g.: + // "gs://my-bucket/snapshots". + string snapshot_location = 2; +} + +// Response to SaveSnapshotRequest. +message SaveSnapshotResponse { + // The fully-resolved Cloud Storage path of the created snapshot, + // e.g.: + // "gs://my-bucket/snapshots/project_location_environment_timestamp". + // This field is populated only if the snapshot creation was successful. + string snapshot_path = 1; +} + +// Request to load a snapshot into a Cloud Composer environment. +message LoadSnapshotRequest { + // The resource name of the target environment in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1; + + // A Cloud Storage path to a snapshot to load, e.g.: + // "gs://my-bucket/snapshots/project_location_environment_timestamp". + string snapshot_path = 2; + + // Whether or not to skip installing Pypi packages when loading the + // environment's state. + bool skip_pypi_packages_installation = 3; + + // Whether or not to skip setting environment variables when loading the + // environment's state. + bool skip_environment_variables_setting = 4; + + // Whether or not to skip setting Airflow overrides when loading the + // environment's state. + bool skip_airflow_overrides_setting = 5; + + // Whether or not to skip copying Cloud Storage data when loading the + // environment's state. + bool skip_gcs_data_copying = 6; +} + +// Response to LoadSnapshotRequest. +message LoadSnapshotResponse {} + +// Request to trigger database failover (only for highly resilient +// environments). +message DatabaseFailoverRequest { + // Target environment: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1; +} + +// Response for DatabaseFailoverRequest. +message DatabaseFailoverResponse {} + +// Request to fetch properties of environment's database. +message FetchDatabasePropertiesRequest { + // Required. The resource name of the environment, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "composer.googleapis.com/Environment" + } + ]; +} + +// Response for FetchDatabasePropertiesRequest. +message FetchDatabasePropertiesResponse { + // The Compute Engine zone that the instance is currently serving from. + string primary_gce_zone = 1; + + // The Compute Engine zone that the failover instance is currently serving + // from for a regional Cloud SQL instance. + string secondary_gce_zone = 2; + + // The availability status of the failover replica. A false status indicates + // that the failover replica is out of sync. The primary instance can only + // fail over to the failover replica when the status is true. + bool is_failover_replica_available = 3; +} + +// Configuration information for an environment. +message EnvironmentConfig { + // The size of the Cloud Composer environment. + enum EnvironmentSize { + // The size of the environment is unspecified. + ENVIRONMENT_SIZE_UNSPECIFIED = 0; + + // The environment size is small. + ENVIRONMENT_SIZE_SMALL = 1; + + // The environment size is medium. + ENVIRONMENT_SIZE_MEDIUM = 2; + + // The environment size is large. + ENVIRONMENT_SIZE_LARGE = 3; + } + + // Resilience mode of the Cloud Composer Environment. + enum ResilienceMode { + // Default mode doesn't change environment parameters. + RESILIENCE_MODE_UNSPECIFIED = 0; + + // Enabled High Resilience mode, including Cloud SQL HA. + HIGH_RESILIENCE = 1; + } + + // Output only. The Kubernetes Engine cluster used to run this environment. + string gke_cluster = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The Cloud Storage prefix of the DAGs for this environment. + // Although Cloud Storage objects reside in a flat namespace, a hierarchical + // file tree can be simulated using "/"-delimited object name prefixes. DAG + // objects for this environment reside in a simulated directory with the given + // prefix. + string dag_gcs_prefix = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The number of nodes in the Kubernetes Engine cluster that will be + // used to run this environment. + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + int32 node_count = 3; + + // The configuration settings for software inside the environment. + SoftwareConfig software_config = 4; + + // The configuration used for the Kubernetes Engine cluster. + NodeConfig node_config = 5; + + // The configuration used for the Private IP Cloud Composer environment. + PrivateEnvironmentConfig private_environment_config = 7; + + // Optional. The network-level access control policy for the Airflow web + // server. If unspecified, no network-level access restrictions will be + // applied. + WebServerNetworkAccessControl web_server_network_access_control = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration settings for Cloud SQL instance used internally + // by Apache Airflow software. + DatabaseConfig database_config = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration settings for the Airflow web server App Engine + // instance. + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + WebServerConfig web_server_config = 11 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The URI of the Apache Airflow Web UI hosted within this + // environment (see [Airflow web + // interface](/composer/docs/how-to/accessing/airflow-web-interface)). + string airflow_uri = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The 'bring your own identity' variant of the URI of the Apache + // Airflow Web UI hosted within this environment, to be accessed with external + // identities using workforce identity federation (see [Access environments + // with workforce identity + // federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). + string airflow_byoid_uri = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The encryption options for the Cloud Composer environment and its + // dependencies. Cannot be updated. + EncryptionConfig encryption_config = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maintenance window is the period when Cloud Composer + // components may undergo maintenance. It is defined so that maintenance is + // not executed during peak hours or critical time periods. + // + // The system will not be under maintenance for every occurrence of this + // window, but when maintenance is planned, it will be scheduled + // during the window. + // + // The maintenance window period must encompass at least 12 hours per week. + // This may be split into multiple chunks, each with a size of + // at least 4 hours. + // + // If this value is omitted, the default value for maintenance window is + // applied. By default, maintenance windows are from 00:00:00 to 04:00:00 + // (GMT) on Friday, Saturday, and Sunday every week. + MaintenanceWindow maintenance_window = 13 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The workloads configuration settings for the GKE cluster + // associated with the Cloud Composer environment. The GKE cluster runs + // Airflow scheduler, web server and workers workloads. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + WorkloadsConfig workloads_config = 15 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The size of the Cloud Composer environment. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + EnvironmentSize environment_size = 16 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration options for GKE cluster master authorized + // networks. By default master authorized networks feature is: + // - in case of private environment: enabled with no external networks + // allowlisted. + // - in case of public environment: disabled. + MasterAuthorizedNetworksConfig master_authorized_networks_config = 17 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Recovery settings configuration of an environment. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + RecoveryConfig recovery_config = 18 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration setting for Airflow database data retention + // mechanism. + DataRetentionConfig data_retention_config = 19 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resilience mode of the Cloud Composer Environment. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.2.0-airflow-*.*.* and newer. + ResilienceMode resilience_mode = 20 [(google.api.field_behavior) = OPTIONAL]; +} + +// Network-level access control policy for the Airflow web server. +message WebServerNetworkAccessControl { + // Allowed IP range with user-provided description. + message AllowedIpRange { + // IP address or range, defined using CIDR notation, of requests that this + // rule applies to. + // Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` + // or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. + // + // IP range prefixes should be properly truncated. For example, + // `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, + // `2001:db8::1/32` should be truncated to `2001:db8::/32`. + string value = 1; + + // Optional. User-provided description. It must contain at most 300 + // characters. + string description = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // A collection of allowed IP ranges with descriptions. + repeated AllowedIpRange allowed_ip_ranges = 1; +} + +// Specifies the selection and configuration of software inside the environment. +message SoftwareConfig { + // Web server plugins mode of the Cloud Composer environment. + enum WebServerPluginsMode { + // Default mode. + WEB_SERVER_PLUGINS_MODE_UNSPECIFIED = 0; + + // Web server plugins are not supported. + PLUGINS_DISABLED = 1; + + // Web server plugins are supported. + PLUGINS_ENABLED = 2; + } + + // The version of the software running in the environment. + // This encapsulates both the version of Cloud Composer functionality and the + // version of Apache Airflow. It must match the regular expression + // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. + // When used as input, the server also checks if the provided version is + // supported and denies the request for an unsupported version. + // + // The Cloud Composer portion of the image version is a full + // [semantic version](https://semver.org), or an alias in the form of major + // version number or `latest`. When an alias is provided, the server replaces + // it with the current Cloud Composer version that satisfies the alias. + // + // The Apache Airflow portion of the image version is a full semantic version + // that points to one of the supported Apache Airflow versions, or an alias in + // the form of only major or major.minor versions specified. When an alias is + // provided, the server replaces it with the latest Apache Airflow version + // that satisfies the alias and is supported in the given Cloud Composer + // version. + // + // In all cases, the resolved image version is stored in the same field. + // + // See also [version + // list](/composer/docs/concepts/versioning/composer-versions) and [versioning + // overview](/composer/docs/concepts/versioning/composer-versioning-overview). + string image_version = 1; + + // Optional. Apache Airflow configuration properties to override. + // + // Property keys contain the section and property names, separated by a + // hyphen, for example "core-dags_are_paused_at_creation". Section names must + // not contain hyphens ("-"), opening square brackets ("["), or closing + // square brackets ("]"). The property name must not be empty and must not + // contain an equals sign ("=") or semicolon (";"). Section and property names + // must not contain a period ("."). Apache Airflow configuration property + // names must be written in + // [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can + // contain any character, and can be written in any lower/upper case format. + // + // Certain Apache Airflow configuration property values are + // [blocked](/composer/docs/concepts/airflow-configurations), + // and cannot be overridden. + map airflow_config_overrides = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom Python Package Index (PyPI) packages to be installed in + // the environment. + // + // Keys refer to the lowercase package name such as "numpy" + // and values are the lowercase extras and version specifier such as + // "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a + // package without pinning it to a version specifier, use the empty string as + // the value. + map pypi_packages = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Additional environment variables to provide to the Apache Airflow + // scheduler, worker, and webserver processes. + // + // Environment variable names must match the regular expression + // `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow + // software configuration overrides (they cannot match the regular expression + // `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the + // following reserved names: + // + // * `AIRFLOW_HOME` + // * `C_FORCE_ROOT` + // * `CONTAINER_NAME` + // * `DAGS_FOLDER` + // * `GCP_PROJECT` + // * `GCS_BUCKET` + // * `GKE_CLUSTER_NAME` + // * `SQL_DATABASE` + // * `SQL_INSTANCE` + // * `SQL_PASSWORD` + // * `SQL_PROJECT` + // * `SQL_REGION` + // * `SQL_USER` + map env_variables = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The major version of Python used to run the Apache Airflow + // scheduler, worker, and webserver processes. + // + // Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be + // updated. + // + // This field is only supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. Environments in newer versions always use + // Python major version 3. + string python_version = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of schedulers for Airflow. + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-2.*.*. + int32 scheduler_count = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration for Cloud Data Lineage integration. + CloudDataLineageIntegration cloud_data_lineage_integration = 8 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Whether or not the web server uses custom plugins. + // If unspecified, the field defaults to `PLUGINS_ENABLED`. + // + // This field is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + WebServerPluginsMode web_server_plugins_mode = 10 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration for controlling how IPs are allocated in the +// GKE cluster. +message IPAllocationPolicy { + // Optional. Whether or not to enable Alias IPs in the GKE cluster. + // If `true`, a VPC-native cluster is created. + // + // This field is only supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. Environments in newer versions always use + // VPC-native GKE clusters. + bool use_ip_aliases = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the cluster's secondary range used to allocate + // IP addresses to pods. Specify either `cluster_secondary_range_name` + // or `cluster_ipv4_cidr_block` but not both. + // + // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + // this field is applicable only when `use_ip_aliases` is true. + string cluster_secondary_range_name = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The name of the services' secondary range used to allocate + // IP addresses to the cluster. Specify either `services_secondary_range_name` + // or `services_ipv4_cidr_block` but not both. + // + // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + // this field is applicable only when `use_ip_aliases` is true. + string services_secondary_range_name = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP address range used to allocate IP addresses to pods in + // the cluster. + // + // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + // this field is applicable only when `use_ip_aliases` is true. + // + // Set to blank to have GKE choose a range with the default size. + // + // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + // netmask. + // + // Set to a + // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + // Specify `cluster_secondary_range_name` or `cluster_ipv4_cidr_block` + // but not both. + string cluster_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP address range of the services IP addresses in this + // cluster. + // + // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, + // this field is applicable only when `use_ip_aliases` is true. + // + // Set to blank to have GKE choose a range with the default size. + // + // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific + // netmask. + // + // Set to a + // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) + // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. + // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range + // to use. + // Specify `services_secondary_range_name` or `services_ipv4_cidr_block` + // but not both. + string services_ipv4_cidr_block = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration information for the Kubernetes Engine nodes running +// the Apache Airflow software. +message NodeConfig { + // Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which + // to deploy the VMs used to run the Apache Airflow software, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/zones/{zoneId}". + // + // This `location` must belong to the enclosing environment's project and + // location. If both this field and `nodeConfig.machineType` are specified, + // `nodeConfig.machineType` must belong to this `location`; if both are + // unspecified, the service will pick a zone in the Compute Engine region + // corresponding to the Cloud Composer location, and propagate that choice to + // both fields. If only one field (`location` or `nodeConfig.machineType`) is + // specified, the location information from the specified field will be + // propagated to the unspecified field. + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + string location = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Compute Engine + // [machine type](/compute/docs/machine-types) used for cluster instances, + // specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". + // + // The `machineType` must belong to the enclosing environment's project and + // location. If both this field and `nodeConfig.location` are specified, + // this `machineType` must belong to the `nodeConfig.location`; if both are + // unspecified, the service will pick a zone in the Compute Engine region + // corresponding to the Cloud Composer location, and propagate that choice to + // both fields. If exactly one of this field and `nodeConfig.location` is + // specified, the location information from the specified field will be + // propagated to the unspecified field. + // + // The `machineTypeId` must not be a [shared-core machine + // type](/compute/docs/machine-types#sharedcore). + // + // If this field is unspecified, the `machineTypeId` defaults + // to "n1-standard-1". + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + string machine_type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Compute Engine network to be used for machine + // communications, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/global/networks/{networkId}". + // + // If unspecified, the default network in the environment's project is used. + // If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) + // is provided, `nodeConfig.subnetwork` must also be provided. For + // [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see + // `nodeConfig.subnetwork`. + string network = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Compute Engine subnetwork to be used for machine + // communications, specified as a + // [relative resource + // name](/apis/design/resource_names#relative_resource_name). For example: + // "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" + // + // If a subnetwork is provided, `nodeConfig.network` must also be provided, + // and the subnetwork must belong to the enclosing environment's project and + // location. + string subnetwork = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The disk size in GB used for node VMs. Minimum size is 30GB. + // If unspecified, defaults to 100GB. Cannot be updated. + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + int32 disk_size_gb = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The set of Google API scopes to be made available on all + // node VMs. If `oauth_scopes` is empty, defaults to + // ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + repeated string oauth_scopes = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Google Cloud Platform Service Account to be used by the + // workloads. If a service account is not specified, the "default" Compute + // Engine service account is used. Cannot be updated. + string service_account = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The list of instance tags applied to all node VMs. Tags are used + // to identify valid sources or targets for network firewalls. Each tag within + // the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). + // Cannot be updated. + repeated string tags = 8 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IPAllocationPolicy fields for the GKE cluster. + IPAllocationPolicy ip_allocation_policy = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of pods per node in the Cloud Composer GKE + // cluster. The value must be between 8 and 110 and it can be set only if the + // environment is VPC-native. The default value is 32. Values of this field + // will be propagated both to the `default-pool` node pool of the newly + // created GKE cluster, and to the default "Maximum Pods per Node" value which + // is used for newly created node pools if their value is not explicitly set + // during node pool creation. For more information, see [Optimizing IP address + // allocation] + // (https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr). + // Cannot be updated. + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + int32 max_pods_per_node = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines + // nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for + // all destination addresses, except between pods traffic. + // + // See: + // https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent + bool enable_ip_masq_agent = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Network Attachment that Cloud Composer environment is connected + // to, which provides connectivity with a user's VPC network. Takes precedence + // over network and subnetwork settings. If not provided, but network and + // subnetwork are defined during environment, it will be provisioned. If not + // provided and network and subnetwork are also empty, then connectivity to + // user's VPC network is disabled. Network attachment must be provided in + // format + // projects/{project}/regions/{region}/networkAttachments/{networkAttachment}. + // + // This field is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + string composer_network_attachment = 12 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The IP range in CIDR notation to use internally by Cloud + // Composer. IP addresses are not reserved - and the same range can be used by + // multiple Cloud Composer environments. In case of overlap, IPs from this + // range will not be accessible in the user's VPC network. Cannot be updated. + // If not specified, the default value of '100.64.128.0/20' is used. + // + // This field is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + string composer_internal_ipv4_cidr_block = 13 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration options for the private GKE cluster in a Cloud Composer +// environment. +message PrivateClusterConfig { + // Optional. If `true`, access to the public endpoint of the GKE cluster is + // denied. + bool enable_private_endpoint = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IPv4 range for GKE master will be + // reserved. If left blank, the default value of '172.16.0.0/23' is used. + string master_ipv4_cidr_block = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP range in CIDR notation to use for the hosted master + // network. This range is used for assigning internal IP addresses to the + // cluster master or set of masters and to the internal load balancer virtual + // IP. This range must not overlap with any other ranges in use within the + // cluster's network. + string master_ipv4_reserved_range = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Configuration options for networking connections in the Composer 2 +// environment. +message NetworkingConfig { + // Represents connection type between Composer environment in Customer + // Project and the corresponding Tenant project, from a predefined list + // of available connection modes. + enum ConnectionType { + // No specific connection type was requested, so the environment uses + // the default value corresponding to the rest of its configuration. + CONNECTION_TYPE_UNSPECIFIED = 0; + + // Requests the use of VPC peerings for connecting the Customer and Tenant + // projects. + VPC_PEERING = 1; + + // Requests the use of Private Service Connect for connecting the Customer + // and Tenant projects. + PRIVATE_SERVICE_CONNECT = 2; + } + + // Optional. Indicates the user requested specifc connection type between + // Tenant and Customer projects. You cannot set networking connection type in + // public IP environment. + ConnectionType connection_type = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration information for configuring a Private IP Cloud Composer +// environment. +message PrivateEnvironmentConfig { + // Optional. If `true`, a Private IP Cloud Composer environment is created. + // If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be + // set to true for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + bool enable_private_environment = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If `true`, builds performed during operations that install Python + // packages have only private connectivity to Google services (including + // Artifact Registry) and VPC network (if either `NodeConfig.network` and + // `NodeConfig.subnetwork` fields or `NodeConfig.composer_network_attachment` + // field are specified). If `false`, the builds also have access to the + // internet. + // + // This field is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + bool enable_private_builds_only = 11 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for the private GKE cluster for a Private IP + // Cloud Composer environment. + PrivateClusterConfig private_cluster_config = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IP range for web server will be + // reserved. Needs to be disjoint from + // private_cluster_config.master_ipv4_cidr_block and + // cloud_sql_ipv4_cidr_block. + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + string web_server_ipv4_cidr_block = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The CIDR block from which IP range in tenant project will be + // reserved for Cloud SQL. Needs to be disjoint from + // web_server_ipv4_cidr_block + string cloud_sql_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP range reserved for the tenant project's App Engine VMs. + // + // This field is supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + string web_server_ipv4_reserved_range = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The CIDR block from which IP range for Cloud Composer Network in + // tenant project will be reserved. Needs to be disjoint from + // private_cluster_config.master_ipv4_cidr_block and + // cloud_sql_ipv4_cidr_block. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + string cloud_composer_network_ipv4_cidr_block = 7 + [(google.api.field_behavior) = OPTIONAL]; + + // Output only. The IP range reserved for the tenant project's Cloud Composer + // network. + // + // This field is supported for Cloud Composer environments in versions + // composer-2.*.*-airflow-*.*.* and newer. + string cloud_composer_network_ipv4_reserved_range = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. When enabled, IPs from public (non-RFC1918) ranges can be used + // for `IPAllocationPolicy.cluster_ipv4_cidr_block` and + // `IPAllocationPolicy.service_ipv4_cidr_block`. + bool enable_privately_used_public_ips = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. When specified, the environment will use Private Service Connect + // instead of VPC peerings to connect to Cloud SQL in the Tenant Project, + // and the PSC endpoint in the Customer Project will use an IP address from + // this subnetwork. + string cloud_composer_connection_subnetwork = 9 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Configuration for the network connections configuration in the + // environment. + NetworkingConfig networking_config = 10 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration of Cloud SQL instance that is used by the Apache Airflow +// software. +message DatabaseConfig { + // Optional. Cloud SQL machine type used by Airflow database. + // It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 + // or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. + // Supported for Cloud Composer environments in versions + // composer-1.*.*-airflow-*.*.*. + string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Compute Engine zone where the Airflow database is created. If + // zone is provided, it must be in the region selected for the environment. If + // zone is not provided, a zone is automatically selected. The zone can only + // be set during environment creation. Supported for Cloud Composer + // environments in versions composer-2.*.*-airflow-*.*.*. + string zone = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration settings for the Airflow web server App Engine instance. +// Supported for Cloud Composer environments in versions +// composer-1.*.*-airflow-*.*.*. +message WebServerConfig { + // Optional. Machine type on which Airflow web server is running. + // It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or + // composer-n1-webserver-8. + // If not specified, composer-n1-webserver-2 will be used. + // Value custom is returned only in response, if Airflow web server parameters + // were manually changed to a non-standard values. + string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The encryption options for the Cloud Composer environment and its +// dependencies. Supported for Cloud Composer environments in versions +// composer-1.*.*-airflow-*.*.*. +message EncryptionConfig { + // Optional. Customer-managed Encryption Key available through Google's Key + // Management Service. Cannot be updated. If not specified, Google-managed key + // will be used. + string kms_key_name = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration settings for Cloud Composer maintenance window. +// The following example: +// +// ``` +// { +// "startTime":"2019-08-01T01:00:00Z" +// "endTime":"2019-08-01T07:00:00Z" +// "recurrence":"FREQ=WEEKLY;BYDAY=TU,WE" +// } +// ``` +// +// would define a maintenance window between 01 and 07 hours UTC during +// each Tuesday and Wednesday. +message MaintenanceWindow { + // Required. Start time of the first recurrence of the maintenance window. + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Maintenance window end time. It is used only to calculate the + // duration of the maintenance window. The value for end_time must be in the + // future, relative to `start_time`. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. Maintenance window recurrence. Format is a subset of + // [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed + // values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` + // Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. + string recurrence = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The Kubernetes workloads configuration for GKE cluster associated with the +// Cloud Composer environment. Supported for Cloud Composer environments in +// versions composer-2.*.*-airflow-*.*.* and newer. +message WorkloadsConfig { + // Configuration for resources used by Airflow schedulers. + message SchedulerResource { + // Optional. CPU request and limit for a single Airflow scheduler replica. + float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Memory (GB) request and limit for a single Airflow scheduler + // replica. + float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Storage (GB) request and limit for a single Airflow scheduler + // replica. + float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of schedulers. + int32 count = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for resources used by Airflow web server. + message WebServerResource { + // Optional. CPU request and limit for Airflow web server. + float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Memory (GB) request and limit for Airflow web server. + float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Storage (GB) request and limit for Airflow web server. + float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for resources used by Airflow workers. + message WorkerResource { + // Optional. CPU request and limit for a single Airflow worker replica. + float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Memory (GB) request and limit for a single Airflow worker + // replica. + float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Storage (GB) request and limit for a single Airflow worker + // replica. + float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Minimum number of workers for autoscaling. + int32 min_count = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Maximum number of workers for autoscaling. + int32 max_count = 5 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for resources used by Airflow triggerers. + message TriggererResource { + // Optional. The number of triggerers. + int32 count = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. CPU request and limit for a single Airflow triggerer replica. + float cpu = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Memory (GB) request and limit for a single Airflow triggerer + // replica. + float memory_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + } + + // Configuration for resources used by Airflow DAG processors. + // + // This field is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + message DagProcessorResource { + // Optional. CPU request and limit for a single Airflow DAG processor + // replica. + float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Memory (GB) request and limit for a single Airflow DAG + // processor replica. + float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Storage (GB) request and limit for a single Airflow DAG + // processor replica. + float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The number of DAG processors. If not provided or set to 0, a + // single DAG processor instance will be created. + int32 count = 4 [(google.api.field_behavior) = OPTIONAL]; + } + + // Optional. Resources used by Airflow schedulers. + SchedulerResource scheduler = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resources used by Airflow web server. + WebServerResource web_server = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resources used by Airflow workers. + WorkerResource worker = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resources used by Airflow triggerers. + TriggererResource triggerer = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Resources used by Airflow DAG processors. + // + // This field is supported for Cloud Composer environments in versions + // composer-3.*.*-airflow-*.*.* and newer. + DagProcessorResource dag_processor = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration setting for Airflow database data retention mechanism. +message DataRetentionConfig { + // Optional. The number of days describing for how long to store event-based + // records in airflow database. If the retention mechanism is enabled this + // value must be a positive integer otherwise, value should be set to 0. + int32 airflow_database_retention_days = 1 + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; + + // Optional. The configuration settings for task logs retention + TaskLogsRetentionConfig task_logs_retention_config = 4 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The retention policy for airflow metadata database. + AirflowMetadataRetentionPolicyConfig airflow_metadata_retention_config = 5 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration setting for Task Logs. +message TaskLogsRetentionConfig { + // The definition of task_logs_storage_mode. + enum TaskLogsStorageMode { + // This configuration is not specified by the user. + TASK_LOGS_STORAGE_MODE_UNSPECIFIED = 0; + + // Store task logs in Cloud Logging and in the environment's Cloud Storage + // bucket. + CLOUD_LOGGING_AND_CLOUD_STORAGE = 1; + + // Store task logs in Cloud Logging only. + CLOUD_LOGGING_ONLY = 2; + } + + // Optional. The mode of storage for Airflow workers task logs. + TaskLogsStorageMode storage_mode = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The policy for airflow metadata database retention. +message AirflowMetadataRetentionPolicyConfig { + // Describes retention policy. + enum RetentionMode { + // Default mode doesn't change environment parameters. + RETENTION_MODE_UNSPECIFIED = 0; + + // Retention policy is enabled. + RETENTION_MODE_ENABLED = 1; + + // Retention policy is disabled. + RETENTION_MODE_DISABLED = 2; + } + + // Optional. Retention can be either enabled or disabled. + RetentionMode retention_mode = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. How many days data should be retained for. + int32 retention_days = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration for data storage in the environment. +message StorageConfig { + // Optional. The name of the Cloud Storage bucket used by the environment. No + // `gs://` prefix. + string bucket = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// The Recovery settings of an environment. +message RecoveryConfig { + // Optional. The configuration for scheduled snapshot creation mechanism. + ScheduledSnapshotsConfig scheduled_snapshots_config = 1 + [(google.api.field_behavior) = OPTIONAL]; +} + +// The configuration for scheduled snapshot creation mechanism. +message ScheduledSnapshotsConfig { + // Optional. Whether scheduled snapshots creation is enabled. + bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud Storage location for storing automatically created + // snapshots. + string snapshot_location = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The cron expression representing the time when snapshots creation + // mechanism runs. This field is subject to additional validation around + // frequency of execution. + string snapshot_creation_schedule = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Time zone that sets the context to interpret + // snapshot_creation_schedule. + string time_zone = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Configuration options for the master authorized networks feature. Enabled +// master authorized networks will disallow all external traffic to access +// Kubernetes master through HTTPS except traffic from the given CIDR blocks, +// Google Compute Engine Public IPs and Google Prod IPs. +message MasterAuthorizedNetworksConfig { + // CIDR block with an optional name. + message CidrBlock { + // User-defined name that identifies the CIDR block. + string display_name = 1; + + // CIDR block that must be specified in CIDR notation. + string cidr_block = 2; + } + + // Whether or not master authorized networks feature is enabled. + bool enabled = 1; + + // Up to 50 external networks that could access Kubernetes master through + // HTTPS. + repeated CidrBlock cidr_blocks = 2; +} + +// Configuration for Cloud Data Lineage integration. +message CloudDataLineageIntegration { + // Optional. Whether or not Cloud Data Lineage integration is enabled. + bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; +} + +// An environment for running orchestration tasks. +message Environment { + option (google.api.resource) = { + type: "composer.googleapis.com/Environment" + pattern: "projects/{project}/locations/{location}/environments/{environment}" + }; + + // State of the environment. + enum State { + // The state of the environment is unknown. + STATE_UNSPECIFIED = 0; + + // The environment is in the process of being created. + CREATING = 1; + + // The environment is currently running and healthy. It is ready for use. + RUNNING = 2; + + // The environment is being updated. It remains usable but cannot receive + // additional update requests or be deleted at this time. + UPDATING = 3; + + // The environment is undergoing deletion. It cannot be used. + DELETING = 4; + + // The environment has encountered an error and cannot be used. + ERROR = 5; + } + + // The resource name of the environment, in the form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + // + // EnvironmentId must start with a lowercase letter followed by up to 63 + // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + string name = 1; + + // Configuration parameters for this environment. + EnvironmentConfig config = 2; + + // Output only. The UUID (Universally Unique IDentifier) associated with this + // environment. This value is generated when the environment is created. + string uuid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The current state of the environment. + State state = 4; + + // Output only. The time at which this environment was created. + google.protobuf.Timestamp create_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which this environment was last modified. + google.protobuf.Timestamp update_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. User-defined labels for this environment. + // The labels map can contain no more than 64 entries. Entries of the labels + // map are UTF8 strings that comply with the following restrictions: + // + // * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} + // * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} + // * Both keys and values are additionally constrained to be <= 128 bytes in + // size. + map labels = 7 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Reserved for future use. + bool satisfies_pzs = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Reserved for future use. + bool satisfies_pzi = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Storage configuration for this environment. + StorageConfig storage_config = 9 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request to check whether image upgrade will succeed. +message CheckUpgradeRequest { + // The resource name of the environment to check upgrade for, in the + // form: + // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + string environment = 1; + + // The version of the software running in the environment. + // This encapsulates both the version of Cloud Composer functionality and the + // version of Apache Airflow. It must match the regular expression + // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. + // When used as input, the server also checks if the provided version is + // supported and denies the request for an unsupported version. + // + // The Cloud Composer portion of the image version is a full + // [semantic version](https://semver.org), or an alias in the form of major + // version number or `latest`. When an alias is provided, the server replaces + // it with the current Cloud Composer version that satisfies the alias. + // + // The Apache Airflow portion of the image version is a full semantic version + // that points to one of the supported Apache Airflow versions, or an alias in + // the form of only major or major.minor versions specified. When an alias is + // provided, the server replaces it with the latest Apache Airflow version + // that satisfies the alias and is supported in the given Cloud Composer + // version. + // + // In all cases, the resolved image version is stored in the same field. + // + // See also [version + // list](/composer/docs/concepts/versioning/composer-versions) and [versioning + // overview](/composer/docs/concepts/versioning/composer-versioning-overview). + string image_version = 2; +} + +// Message containing information about the result of an upgrade check +// operation. +message CheckUpgradeResponse { + // Whether there were python modules conflict during image build. + enum ConflictResult { + // It is unknown whether build had conflicts or not. + CONFLICT_RESULT_UNSPECIFIED = 0; + + // There were python packages conflicts. + CONFLICT = 1; + + // There were no python packages conflicts. + NO_CONFLICT = 2; + } + + // Output only. Url for a docker build log of an upgraded image. + string build_log_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Whether build has succeeded or failed on modules conflicts. + ConflictResult contains_pypi_modules_conflict = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Extract from a docker image build log containing information + // about pypi modules conflicts. + string pypi_conflict_build_log_extract = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Composer image for which the build was happening. + string image_version = 5; + + // Pypi dependencies specified in the environment configuration, at the time + // when the build was triggered. + map pypi_dependencies = 6; +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto new file mode 100644 index 00000000000..9863ed91fbf --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto @@ -0,0 +1,90 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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.orchestration.airflow.service.v1beta1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/type/date.proto"; + +option go_package = "cloud.google.com/go/orchestration/airflow/service/apiv1beta1/servicepb;servicepb"; +option java_multiple_files = true; +option java_package = "com.google.cloud.orchestration.airflow.service.v1beta1"; + +// Readonly service to query available ImageVersions. +service ImageVersions { + option (google.api.default_host) = "composer.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // List ImageVersions for provided location. + rpc ListImageVersions(ListImageVersionsRequest) + returns (ListImageVersionsResponse) { + option (google.api.http) = { + get: "/v1beta1/{parent=projects/*/locations/*}/imageVersions" + }; + option (google.api.method_signature) = "parent"; + } +} + +// List ImageVersions in a project and location. +message ListImageVersionsRequest { + // List ImageVersions in the given project and location, in the form: + // "projects/{projectId}/locations/{locationId}" + string parent = 1; + + // The maximum number of image_versions to return. + int32 page_size = 2; + + // The next_page_token value returned from a previous List request, if any. + string page_token = 3; + + // Whether or not image versions from old releases should be included. + bool include_past_releases = 4; +} + +// The ImageVersions in a project and location. +message ListImageVersionsResponse { + // The list of supported ImageVersions in a location. + repeated ImageVersion image_versions = 1; + + // The page token used to query for the next page if one exists. + string next_page_token = 2; +} + +// Image Version information +message ImageVersion { + // The string identifier of the ImageVersion, in the form: + // "composer-x.y.z-airflow-a.b.c" + string image_version_id = 1; + + // Whether this is the default ImageVersion used by Composer during + // environment creation if no input ImageVersion is specified. + bool is_default = 2; + + // supported python versions + repeated string supported_python_versions = 3; + + // The date of the version release. + google.type.Date release_date = 4; + + // Whether it is impossible to create an environment with the image version. + bool creation_disabled = 5; + + // Whether it is impossible to upgrade an environment running with the image + // version. + bool upgrade_disabled = 6; +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto new file mode 100644 index 00000000000..baf41d297f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto @@ -0,0 +1,93 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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.orchestration.airflow.service.v1beta1; + +import "google/protobuf/timestamp.proto"; + +option go_package = "cloud.google.com/go/orchestration/airflow/service/apiv1beta1/servicepb;servicepb"; +option java_multiple_files = true; +option java_outer_classname = "OperationsProto"; +option java_package = "com.google.cloud.orchestration.airflow.service.v1beta1"; + +// Metadata describing an operation. +message OperationMetadata { + // An enum describing the overall state of an operation. + enum State { + // Unused. + STATE_UNSPECIFIED = 0; + + // The operation has been created but is not yet started. + PENDING = 1; + + // The operation is underway. + RUNNING = 2; + + // The operation completed successfully. + SUCCESSFUL = 3; + + // The operation is no longer running but did not succeed. + FAILED = 4; + } + + // Type of longrunning operation. + enum Type { + // Unused. + TYPE_UNSPECIFIED = 0; + + // A resource creation operation. + CREATE = 1; + + // A resource deletion operation. + DELETE = 2; + + // A resource update operation. + UPDATE = 3; + + // A resource check operation. + CHECK = 4; + + // Saves snapshot of the resource operation. + SAVE_SNAPSHOT = 5; + + // Loads snapshot of the resource operation. + LOAD_SNAPSHOT = 6; + + // Triggers failover of environment's Cloud SQL instance (only for highly + // resilient environments). + DATABASE_FAILOVER = 7; + } + + // Output only. The current operation state. + State state = 1; + + // Output only. The type of operation being performed. + Type operation_type = 2; + + // Output only. The resource being operated on, as a [relative resource name]( + // /apis/design/resource_names#relative_resource_name). + string resource = 3; + + // Output only. The UUID of the resource being operated on. + string resource_uuid = 4; + + // Output only. The time the operation was submitted to the server. + google.protobuf.Timestamp create_time = 5; + + // Output only. The time when the operation terminated, regardless of its + // success. This field is unset if the operation is still ongoing. + google.protobuf.Timestamp end_time = 6; +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.d.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.d.ts new file mode 100644 index 00000000000..ba46357fce3 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.d.ts @@ -0,0 +1,17037 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 orchestration. */ + namespace orchestration { + + /** Namespace airflow. */ + namespace airflow { + + /** Namespace service. */ + namespace service { + + /** Namespace v1beta1. */ + namespace v1beta1 { + + /** Represents an Environments */ + class Environments extends $protobuf.rpc.Service { + + /** + * Constructs a new Environments 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 Environments 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): Environments; + + /** + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public createEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateEnvironmentCallback): void; + + /** + * Calls CreateEnvironment. + * @param request CreateEnvironmentRequest message or plain object + * @returns Promise + */ + public createEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest): Promise; + + /** + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Environment + */ + public getEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.GetEnvironmentCallback): void; + + /** + * Calls GetEnvironment. + * @param request GetEnvironmentRequest message or plain object + * @returns Promise + */ + public getEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest): Promise; + + /** + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + */ + public listEnvironments(request: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.ListEnvironmentsCallback): void; + + /** + * Calls ListEnvironments. + * @param request ListEnvironmentsRequest message or plain object + * @returns Promise + */ + public listEnvironments(request: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest): Promise; + + /** + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public updateEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateEnvironmentCallback): void; + + /** + * Calls UpdateEnvironment. + * @param request UpdateEnvironmentRequest message or plain object + * @returns Promise + */ + public updateEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest): Promise; + + /** + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public deleteEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteEnvironmentCallback): void; + + /** + * Calls DeleteEnvironment. + * @param request DeleteEnvironmentRequest message or plain object + * @returns Promise + */ + public deleteEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest): Promise; + + /** + * Calls RestartWebServer. + * @param request RestartWebServerRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public restartWebServer(request: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.RestartWebServerCallback): void; + + /** + * Calls RestartWebServer. + * @param request RestartWebServerRequest message or plain object + * @returns Promise + */ + public restartWebServer(request: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest): Promise; + + /** + * Calls CheckUpgrade. + * @param request CheckUpgradeRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public checkUpgrade(request: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.CheckUpgradeCallback): void; + + /** + * Calls CheckUpgrade. + * @param request CheckUpgradeRequest message or plain object + * @returns Promise + */ + public checkUpgrade(request: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest): Promise; + + /** + * Calls ExecuteAirflowCommand. + * @param request ExecuteAirflowCommandRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ExecuteAirflowCommandResponse + */ + public executeAirflowCommand(request: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.ExecuteAirflowCommandCallback): void; + + /** + * Calls ExecuteAirflowCommand. + * @param request ExecuteAirflowCommandRequest message or plain object + * @returns Promise + */ + public executeAirflowCommand(request: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest): Promise; + + /** + * Calls StopAirflowCommand. + * @param request StopAirflowCommandRequest message or plain object + * @param callback Node-style callback called with the error, if any, and StopAirflowCommandResponse + */ + public stopAirflowCommand(request: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.StopAirflowCommandCallback): void; + + /** + * Calls StopAirflowCommand. + * @param request StopAirflowCommandRequest message or plain object + * @returns Promise + */ + public stopAirflowCommand(request: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest): Promise; + + /** + * Calls PollAirflowCommand. + * @param request PollAirflowCommandRequest message or plain object + * @param callback Node-style callback called with the error, if any, and PollAirflowCommandResponse + */ + public pollAirflowCommand(request: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.PollAirflowCommandCallback): void; + + /** + * Calls PollAirflowCommand. + * @param request PollAirflowCommandRequest message or plain object + * @returns Promise + */ + public pollAirflowCommand(request: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest): Promise; + + /** + * Calls ListWorkloads. + * @param request ListWorkloadsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListWorkloadsResponse + */ + public listWorkloads(request: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.ListWorkloadsCallback): void; + + /** + * Calls ListWorkloads. + * @param request ListWorkloadsRequest message or plain object + * @returns Promise + */ + public listWorkloads(request: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest): Promise; + + /** + * Calls CreateUserWorkloadsSecret. + * @param request CreateUserWorkloadsSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserWorkloadsSecret + */ + public createUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateUserWorkloadsSecretCallback): void; + + /** + * Calls CreateUserWorkloadsSecret. + * @param request CreateUserWorkloadsSecretRequest message or plain object + * @returns Promise + */ + public createUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest): Promise; + + /** + * Calls GetUserWorkloadsSecret. + * @param request GetUserWorkloadsSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserWorkloadsSecret + */ + public getUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.GetUserWorkloadsSecretCallback): void; + + /** + * Calls GetUserWorkloadsSecret. + * @param request GetUserWorkloadsSecretRequest message or plain object + * @returns Promise + */ + public getUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest): Promise; + + /** + * Calls ListUserWorkloadsSecrets. + * @param request ListUserWorkloadsSecretsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUserWorkloadsSecretsResponse + */ + public listUserWorkloadsSecrets(request: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.ListUserWorkloadsSecretsCallback): void; + + /** + * Calls ListUserWorkloadsSecrets. + * @param request ListUserWorkloadsSecretsRequest message or plain object + * @returns Promise + */ + public listUserWorkloadsSecrets(request: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest): Promise; + + /** + * Calls UpdateUserWorkloadsSecret. + * @param request UpdateUserWorkloadsSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserWorkloadsSecret + */ + public updateUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateUserWorkloadsSecretCallback): void; + + /** + * Calls UpdateUserWorkloadsSecret. + * @param request UpdateUserWorkloadsSecretRequest message or plain object + * @returns Promise + */ + public updateUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest): Promise; + + /** + * Calls DeleteUserWorkloadsSecret. + * @param request DeleteUserWorkloadsSecretRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteUserWorkloadsSecretCallback): void; + + /** + * Calls DeleteUserWorkloadsSecret. + * @param request DeleteUserWorkloadsSecretRequest message or plain object + * @returns Promise + */ + public deleteUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest): Promise; + + /** + * Calls CreateUserWorkloadsConfigMap. + * @param request CreateUserWorkloadsConfigMapRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap + */ + public createUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateUserWorkloadsConfigMapCallback): void; + + /** + * Calls CreateUserWorkloadsConfigMap. + * @param request CreateUserWorkloadsConfigMapRequest message or plain object + * @returns Promise + */ + public createUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest): Promise; + + /** + * Calls GetUserWorkloadsConfigMap. + * @param request GetUserWorkloadsConfigMapRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap + */ + public getUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.GetUserWorkloadsConfigMapCallback): void; + + /** + * Calls GetUserWorkloadsConfigMap. + * @param request GetUserWorkloadsConfigMapRequest message or plain object + * @returns Promise + */ + public getUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest): Promise; + + /** + * Calls ListUserWorkloadsConfigMaps. + * @param request ListUserWorkloadsConfigMapsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListUserWorkloadsConfigMapsResponse + */ + public listUserWorkloadsConfigMaps(request: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.ListUserWorkloadsConfigMapsCallback): void; + + /** + * Calls ListUserWorkloadsConfigMaps. + * @param request ListUserWorkloadsConfigMapsRequest message or plain object + * @returns Promise + */ + public listUserWorkloadsConfigMaps(request: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest): Promise; + + /** + * Calls UpdateUserWorkloadsConfigMap. + * @param request UpdateUserWorkloadsConfigMapRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap + */ + public updateUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateUserWorkloadsConfigMapCallback): void; + + /** + * Calls UpdateUserWorkloadsConfigMap. + * @param request UpdateUserWorkloadsConfigMapRequest message or plain object + * @returns Promise + */ + public updateUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest): Promise; + + /** + * Calls DeleteUserWorkloadsConfigMap. + * @param request DeleteUserWorkloadsConfigMapRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteUserWorkloadsConfigMapCallback): void; + + /** + * Calls DeleteUserWorkloadsConfigMap. + * @param request DeleteUserWorkloadsConfigMapRequest message or plain object + * @returns Promise + */ + public deleteUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest): Promise; + + /** + * Calls SaveSnapshot. + * @param request SaveSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public saveSnapshot(request: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.SaveSnapshotCallback): void; + + /** + * Calls SaveSnapshot. + * @param request SaveSnapshotRequest message or plain object + * @returns Promise + */ + public saveSnapshot(request: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest): Promise; + + /** + * Calls LoadSnapshot. + * @param request LoadSnapshotRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public loadSnapshot(request: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.LoadSnapshotCallback): void; + + /** + * Calls LoadSnapshot. + * @param request LoadSnapshotRequest message or plain object + * @returns Promise + */ + public loadSnapshot(request: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest): Promise; + + /** + * Calls DatabaseFailover. + * @param request DatabaseFailoverRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public databaseFailover(request: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.DatabaseFailoverCallback): void; + + /** + * Calls DatabaseFailover. + * @param request DatabaseFailoverRequest message or plain object + * @returns Promise + */ + public databaseFailover(request: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest): Promise; + + /** + * Calls FetchDatabaseProperties. + * @param request FetchDatabasePropertiesRequest message or plain object + * @param callback Node-style callback called with the error, if any, and FetchDatabasePropertiesResponse + */ + public fetchDatabaseProperties(request: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.FetchDatabasePropertiesCallback): void; + + /** + * Calls FetchDatabaseProperties. + * @param request FetchDatabasePropertiesRequest message or plain object + * @returns Promise + */ + public fetchDatabaseProperties(request: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest): Promise; + } + + namespace Environments { + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|createEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type CreateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|getEnvironment}. + * @param error Error, if any + * @param [response] Environment + */ + type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.Environment) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listEnvironments}. + * @param error Error, if any + * @param [response] ListEnvironmentsResponse + */ + type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|updateEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type UpdateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|deleteEnvironment}. + * @param error Error, if any + * @param [response] Operation + */ + type DeleteEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|restartWebServer}. + * @param error Error, if any + * @param [response] Operation + */ + type RestartWebServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|checkUpgrade}. + * @param error Error, if any + * @param [response] Operation + */ + type CheckUpgradeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|executeAirflowCommand}. + * @param error Error, if any + * @param [response] ExecuteAirflowCommandResponse + */ + type ExecuteAirflowCommandCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|stopAirflowCommand}. + * @param error Error, if any + * @param [response] StopAirflowCommandResponse + */ + type StopAirflowCommandCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|pollAirflowCommand}. + * @param error Error, if any + * @param [response] PollAirflowCommandResponse + */ + type PollAirflowCommandCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listWorkloads}. + * @param error Error, if any + * @param [response] ListWorkloadsResponse + */ + type ListWorkloadsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|createUserWorkloadsSecret}. + * @param error Error, if any + * @param [response] UserWorkloadsSecret + */ + type CreateUserWorkloadsSecretCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|getUserWorkloadsSecret}. + * @param error Error, if any + * @param [response] UserWorkloadsSecret + */ + type GetUserWorkloadsSecretCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listUserWorkloadsSecrets}. + * @param error Error, if any + * @param [response] ListUserWorkloadsSecretsResponse + */ + type ListUserWorkloadsSecretsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|updateUserWorkloadsSecret}. + * @param error Error, if any + * @param [response] UserWorkloadsSecret + */ + type UpdateUserWorkloadsSecretCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|deleteUserWorkloadsSecret}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteUserWorkloadsSecretCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|createUserWorkloadsConfigMap}. + * @param error Error, if any + * @param [response] UserWorkloadsConfigMap + */ + type CreateUserWorkloadsConfigMapCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|getUserWorkloadsConfigMap}. + * @param error Error, if any + * @param [response] UserWorkloadsConfigMap + */ + type GetUserWorkloadsConfigMapCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listUserWorkloadsConfigMaps}. + * @param error Error, if any + * @param [response] ListUserWorkloadsConfigMapsResponse + */ + type ListUserWorkloadsConfigMapsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|updateUserWorkloadsConfigMap}. + * @param error Error, if any + * @param [response] UserWorkloadsConfigMap + */ + type UpdateUserWorkloadsConfigMapCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|deleteUserWorkloadsConfigMap}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteUserWorkloadsConfigMapCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|saveSnapshot}. + * @param error Error, if any + * @param [response] Operation + */ + type SaveSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|loadSnapshot}. + * @param error Error, if any + * @param [response] Operation + */ + type LoadSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|databaseFailover}. + * @param error Error, if any + * @param [response] Operation + */ + type DatabaseFailoverCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|fetchDatabaseProperties}. + * @param error Error, if any + * @param [response] FetchDatabasePropertiesResponse + */ + type FetchDatabasePropertiesCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse) => void; + } + + /** Properties of a CreateEnvironmentRequest. */ + interface ICreateEnvironmentRequest { + + /** CreateEnvironmentRequest parent */ + parent?: (string|null); + + /** CreateEnvironmentRequest environment */ + environment?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null); + } + + /** Represents a CreateEnvironmentRequest. */ + class CreateEnvironmentRequest implements ICreateEnvironmentRequest { + + /** + * Constructs a new CreateEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest); + + /** CreateEnvironmentRequest parent. */ + public parent: string; + + /** CreateEnvironmentRequest environment. */ + public environment?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null); + + /** + * Creates a new CreateEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateEnvironmentRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest): google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; + + /** + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.verify|verify} messages. + * @param message CreateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.verify|verify} messages. + * @param message CreateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; + + /** + * Verifies a CreateEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; + + /** + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * @param message CreateEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetEnvironmentRequest. */ + interface IGetEnvironmentRequest { + + /** GetEnvironmentRequest name */ + name?: (string|null); + } + + /** Represents a GetEnvironmentRequest. */ + class GetEnvironmentRequest implements IGetEnvironmentRequest { + + /** + * Constructs a new GetEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest); + + /** GetEnvironmentRequest name. */ + public name: string; + + /** + * Creates a new GetEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetEnvironmentRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest): google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; + + /** + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.verify|verify} messages. + * @param message GetEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; + + /** + * Verifies a GetEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; + + /** + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @param message GetEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEnvironmentsRequest. */ + interface IListEnvironmentsRequest { + + /** ListEnvironmentsRequest parent */ + parent?: (string|null); + + /** ListEnvironmentsRequest pageSize */ + pageSize?: (number|null); + + /** ListEnvironmentsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListEnvironmentsRequest. */ + class ListEnvironmentsRequest implements IListEnvironmentsRequest { + + /** + * Constructs a new ListEnvironmentsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest); + + /** ListEnvironmentsRequest parent. */ + public parent: string; + + /** ListEnvironmentsRequest pageSize. */ + public pageSize: number; + + /** ListEnvironmentsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListEnvironmentsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEnvironmentsRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; + + /** + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.verify|verify} messages. + * @param message ListEnvironmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.verify|verify} messages. + * @param message ListEnvironmentsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; + + /** + * Verifies a ListEnvironmentsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEnvironmentsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; + + /** + * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * @param message ListEnvironmentsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEnvironmentsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEnvironmentsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListEnvironmentsResponse. */ + interface IListEnvironmentsResponse { + + /** ListEnvironmentsResponse environments */ + environments?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[]|null); + + /** ListEnvironmentsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListEnvironmentsResponse. */ + class ListEnvironmentsResponse implements IListEnvironmentsResponse { + + /** + * Constructs a new ListEnvironmentsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse); + + /** ListEnvironmentsResponse environments. */ + public environments: google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[]; + + /** ListEnvironmentsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListEnvironmentsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListEnvironmentsResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; + + /** + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.verify|verify} messages. + * @param message ListEnvironmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.verify|verify} messages. + * @param message ListEnvironmentsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; + + /** + * Verifies a ListEnvironmentsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListEnvironmentsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; + + /** + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * @param message ListEnvironmentsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListEnvironmentsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListEnvironmentsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteEnvironmentRequest. */ + interface IDeleteEnvironmentRequest { + + /** DeleteEnvironmentRequest name */ + name?: (string|null); + } + + /** Represents a DeleteEnvironmentRequest. */ + class DeleteEnvironmentRequest implements IDeleteEnvironmentRequest { + + /** + * Constructs a new DeleteEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest); + + /** DeleteEnvironmentRequest name. */ + public name: string; + + /** + * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteEnvironmentRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest): google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; + + /** + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.verify|verify} messages. + * @param message DeleteEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.verify|verify} messages. + * @param message DeleteEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; + + /** + * Verifies a DeleteEnvironmentRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; + + /** + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * @param message DeleteEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateEnvironmentRequest. */ + interface IUpdateEnvironmentRequest { + + /** UpdateEnvironmentRequest name */ + name?: (string|null); + + /** UpdateEnvironmentRequest environment */ + environment?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null); + + /** UpdateEnvironmentRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateEnvironmentRequest. */ + class UpdateEnvironmentRequest implements IUpdateEnvironmentRequest { + + /** + * Constructs a new UpdateEnvironmentRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest); + + /** UpdateEnvironmentRequest name. */ + public name: string; + + /** UpdateEnvironmentRequest environment. */ + public environment?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null); + + /** UpdateEnvironmentRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateEnvironmentRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest): google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; + + /** + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.verify|verify} messages. + * @param message UpdateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.verify|verify} messages. + * @param message UpdateEnvironmentRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; + + /** + * Verifies an UpdateEnvironmentRequest message. + * @param message Plain 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 UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateEnvironmentRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; + + /** + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * @param message UpdateEnvironmentRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateEnvironmentRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateEnvironmentRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RestartWebServerRequest. */ + interface IRestartWebServerRequest { + + /** RestartWebServerRequest name */ + name?: (string|null); + } + + /** Represents a RestartWebServerRequest. */ + class RestartWebServerRequest implements IRestartWebServerRequest { + + /** + * Constructs a new RestartWebServerRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest); + + /** RestartWebServerRequest name. */ + public name: string; + + /** + * Creates a new RestartWebServerRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns RestartWebServerRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest): google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; + + /** + * Encodes the specified RestartWebServerRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.verify|verify} messages. + * @param message RestartWebServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RestartWebServerRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.verify|verify} messages. + * @param message RestartWebServerRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RestartWebServerRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RestartWebServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; + + /** + * Decodes a RestartWebServerRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RestartWebServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; + + /** + * Verifies a RestartWebServerRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RestartWebServerRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RestartWebServerRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; + + /** + * Creates a plain object from a RestartWebServerRequest message. Also converts values to other types if specified. + * @param message RestartWebServerRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RestartWebServerRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RestartWebServerRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteAirflowCommandRequest. */ + interface IExecuteAirflowCommandRequest { + + /** ExecuteAirflowCommandRequest environment */ + environment?: (string|null); + + /** ExecuteAirflowCommandRequest command */ + command?: (string|null); + + /** ExecuteAirflowCommandRequest subcommand */ + subcommand?: (string|null); + + /** ExecuteAirflowCommandRequest parameters */ + parameters?: (string[]|null); + } + + /** Represents an ExecuteAirflowCommandRequest. */ + class ExecuteAirflowCommandRequest implements IExecuteAirflowCommandRequest { + + /** + * Constructs a new ExecuteAirflowCommandRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest); + + /** ExecuteAirflowCommandRequest environment. */ + public environment: string; + + /** ExecuteAirflowCommandRequest command. */ + public command: string; + + /** ExecuteAirflowCommandRequest subcommand. */ + public subcommand: string; + + /** ExecuteAirflowCommandRequest parameters. */ + public parameters: string[]; + + /** + * Creates a new ExecuteAirflowCommandRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteAirflowCommandRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest): google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest; + + /** + * Encodes the specified ExecuteAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest.verify|verify} messages. + * @param message ExecuteAirflowCommandRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest.verify|verify} messages. + * @param message ExecuteAirflowCommandRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteAirflowCommandRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest; + + /** + * Decodes an ExecuteAirflowCommandRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest; + + /** + * Verifies an ExecuteAirflowCommandRequest message. + * @param message Plain 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 ExecuteAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteAirflowCommandRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest; + + /** + * Creates a plain object from an ExecuteAirflowCommandRequest message. Also converts values to other types if specified. + * @param message ExecuteAirflowCommandRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteAirflowCommandRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteAirflowCommandRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExecuteAirflowCommandResponse. */ + interface IExecuteAirflowCommandResponse { + + /** ExecuteAirflowCommandResponse executionId */ + executionId?: (string|null); + + /** ExecuteAirflowCommandResponse pod */ + pod?: (string|null); + + /** ExecuteAirflowCommandResponse podNamespace */ + podNamespace?: (string|null); + + /** ExecuteAirflowCommandResponse error */ + error?: (string|null); + } + + /** Represents an ExecuteAirflowCommandResponse. */ + class ExecuteAirflowCommandResponse implements IExecuteAirflowCommandResponse { + + /** + * Constructs a new ExecuteAirflowCommandResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse); + + /** ExecuteAirflowCommandResponse executionId. */ + public executionId: string; + + /** ExecuteAirflowCommandResponse pod. */ + public pod: string; + + /** ExecuteAirflowCommandResponse podNamespace. */ + public podNamespace: string; + + /** ExecuteAirflowCommandResponse error. */ + public error: string; + + /** + * Creates a new ExecuteAirflowCommandResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ExecuteAirflowCommandResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse): google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse; + + /** + * Encodes the specified ExecuteAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse.verify|verify} messages. + * @param message ExecuteAirflowCommandResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExecuteAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse.verify|verify} messages. + * @param message ExecuteAirflowCommandResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExecuteAirflowCommandResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExecuteAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse; + + /** + * Decodes an ExecuteAirflowCommandResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExecuteAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse; + + /** + * Verifies an ExecuteAirflowCommandResponse message. + * @param message Plain 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 ExecuteAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExecuteAirflowCommandResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse; + + /** + * Creates a plain object from an ExecuteAirflowCommandResponse message. Also converts values to other types if specified. + * @param message ExecuteAirflowCommandResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExecuteAirflowCommandResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExecuteAirflowCommandResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StopAirflowCommandRequest. */ + interface IStopAirflowCommandRequest { + + /** StopAirflowCommandRequest environment */ + environment?: (string|null); + + /** StopAirflowCommandRequest executionId */ + executionId?: (string|null); + + /** StopAirflowCommandRequest pod */ + pod?: (string|null); + + /** StopAirflowCommandRequest podNamespace */ + podNamespace?: (string|null); + + /** StopAirflowCommandRequest force */ + force?: (boolean|null); + } + + /** Represents a StopAirflowCommandRequest. */ + class StopAirflowCommandRequest implements IStopAirflowCommandRequest { + + /** + * Constructs a new StopAirflowCommandRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest); + + /** StopAirflowCommandRequest environment. */ + public environment: string; + + /** StopAirflowCommandRequest executionId. */ + public executionId: string; + + /** StopAirflowCommandRequest pod. */ + public pod: string; + + /** StopAirflowCommandRequest podNamespace. */ + public podNamespace: string; + + /** StopAirflowCommandRequest force. */ + public force: boolean; + + /** + * Creates a new StopAirflowCommandRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StopAirflowCommandRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest): google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest; + + /** + * Encodes the specified StopAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest.verify|verify} messages. + * @param message StopAirflowCommandRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StopAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest.verify|verify} messages. + * @param message StopAirflowCommandRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StopAirflowCommandRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StopAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest; + + /** + * Decodes a StopAirflowCommandRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StopAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest; + + /** + * Verifies a StopAirflowCommandRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StopAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StopAirflowCommandRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest; + + /** + * Creates a plain object from a StopAirflowCommandRequest message. Also converts values to other types if specified. + * @param message StopAirflowCommandRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StopAirflowCommandRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StopAirflowCommandRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StopAirflowCommandResponse. */ + interface IStopAirflowCommandResponse { + + /** StopAirflowCommandResponse isDone */ + isDone?: (boolean|null); + + /** StopAirflowCommandResponse output */ + output?: (string[]|null); + } + + /** Represents a StopAirflowCommandResponse. */ + class StopAirflowCommandResponse implements IStopAirflowCommandResponse { + + /** + * Constructs a new StopAirflowCommandResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse); + + /** StopAirflowCommandResponse isDone. */ + public isDone: boolean; + + /** StopAirflowCommandResponse output. */ + public output: string[]; + + /** + * Creates a new StopAirflowCommandResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns StopAirflowCommandResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse): google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse; + + /** + * Encodes the specified StopAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse.verify|verify} messages. + * @param message StopAirflowCommandResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StopAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse.verify|verify} messages. + * @param message StopAirflowCommandResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StopAirflowCommandResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StopAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse; + + /** + * Decodes a StopAirflowCommandResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StopAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse; + + /** + * Verifies a StopAirflowCommandResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StopAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StopAirflowCommandResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse; + + /** + * Creates a plain object from a StopAirflowCommandResponse message. Also converts values to other types if specified. + * @param message StopAirflowCommandResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StopAirflowCommandResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StopAirflowCommandResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PollAirflowCommandRequest. */ + interface IPollAirflowCommandRequest { + + /** PollAirflowCommandRequest environment */ + environment?: (string|null); + + /** PollAirflowCommandRequest executionId */ + executionId?: (string|null); + + /** PollAirflowCommandRequest pod */ + pod?: (string|null); + + /** PollAirflowCommandRequest podNamespace */ + podNamespace?: (string|null); + + /** PollAirflowCommandRequest nextLineNumber */ + nextLineNumber?: (number|null); + } + + /** Represents a PollAirflowCommandRequest. */ + class PollAirflowCommandRequest implements IPollAirflowCommandRequest { + + /** + * Constructs a new PollAirflowCommandRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest); + + /** PollAirflowCommandRequest environment. */ + public environment: string; + + /** PollAirflowCommandRequest executionId. */ + public executionId: string; + + /** PollAirflowCommandRequest pod. */ + public pod: string; + + /** PollAirflowCommandRequest podNamespace. */ + public podNamespace: string; + + /** PollAirflowCommandRequest nextLineNumber. */ + public nextLineNumber: number; + + /** + * Creates a new PollAirflowCommandRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PollAirflowCommandRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest; + + /** + * Encodes the specified PollAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest.verify|verify} messages. + * @param message PollAirflowCommandRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest.verify|verify} messages. + * @param message PollAirflowCommandRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollAirflowCommandRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest; + + /** + * Decodes a PollAirflowCommandRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest; + + /** + * Verifies a PollAirflowCommandRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PollAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollAirflowCommandRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest; + + /** + * Creates a plain object from a PollAirflowCommandRequest message. Also converts values to other types if specified. + * @param message PollAirflowCommandRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollAirflowCommandRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollAirflowCommandRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PollAirflowCommandResponse. */ + interface IPollAirflowCommandResponse { + + /** PollAirflowCommandResponse output */ + output?: (google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine[]|null); + + /** PollAirflowCommandResponse outputEnd */ + outputEnd?: (boolean|null); + + /** PollAirflowCommandResponse exitInfo */ + exitInfo?: (google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo|null); + } + + /** Represents a PollAirflowCommandResponse. */ + class PollAirflowCommandResponse implements IPollAirflowCommandResponse { + + /** + * Constructs a new PollAirflowCommandResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse); + + /** PollAirflowCommandResponse output. */ + public output: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine[]; + + /** PollAirflowCommandResponse outputEnd. */ + public outputEnd: boolean; + + /** PollAirflowCommandResponse exitInfo. */ + public exitInfo?: (google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo|null); + + /** + * Creates a new PollAirflowCommandResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns PollAirflowCommandResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse; + + /** + * Encodes the specified PollAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.verify|verify} messages. + * @param message PollAirflowCommandResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PollAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.verify|verify} messages. + * @param message PollAirflowCommandResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PollAirflowCommandResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PollAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse; + + /** + * Decodes a PollAirflowCommandResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PollAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse; + + /** + * Verifies a PollAirflowCommandResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PollAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PollAirflowCommandResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse; + + /** + * Creates a plain object from a PollAirflowCommandResponse message. Also converts values to other types if specified. + * @param message PollAirflowCommandResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PollAirflowCommandResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PollAirflowCommandResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PollAirflowCommandResponse { + + /** Properties of a Line. */ + interface ILine { + + /** Line lineNumber */ + lineNumber?: (number|null); + + /** Line content */ + content?: (string|null); + } + + /** Represents a Line. */ + class Line implements ILine { + + /** + * Constructs a new Line. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine); + + /** Line lineNumber. */ + public lineNumber: number; + + /** Line content. */ + public content: string; + + /** + * Creates a new Line instance using the specified properties. + * @param [properties] Properties to set + * @returns Line instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line; + + /** + * Encodes the specified Line message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.verify|verify} messages. + * @param message Line message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Line message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.verify|verify} messages. + * @param message Line message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Line message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Line + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line; + + /** + * Decodes a Line message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Line + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line; + + /** + * Verifies a Line message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Line message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Line + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line; + + /** + * Creates a plain object from a Line message. Also converts values to other types if specified. + * @param message Line + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Line to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Line + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ExitInfo. */ + interface IExitInfo { + + /** ExitInfo exitCode */ + exitCode?: (number|null); + + /** ExitInfo error */ + error?: (string|null); + } + + /** Represents an ExitInfo. */ + class ExitInfo implements IExitInfo { + + /** + * Constructs a new ExitInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo); + + /** ExitInfo exitCode. */ + public exitCode: number; + + /** ExitInfo error. */ + public error: string; + + /** + * Creates a new ExitInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ExitInfo instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo; + + /** + * Encodes the specified ExitInfo message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.verify|verify} messages. + * @param message ExitInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExitInfo message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.verify|verify} messages. + * @param message ExitInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExitInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo; + + /** + * Decodes an ExitInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo; + + /** + * Verifies an ExitInfo message. + * @param message Plain 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 ExitInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExitInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo; + + /** + * Creates a plain object from an ExitInfo message. Also converts values to other types if specified. + * @param message ExitInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExitInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExitInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CreateUserWorkloadsSecretRequest. */ + interface ICreateUserWorkloadsSecretRequest { + + /** CreateUserWorkloadsSecretRequest parent */ + parent?: (string|null); + + /** CreateUserWorkloadsSecretRequest userWorkloadsSecret */ + userWorkloadsSecret?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null); + } + + /** Represents a CreateUserWorkloadsSecretRequest. */ + class CreateUserWorkloadsSecretRequest implements ICreateUserWorkloadsSecretRequest { + + /** + * Constructs a new CreateUserWorkloadsSecretRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest); + + /** CreateUserWorkloadsSecretRequest parent. */ + public parent: string; + + /** CreateUserWorkloadsSecretRequest userWorkloadsSecret. */ + public userWorkloadsSecret?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null); + + /** + * Creates a new CreateUserWorkloadsSecretRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserWorkloadsSecretRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest): google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest; + + /** + * Encodes the specified CreateUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest.verify|verify} messages. + * @param message CreateUserWorkloadsSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest.verify|verify} messages. + * @param message CreateUserWorkloadsSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserWorkloadsSecretRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest; + + /** + * Decodes a CreateUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest; + + /** + * Verifies a CreateUserWorkloadsSecretRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserWorkloadsSecretRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest; + + /** + * Creates a plain object from a CreateUserWorkloadsSecretRequest message. Also converts values to other types if specified. + * @param message CreateUserWorkloadsSecretRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserWorkloadsSecretRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserWorkloadsSecretRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetUserWorkloadsSecretRequest. */ + interface IGetUserWorkloadsSecretRequest { + + /** GetUserWorkloadsSecretRequest name */ + name?: (string|null); + } + + /** Represents a GetUserWorkloadsSecretRequest. */ + class GetUserWorkloadsSecretRequest implements IGetUserWorkloadsSecretRequest { + + /** + * Constructs a new GetUserWorkloadsSecretRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest); + + /** GetUserWorkloadsSecretRequest name. */ + public name: string; + + /** + * Creates a new GetUserWorkloadsSecretRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetUserWorkloadsSecretRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest): google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest; + + /** + * Encodes the specified GetUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest.verify|verify} messages. + * @param message GetUserWorkloadsSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest.verify|verify} messages. + * @param message GetUserWorkloadsSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetUserWorkloadsSecretRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest; + + /** + * Decodes a GetUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest; + + /** + * Verifies a GetUserWorkloadsSecretRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetUserWorkloadsSecretRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest; + + /** + * Creates a plain object from a GetUserWorkloadsSecretRequest message. Also converts values to other types if specified. + * @param message GetUserWorkloadsSecretRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetUserWorkloadsSecretRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetUserWorkloadsSecretRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserWorkloadsSecretsRequest. */ + interface IListUserWorkloadsSecretsRequest { + + /** ListUserWorkloadsSecretsRequest parent */ + parent?: (string|null); + + /** ListUserWorkloadsSecretsRequest pageSize */ + pageSize?: (number|null); + + /** ListUserWorkloadsSecretsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListUserWorkloadsSecretsRequest. */ + class ListUserWorkloadsSecretsRequest implements IListUserWorkloadsSecretsRequest { + + /** + * Constructs a new ListUserWorkloadsSecretsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest); + + /** ListUserWorkloadsSecretsRequest parent. */ + public parent: string; + + /** ListUserWorkloadsSecretsRequest pageSize. */ + public pageSize: number; + + /** ListUserWorkloadsSecretsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListUserWorkloadsSecretsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserWorkloadsSecretsRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest; + + /** + * Encodes the specified ListUserWorkloadsSecretsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest.verify|verify} messages. + * @param message ListUserWorkloadsSecretsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserWorkloadsSecretsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest.verify|verify} messages. + * @param message ListUserWorkloadsSecretsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserWorkloadsSecretsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserWorkloadsSecretsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest; + + /** + * Decodes a ListUserWorkloadsSecretsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserWorkloadsSecretsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest; + + /** + * Verifies a ListUserWorkloadsSecretsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserWorkloadsSecretsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserWorkloadsSecretsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest; + + /** + * Creates a plain object from a ListUserWorkloadsSecretsRequest message. Also converts values to other types if specified. + * @param message ListUserWorkloadsSecretsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserWorkloadsSecretsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserWorkloadsSecretsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateUserWorkloadsSecretRequest. */ + interface IUpdateUserWorkloadsSecretRequest { + + /** UpdateUserWorkloadsSecretRequest userWorkloadsSecret */ + userWorkloadsSecret?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null); + } + + /** Represents an UpdateUserWorkloadsSecretRequest. */ + class UpdateUserWorkloadsSecretRequest implements IUpdateUserWorkloadsSecretRequest { + + /** + * Constructs a new UpdateUserWorkloadsSecretRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest); + + /** UpdateUserWorkloadsSecretRequest userWorkloadsSecret. */ + public userWorkloadsSecret?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null); + + /** + * Creates a new UpdateUserWorkloadsSecretRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserWorkloadsSecretRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest): google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest; + + /** + * Encodes the specified UpdateUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest.verify|verify} messages. + * @param message UpdateUserWorkloadsSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest.verify|verify} messages. + * @param message UpdateUserWorkloadsSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserWorkloadsSecretRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest; + + /** + * Decodes an UpdateUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest; + + /** + * Verifies an UpdateUserWorkloadsSecretRequest message. + * @param message Plain 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 UpdateUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserWorkloadsSecretRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest; + + /** + * Creates a plain object from an UpdateUserWorkloadsSecretRequest message. Also converts values to other types if specified. + * @param message UpdateUserWorkloadsSecretRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserWorkloadsSecretRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserWorkloadsSecretRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteUserWorkloadsSecretRequest. */ + interface IDeleteUserWorkloadsSecretRequest { + + /** DeleteUserWorkloadsSecretRequest name */ + name?: (string|null); + } + + /** Represents a DeleteUserWorkloadsSecretRequest. */ + class DeleteUserWorkloadsSecretRequest implements IDeleteUserWorkloadsSecretRequest { + + /** + * Constructs a new DeleteUserWorkloadsSecretRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest); + + /** DeleteUserWorkloadsSecretRequest name. */ + public name: string; + + /** + * Creates a new DeleteUserWorkloadsSecretRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteUserWorkloadsSecretRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest): google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest; + + /** + * Encodes the specified DeleteUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest.verify|verify} messages. + * @param message DeleteUserWorkloadsSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest.verify|verify} messages. + * @param message DeleteUserWorkloadsSecretRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteUserWorkloadsSecretRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest; + + /** + * Decodes a DeleteUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest; + + /** + * Verifies a DeleteUserWorkloadsSecretRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteUserWorkloadsSecretRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest; + + /** + * Creates a plain object from a DeleteUserWorkloadsSecretRequest message. Also converts values to other types if specified. + * @param message DeleteUserWorkloadsSecretRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteUserWorkloadsSecretRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteUserWorkloadsSecretRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateUserWorkloadsConfigMapRequest. */ + interface ICreateUserWorkloadsConfigMapRequest { + + /** CreateUserWorkloadsConfigMapRequest parent */ + parent?: (string|null); + + /** CreateUserWorkloadsConfigMapRequest userWorkloadsConfigMap */ + userWorkloadsConfigMap?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null); + } + + /** Represents a CreateUserWorkloadsConfigMapRequest. */ + class CreateUserWorkloadsConfigMapRequest implements ICreateUserWorkloadsConfigMapRequest { + + /** + * Constructs a new CreateUserWorkloadsConfigMapRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest); + + /** CreateUserWorkloadsConfigMapRequest parent. */ + public parent: string; + + /** CreateUserWorkloadsConfigMapRequest userWorkloadsConfigMap. */ + public userWorkloadsConfigMap?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null); + + /** + * Creates a new CreateUserWorkloadsConfigMapRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateUserWorkloadsConfigMapRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest): google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest; + + /** + * Encodes the specified CreateUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest.verify|verify} messages. + * @param message CreateUserWorkloadsConfigMapRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest.verify|verify} messages. + * @param message CreateUserWorkloadsConfigMapRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateUserWorkloadsConfigMapRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest; + + /** + * Decodes a CreateUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest; + + /** + * Verifies a CreateUserWorkloadsConfigMapRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateUserWorkloadsConfigMapRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest; + + /** + * Creates a plain object from a CreateUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. + * @param message CreateUserWorkloadsConfigMapRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateUserWorkloadsConfigMapRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateUserWorkloadsConfigMapRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetUserWorkloadsConfigMapRequest. */ + interface IGetUserWorkloadsConfigMapRequest { + + /** GetUserWorkloadsConfigMapRequest name */ + name?: (string|null); + } + + /** Represents a GetUserWorkloadsConfigMapRequest. */ + class GetUserWorkloadsConfigMapRequest implements IGetUserWorkloadsConfigMapRequest { + + /** + * Constructs a new GetUserWorkloadsConfigMapRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest); + + /** GetUserWorkloadsConfigMapRequest name. */ + public name: string; + + /** + * Creates a new GetUserWorkloadsConfigMapRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetUserWorkloadsConfigMapRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest): google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest; + + /** + * Encodes the specified GetUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest.verify|verify} messages. + * @param message GetUserWorkloadsConfigMapRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest.verify|verify} messages. + * @param message GetUserWorkloadsConfigMapRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetUserWorkloadsConfigMapRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest; + + /** + * Decodes a GetUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest; + + /** + * Verifies a GetUserWorkloadsConfigMapRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetUserWorkloadsConfigMapRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest; + + /** + * Creates a plain object from a GetUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. + * @param message GetUserWorkloadsConfigMapRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetUserWorkloadsConfigMapRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetUserWorkloadsConfigMapRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserWorkloadsConfigMapsRequest. */ + interface IListUserWorkloadsConfigMapsRequest { + + /** ListUserWorkloadsConfigMapsRequest parent */ + parent?: (string|null); + + /** ListUserWorkloadsConfigMapsRequest pageSize */ + pageSize?: (number|null); + + /** ListUserWorkloadsConfigMapsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListUserWorkloadsConfigMapsRequest. */ + class ListUserWorkloadsConfigMapsRequest implements IListUserWorkloadsConfigMapsRequest { + + /** + * Constructs a new ListUserWorkloadsConfigMapsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest); + + /** ListUserWorkloadsConfigMapsRequest parent. */ + public parent: string; + + /** ListUserWorkloadsConfigMapsRequest pageSize. */ + public pageSize: number; + + /** ListUserWorkloadsConfigMapsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListUserWorkloadsConfigMapsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserWorkloadsConfigMapsRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest; + + /** + * Encodes the specified ListUserWorkloadsConfigMapsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest.verify|verify} messages. + * @param message ListUserWorkloadsConfigMapsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserWorkloadsConfigMapsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest.verify|verify} messages. + * @param message ListUserWorkloadsConfigMapsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserWorkloadsConfigMapsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserWorkloadsConfigMapsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest; + + /** + * Decodes a ListUserWorkloadsConfigMapsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserWorkloadsConfigMapsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest; + + /** + * Verifies a ListUserWorkloadsConfigMapsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserWorkloadsConfigMapsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserWorkloadsConfigMapsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest; + + /** + * Creates a plain object from a ListUserWorkloadsConfigMapsRequest message. Also converts values to other types if specified. + * @param message ListUserWorkloadsConfigMapsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserWorkloadsConfigMapsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserWorkloadsConfigMapsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateUserWorkloadsConfigMapRequest. */ + interface IUpdateUserWorkloadsConfigMapRequest { + + /** UpdateUserWorkloadsConfigMapRequest userWorkloadsConfigMap */ + userWorkloadsConfigMap?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null); + } + + /** Represents an UpdateUserWorkloadsConfigMapRequest. */ + class UpdateUserWorkloadsConfigMapRequest implements IUpdateUserWorkloadsConfigMapRequest { + + /** + * Constructs a new UpdateUserWorkloadsConfigMapRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest); + + /** UpdateUserWorkloadsConfigMapRequest userWorkloadsConfigMap. */ + public userWorkloadsConfigMap?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null); + + /** + * Creates a new UpdateUserWorkloadsConfigMapRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateUserWorkloadsConfigMapRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest): google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest; + + /** + * Encodes the specified UpdateUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest.verify|verify} messages. + * @param message UpdateUserWorkloadsConfigMapRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdateUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest.verify|verify} messages. + * @param message UpdateUserWorkloadsConfigMapRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdateUserWorkloadsConfigMapRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdateUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest; + + /** + * Decodes an UpdateUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdateUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest; + + /** + * Verifies an UpdateUserWorkloadsConfigMapRequest message. + * @param message Plain 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 UpdateUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdateUserWorkloadsConfigMapRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest; + + /** + * Creates a plain object from an UpdateUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. + * @param message UpdateUserWorkloadsConfigMapRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdateUserWorkloadsConfigMapRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdateUserWorkloadsConfigMapRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteUserWorkloadsConfigMapRequest. */ + interface IDeleteUserWorkloadsConfigMapRequest { + + /** DeleteUserWorkloadsConfigMapRequest name */ + name?: (string|null); + } + + /** Represents a DeleteUserWorkloadsConfigMapRequest. */ + class DeleteUserWorkloadsConfigMapRequest implements IDeleteUserWorkloadsConfigMapRequest { + + /** + * Constructs a new DeleteUserWorkloadsConfigMapRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest); + + /** DeleteUserWorkloadsConfigMapRequest name. */ + public name: string; + + /** + * Creates a new DeleteUserWorkloadsConfigMapRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteUserWorkloadsConfigMapRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest): google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest; + + /** + * Encodes the specified DeleteUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest.verify|verify} messages. + * @param message DeleteUserWorkloadsConfigMapRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest.verify|verify} messages. + * @param message DeleteUserWorkloadsConfigMapRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteUserWorkloadsConfigMapRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest; + + /** + * Decodes a DeleteUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest; + + /** + * Verifies a DeleteUserWorkloadsConfigMapRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteUserWorkloadsConfigMapRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest; + + /** + * Creates a plain object from a DeleteUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. + * @param message DeleteUserWorkloadsConfigMapRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteUserWorkloadsConfigMapRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteUserWorkloadsConfigMapRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserWorkloadsSecret. */ + interface IUserWorkloadsSecret { + + /** UserWorkloadsSecret name */ + name?: (string|null); + + /** UserWorkloadsSecret data */ + data?: ({ [k: string]: string }|null); + } + + /** Represents a UserWorkloadsSecret. */ + class UserWorkloadsSecret implements IUserWorkloadsSecret { + + /** + * Constructs a new UserWorkloadsSecret. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret); + + /** UserWorkloadsSecret name. */ + public name: string; + + /** UserWorkloadsSecret data. */ + public data: { [k: string]: string }; + + /** + * Creates a new UserWorkloadsSecret instance using the specified properties. + * @param [properties] Properties to set + * @returns UserWorkloadsSecret instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret): google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret; + + /** + * Encodes the specified UserWorkloadsSecret message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.verify|verify} messages. + * @param message UserWorkloadsSecret message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserWorkloadsSecret message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.verify|verify} messages. + * @param message UserWorkloadsSecret message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserWorkloadsSecret message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserWorkloadsSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret; + + /** + * Decodes a UserWorkloadsSecret message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserWorkloadsSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret; + + /** + * Verifies a UserWorkloadsSecret message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserWorkloadsSecret message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserWorkloadsSecret + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret; + + /** + * Creates a plain object from a UserWorkloadsSecret message. Also converts values to other types if specified. + * @param message UserWorkloadsSecret + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserWorkloadsSecret to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserWorkloadsSecret + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserWorkloadsSecretsResponse. */ + interface IListUserWorkloadsSecretsResponse { + + /** ListUserWorkloadsSecretsResponse userWorkloadsSecrets */ + userWorkloadsSecrets?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret[]|null); + + /** ListUserWorkloadsSecretsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListUserWorkloadsSecretsResponse. */ + class ListUserWorkloadsSecretsResponse implements IListUserWorkloadsSecretsResponse { + + /** + * Constructs a new ListUserWorkloadsSecretsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse); + + /** ListUserWorkloadsSecretsResponse userWorkloadsSecrets. */ + public userWorkloadsSecrets: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret[]; + + /** ListUserWorkloadsSecretsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListUserWorkloadsSecretsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserWorkloadsSecretsResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse; + + /** + * Encodes the specified ListUserWorkloadsSecretsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse.verify|verify} messages. + * @param message ListUserWorkloadsSecretsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserWorkloadsSecretsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse.verify|verify} messages. + * @param message ListUserWorkloadsSecretsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserWorkloadsSecretsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserWorkloadsSecretsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse; + + /** + * Decodes a ListUserWorkloadsSecretsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserWorkloadsSecretsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse; + + /** + * Verifies a ListUserWorkloadsSecretsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserWorkloadsSecretsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserWorkloadsSecretsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse; + + /** + * Creates a plain object from a ListUserWorkloadsSecretsResponse message. Also converts values to other types if specified. + * @param message ListUserWorkloadsSecretsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserWorkloadsSecretsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserWorkloadsSecretsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a UserWorkloadsConfigMap. */ + interface IUserWorkloadsConfigMap { + + /** UserWorkloadsConfigMap name */ + name?: (string|null); + + /** UserWorkloadsConfigMap data */ + data?: ({ [k: string]: string }|null); + } + + /** Represents a UserWorkloadsConfigMap. */ + class UserWorkloadsConfigMap implements IUserWorkloadsConfigMap { + + /** + * Constructs a new UserWorkloadsConfigMap. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap); + + /** UserWorkloadsConfigMap name. */ + public name: string; + + /** UserWorkloadsConfigMap data. */ + public data: { [k: string]: string }; + + /** + * Creates a new UserWorkloadsConfigMap instance using the specified properties. + * @param [properties] Properties to set + * @returns UserWorkloadsConfigMap instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap): google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap; + + /** + * Encodes the specified UserWorkloadsConfigMap message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.verify|verify} messages. + * @param message UserWorkloadsConfigMap message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserWorkloadsConfigMap message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.verify|verify} messages. + * @param message UserWorkloadsConfigMap message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserWorkloadsConfigMap message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserWorkloadsConfigMap + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap; + + /** + * Decodes a UserWorkloadsConfigMap message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserWorkloadsConfigMap + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap; + + /** + * Verifies a UserWorkloadsConfigMap message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserWorkloadsConfigMap message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserWorkloadsConfigMap + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap; + + /** + * Creates a plain object from a UserWorkloadsConfigMap message. Also converts values to other types if specified. + * @param message UserWorkloadsConfigMap + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserWorkloadsConfigMap to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserWorkloadsConfigMap + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListUserWorkloadsConfigMapsResponse. */ + interface IListUserWorkloadsConfigMapsResponse { + + /** ListUserWorkloadsConfigMapsResponse userWorkloadsConfigMaps */ + userWorkloadsConfigMaps?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap[]|null); + + /** ListUserWorkloadsConfigMapsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListUserWorkloadsConfigMapsResponse. */ + class ListUserWorkloadsConfigMapsResponse implements IListUserWorkloadsConfigMapsResponse { + + /** + * Constructs a new ListUserWorkloadsConfigMapsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse); + + /** ListUserWorkloadsConfigMapsResponse userWorkloadsConfigMaps. */ + public userWorkloadsConfigMaps: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap[]; + + /** ListUserWorkloadsConfigMapsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListUserWorkloadsConfigMapsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListUserWorkloadsConfigMapsResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse; + + /** + * Encodes the specified ListUserWorkloadsConfigMapsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse.verify|verify} messages. + * @param message ListUserWorkloadsConfigMapsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListUserWorkloadsConfigMapsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse.verify|verify} messages. + * @param message ListUserWorkloadsConfigMapsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListUserWorkloadsConfigMapsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListUserWorkloadsConfigMapsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse; + + /** + * Decodes a ListUserWorkloadsConfigMapsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListUserWorkloadsConfigMapsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse; + + /** + * Verifies a ListUserWorkloadsConfigMapsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListUserWorkloadsConfigMapsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListUserWorkloadsConfigMapsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse; + + /** + * Creates a plain object from a ListUserWorkloadsConfigMapsResponse message. Also converts values to other types if specified. + * @param message ListUserWorkloadsConfigMapsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListUserWorkloadsConfigMapsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListUserWorkloadsConfigMapsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListWorkloadsRequest. */ + interface IListWorkloadsRequest { + + /** ListWorkloadsRequest parent */ + parent?: (string|null); + + /** ListWorkloadsRequest pageSize */ + pageSize?: (number|null); + + /** ListWorkloadsRequest pageToken */ + pageToken?: (string|null); + + /** ListWorkloadsRequest filter */ + filter?: (string|null); + } + + /** Represents a ListWorkloadsRequest. */ + class ListWorkloadsRequest implements IListWorkloadsRequest { + + /** + * Constructs a new ListWorkloadsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest); + + /** ListWorkloadsRequest parent. */ + public parent: string; + + /** ListWorkloadsRequest pageSize. */ + public pageSize: number; + + /** ListWorkloadsRequest pageToken. */ + public pageToken: string; + + /** ListWorkloadsRequest filter. */ + public filter: string; + + /** + * Creates a new ListWorkloadsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkloadsRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest; + + /** + * Encodes the specified ListWorkloadsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest.verify|verify} messages. + * @param message ListWorkloadsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkloadsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest.verify|verify} messages. + * @param message ListWorkloadsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkloadsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkloadsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest; + + /** + * Decodes a ListWorkloadsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkloadsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest; + + /** + * Verifies a ListWorkloadsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkloadsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkloadsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest; + + /** + * Creates a plain object from a ListWorkloadsRequest message. Also converts values to other types if specified. + * @param message ListWorkloadsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkloadsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkloadsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListWorkloadsResponse. */ + interface IListWorkloadsResponse { + + /** ListWorkloadsResponse workloads */ + workloads?: (google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload[]|null); + + /** ListWorkloadsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListWorkloadsResponse. */ + class ListWorkloadsResponse implements IListWorkloadsResponse { + + /** + * Constructs a new ListWorkloadsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse); + + /** ListWorkloadsResponse workloads. */ + public workloads: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload[]; + + /** ListWorkloadsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListWorkloadsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListWorkloadsResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse; + + /** + * Encodes the specified ListWorkloadsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.verify|verify} messages. + * @param message ListWorkloadsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListWorkloadsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.verify|verify} messages. + * @param message ListWorkloadsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListWorkloadsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListWorkloadsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse; + + /** + * Decodes a ListWorkloadsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListWorkloadsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse; + + /** + * Verifies a ListWorkloadsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListWorkloadsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListWorkloadsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse; + + /** + * Creates a plain object from a ListWorkloadsResponse message. Also converts values to other types if specified. + * @param message ListWorkloadsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListWorkloadsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListWorkloadsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ListWorkloadsResponse { + + /** Properties of a ComposerWorkload. */ + interface IComposerWorkload { + + /** ComposerWorkload name */ + name?: (string|null); + + /** ComposerWorkload type */ + type?: (google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType|null); + + /** ComposerWorkload status */ + status?: (google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus|null); + } + + /** Represents a ComposerWorkload. */ + class ComposerWorkload implements IComposerWorkload { + + /** + * Constructs a new ComposerWorkload. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload); + + /** ComposerWorkload name. */ + public name: string; + + /** ComposerWorkload type. */ + public type: (google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType); + + /** ComposerWorkload status. */ + public status?: (google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus|null); + + /** + * Creates a new ComposerWorkload instance using the specified properties. + * @param [properties] Properties to set + * @returns ComposerWorkload instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload; + + /** + * Encodes the specified ComposerWorkload message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.verify|verify} messages. + * @param message ComposerWorkload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComposerWorkload message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.verify|verify} messages. + * @param message ComposerWorkload message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComposerWorkload message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComposerWorkload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload; + + /** + * Decodes a ComposerWorkload message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComposerWorkload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload; + + /** + * Verifies a ComposerWorkload message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComposerWorkload message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComposerWorkload + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload; + + /** + * Creates a plain object from a ComposerWorkload message. Also converts values to other types if specified. + * @param message ComposerWorkload + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComposerWorkload to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComposerWorkload + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ComposerWorkloadType enum. */ + enum ComposerWorkloadType { + COMPOSER_WORKLOAD_TYPE_UNSPECIFIED = 0, + CELERY_WORKER = 1, + KUBERNETES_WORKER = 2, + KUBERNETES_OPERATOR_POD = 3, + SCHEDULER = 4, + DAG_PROCESSOR = 5, + TRIGGERER = 6, + WEB_SERVER = 7, + REDIS = 8 + } + + /** Properties of a ComposerWorkloadStatus. */ + interface IComposerWorkloadStatus { + + /** ComposerWorkloadStatus state */ + state?: (google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState|null); + + /** ComposerWorkloadStatus statusMessage */ + statusMessage?: (string|null); + + /** ComposerWorkloadStatus detailedStatusMessage */ + detailedStatusMessage?: (string|null); + } + + /** Represents a ComposerWorkloadStatus. */ + class ComposerWorkloadStatus implements IComposerWorkloadStatus { + + /** + * Constructs a new ComposerWorkloadStatus. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus); + + /** ComposerWorkloadStatus state. */ + public state: (google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState); + + /** ComposerWorkloadStatus statusMessage. */ + public statusMessage: string; + + /** ComposerWorkloadStatus detailedStatusMessage. */ + public detailedStatusMessage: string; + + /** + * Creates a new ComposerWorkloadStatus instance using the specified properties. + * @param [properties] Properties to set + * @returns ComposerWorkloadStatus instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus; + + /** + * Encodes the specified ComposerWorkloadStatus message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.verify|verify} messages. + * @param message ComposerWorkloadStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComposerWorkloadStatus message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.verify|verify} messages. + * @param message ComposerWorkloadStatus message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComposerWorkloadStatus message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComposerWorkloadStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus; + + /** + * Decodes a ComposerWorkloadStatus message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComposerWorkloadStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus; + + /** + * Verifies a ComposerWorkloadStatus message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComposerWorkloadStatus message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComposerWorkloadStatus + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus; + + /** + * Creates a plain object from a ComposerWorkloadStatus message. Also converts values to other types if specified. + * @param message ComposerWorkloadStatus + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComposerWorkloadStatus to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComposerWorkloadStatus + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** ComposerWorkloadState enum. */ + enum ComposerWorkloadState { + COMPOSER_WORKLOAD_STATE_UNSPECIFIED = 0, + PENDING = 1, + OK = 2, + WARNING = 3, + ERROR = 4, + SUCCEEDED = 5, + FAILED = 6 + } + } + + /** Properties of a SaveSnapshotRequest. */ + interface ISaveSnapshotRequest { + + /** SaveSnapshotRequest environment */ + environment?: (string|null); + + /** SaveSnapshotRequest snapshotLocation */ + snapshotLocation?: (string|null); + } + + /** Represents a SaveSnapshotRequest. */ + class SaveSnapshotRequest implements ISaveSnapshotRequest { + + /** + * Constructs a new SaveSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest); + + /** SaveSnapshotRequest environment. */ + public environment: string; + + /** SaveSnapshotRequest snapshotLocation. */ + public snapshotLocation: string; + + /** + * Creates a new SaveSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveSnapshotRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest): google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest; + + /** + * Encodes the specified SaveSnapshotRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest.verify|verify} messages. + * @param message SaveSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest.verify|verify} messages. + * @param message SaveSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest; + + /** + * Decodes a SaveSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest; + + /** + * Verifies a SaveSnapshotRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest; + + /** + * Creates a plain object from a SaveSnapshotRequest message. Also converts values to other types if specified. + * @param message SaveSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SaveSnapshotResponse. */ + interface ISaveSnapshotResponse { + + /** SaveSnapshotResponse snapshotPath */ + snapshotPath?: (string|null); + } + + /** Represents a SaveSnapshotResponse. */ + class SaveSnapshotResponse implements ISaveSnapshotResponse { + + /** + * Constructs a new SaveSnapshotResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotResponse); + + /** SaveSnapshotResponse snapshotPath. */ + public snapshotPath: string; + + /** + * Creates a new SaveSnapshotResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SaveSnapshotResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotResponse): google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse; + + /** + * Encodes the specified SaveSnapshotResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse.verify|verify} messages. + * @param message SaveSnapshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SaveSnapshotResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse.verify|verify} messages. + * @param message SaveSnapshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SaveSnapshotResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SaveSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse; + + /** + * Decodes a SaveSnapshotResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SaveSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse; + + /** + * Verifies a SaveSnapshotResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SaveSnapshotResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SaveSnapshotResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse; + + /** + * Creates a plain object from a SaveSnapshotResponse message. Also converts values to other types if specified. + * @param message SaveSnapshotResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SaveSnapshotResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SaveSnapshotResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadSnapshotRequest. */ + interface ILoadSnapshotRequest { + + /** LoadSnapshotRequest environment */ + environment?: (string|null); + + /** LoadSnapshotRequest snapshotPath */ + snapshotPath?: (string|null); + + /** LoadSnapshotRequest skipPypiPackagesInstallation */ + skipPypiPackagesInstallation?: (boolean|null); + + /** LoadSnapshotRequest skipEnvironmentVariablesSetting */ + skipEnvironmentVariablesSetting?: (boolean|null); + + /** LoadSnapshotRequest skipAirflowOverridesSetting */ + skipAirflowOverridesSetting?: (boolean|null); + + /** LoadSnapshotRequest skipGcsDataCopying */ + skipGcsDataCopying?: (boolean|null); + } + + /** Represents a LoadSnapshotRequest. */ + class LoadSnapshotRequest implements ILoadSnapshotRequest { + + /** + * Constructs a new LoadSnapshotRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest); + + /** LoadSnapshotRequest environment. */ + public environment: string; + + /** LoadSnapshotRequest snapshotPath. */ + public snapshotPath: string; + + /** LoadSnapshotRequest skipPypiPackagesInstallation. */ + public skipPypiPackagesInstallation: boolean; + + /** LoadSnapshotRequest skipEnvironmentVariablesSetting. */ + public skipEnvironmentVariablesSetting: boolean; + + /** LoadSnapshotRequest skipAirflowOverridesSetting. */ + public skipAirflowOverridesSetting: boolean; + + /** LoadSnapshotRequest skipGcsDataCopying. */ + public skipGcsDataCopying: boolean; + + /** + * Creates a new LoadSnapshotRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadSnapshotRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest): google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest; + + /** + * Encodes the specified LoadSnapshotRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest.verify|verify} messages. + * @param message LoadSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest.verify|verify} messages. + * @param message LoadSnapshotRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadSnapshotRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest; + + /** + * Decodes a LoadSnapshotRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest; + + /** + * Verifies a LoadSnapshotRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadSnapshotRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest; + + /** + * Creates a plain object from a LoadSnapshotRequest message. Also converts values to other types if specified. + * @param message LoadSnapshotRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadSnapshotRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadSnapshotRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LoadSnapshotResponse. */ + interface ILoadSnapshotResponse { + } + + /** Represents a LoadSnapshotResponse. */ + class LoadSnapshotResponse implements ILoadSnapshotResponse { + + /** + * Constructs a new LoadSnapshotResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotResponse); + + /** + * Creates a new LoadSnapshotResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns LoadSnapshotResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotResponse): google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse; + + /** + * Encodes the specified LoadSnapshotResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse.verify|verify} messages. + * @param message LoadSnapshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LoadSnapshotResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse.verify|verify} messages. + * @param message LoadSnapshotResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LoadSnapshotResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LoadSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse; + + /** + * Decodes a LoadSnapshotResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LoadSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse; + + /** + * Verifies a LoadSnapshotResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LoadSnapshotResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LoadSnapshotResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse; + + /** + * Creates a plain object from a LoadSnapshotResponse message. Also converts values to other types if specified. + * @param message LoadSnapshotResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LoadSnapshotResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LoadSnapshotResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DatabaseFailoverRequest. */ + interface IDatabaseFailoverRequest { + + /** DatabaseFailoverRequest environment */ + environment?: (string|null); + } + + /** Represents a DatabaseFailoverRequest. */ + class DatabaseFailoverRequest implements IDatabaseFailoverRequest { + + /** + * Constructs a new DatabaseFailoverRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest); + + /** DatabaseFailoverRequest environment. */ + public environment: string; + + /** + * Creates a new DatabaseFailoverRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseFailoverRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest): google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest; + + /** + * Encodes the specified DatabaseFailoverRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest.verify|verify} messages. + * @param message DatabaseFailoverRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseFailoverRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest.verify|verify} messages. + * @param message DatabaseFailoverRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseFailoverRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseFailoverRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest; + + /** + * Decodes a DatabaseFailoverRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseFailoverRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest; + + /** + * Verifies a DatabaseFailoverRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseFailoverRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseFailoverRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest; + + /** + * Creates a plain object from a DatabaseFailoverRequest message. Also converts values to other types if specified. + * @param message DatabaseFailoverRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseFailoverRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseFailoverRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DatabaseFailoverResponse. */ + interface IDatabaseFailoverResponse { + } + + /** Represents a DatabaseFailoverResponse. */ + class DatabaseFailoverResponse implements IDatabaseFailoverResponse { + + /** + * Constructs a new DatabaseFailoverResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverResponse); + + /** + * Creates a new DatabaseFailoverResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseFailoverResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverResponse): google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse; + + /** + * Encodes the specified DatabaseFailoverResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse.verify|verify} messages. + * @param message DatabaseFailoverResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseFailoverResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse.verify|verify} messages. + * @param message DatabaseFailoverResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseFailoverResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseFailoverResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse; + + /** + * Decodes a DatabaseFailoverResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseFailoverResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse; + + /** + * Verifies a DatabaseFailoverResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseFailoverResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseFailoverResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse; + + /** + * Creates a plain object from a DatabaseFailoverResponse message. Also converts values to other types if specified. + * @param message DatabaseFailoverResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseFailoverResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseFailoverResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchDatabasePropertiesRequest. */ + interface IFetchDatabasePropertiesRequest { + + /** FetchDatabasePropertiesRequest environment */ + environment?: (string|null); + } + + /** Represents a FetchDatabasePropertiesRequest. */ + class FetchDatabasePropertiesRequest implements IFetchDatabasePropertiesRequest { + + /** + * Constructs a new FetchDatabasePropertiesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest); + + /** FetchDatabasePropertiesRequest environment. */ + public environment: string; + + /** + * Creates a new FetchDatabasePropertiesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchDatabasePropertiesRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest): google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest; + + /** + * Encodes the specified FetchDatabasePropertiesRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest.verify|verify} messages. + * @param message FetchDatabasePropertiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchDatabasePropertiesRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest.verify|verify} messages. + * @param message FetchDatabasePropertiesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchDatabasePropertiesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchDatabasePropertiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest; + + /** + * Decodes a FetchDatabasePropertiesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchDatabasePropertiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest; + + /** + * Verifies a FetchDatabasePropertiesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchDatabasePropertiesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchDatabasePropertiesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest; + + /** + * Creates a plain object from a FetchDatabasePropertiesRequest message. Also converts values to other types if specified. + * @param message FetchDatabasePropertiesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchDatabasePropertiesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchDatabasePropertiesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FetchDatabasePropertiesResponse. */ + interface IFetchDatabasePropertiesResponse { + + /** FetchDatabasePropertiesResponse primaryGceZone */ + primaryGceZone?: (string|null); + + /** FetchDatabasePropertiesResponse secondaryGceZone */ + secondaryGceZone?: (string|null); + + /** FetchDatabasePropertiesResponse isFailoverReplicaAvailable */ + isFailoverReplicaAvailable?: (boolean|null); + } + + /** Represents a FetchDatabasePropertiesResponse. */ + class FetchDatabasePropertiesResponse implements IFetchDatabasePropertiesResponse { + + /** + * Constructs a new FetchDatabasePropertiesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse); + + /** FetchDatabasePropertiesResponse primaryGceZone. */ + public primaryGceZone: string; + + /** FetchDatabasePropertiesResponse secondaryGceZone. */ + public secondaryGceZone: string; + + /** FetchDatabasePropertiesResponse isFailoverReplicaAvailable. */ + public isFailoverReplicaAvailable: boolean; + + /** + * Creates a new FetchDatabasePropertiesResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns FetchDatabasePropertiesResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse): google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse; + + /** + * Encodes the specified FetchDatabasePropertiesResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse.verify|verify} messages. + * @param message FetchDatabasePropertiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FetchDatabasePropertiesResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse.verify|verify} messages. + * @param message FetchDatabasePropertiesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FetchDatabasePropertiesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FetchDatabasePropertiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse; + + /** + * Decodes a FetchDatabasePropertiesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FetchDatabasePropertiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse; + + /** + * Verifies a FetchDatabasePropertiesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FetchDatabasePropertiesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FetchDatabasePropertiesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse; + + /** + * Creates a plain object from a FetchDatabasePropertiesResponse message. Also converts values to other types if specified. + * @param message FetchDatabasePropertiesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FetchDatabasePropertiesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FetchDatabasePropertiesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnvironmentConfig. */ + interface IEnvironmentConfig { + + /** EnvironmentConfig gkeCluster */ + gkeCluster?: (string|null); + + /** EnvironmentConfig dagGcsPrefix */ + dagGcsPrefix?: (string|null); + + /** EnvironmentConfig nodeCount */ + nodeCount?: (number|null); + + /** EnvironmentConfig softwareConfig */ + softwareConfig?: (google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig|null); + + /** EnvironmentConfig nodeConfig */ + nodeConfig?: (google.cloud.orchestration.airflow.service.v1beta1.INodeConfig|null); + + /** EnvironmentConfig privateEnvironmentConfig */ + privateEnvironmentConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig|null); + + /** EnvironmentConfig webServerNetworkAccessControl */ + webServerNetworkAccessControl?: (google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl|null); + + /** EnvironmentConfig databaseConfig */ + databaseConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig|null); + + /** EnvironmentConfig webServerConfig */ + webServerConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig|null); + + /** EnvironmentConfig airflowUri */ + airflowUri?: (string|null); + + /** EnvironmentConfig airflowByoidUri */ + airflowByoidUri?: (string|null); + + /** EnvironmentConfig encryptionConfig */ + encryptionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig|null); + + /** EnvironmentConfig maintenanceWindow */ + maintenanceWindow?: (google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow|null); + + /** EnvironmentConfig workloadsConfig */ + workloadsConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig|null); + + /** EnvironmentConfig environmentSize */ + environmentSize?: (google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize|null); + + /** EnvironmentConfig masterAuthorizedNetworksConfig */ + masterAuthorizedNetworksConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig|null); + + /** EnvironmentConfig recoveryConfig */ + recoveryConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig|null); + + /** EnvironmentConfig dataRetentionConfig */ + dataRetentionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig|null); + + /** EnvironmentConfig resilienceMode */ + resilienceMode?: (google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode|null); + } + + /** Represents an EnvironmentConfig. */ + class EnvironmentConfig implements IEnvironmentConfig { + + /** + * Constructs a new EnvironmentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig); + + /** EnvironmentConfig gkeCluster. */ + public gkeCluster: string; + + /** EnvironmentConfig dagGcsPrefix. */ + public dagGcsPrefix: string; + + /** EnvironmentConfig nodeCount. */ + public nodeCount: number; + + /** EnvironmentConfig softwareConfig. */ + public softwareConfig?: (google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig|null); + + /** EnvironmentConfig nodeConfig. */ + public nodeConfig?: (google.cloud.orchestration.airflow.service.v1beta1.INodeConfig|null); + + /** EnvironmentConfig privateEnvironmentConfig. */ + public privateEnvironmentConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig|null); + + /** EnvironmentConfig webServerNetworkAccessControl. */ + public webServerNetworkAccessControl?: (google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl|null); + + /** EnvironmentConfig databaseConfig. */ + public databaseConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig|null); + + /** EnvironmentConfig webServerConfig. */ + public webServerConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig|null); + + /** EnvironmentConfig airflowUri. */ + public airflowUri: string; + + /** EnvironmentConfig airflowByoidUri. */ + public airflowByoidUri: string; + + /** EnvironmentConfig encryptionConfig. */ + public encryptionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig|null); + + /** EnvironmentConfig maintenanceWindow. */ + public maintenanceWindow?: (google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow|null); + + /** EnvironmentConfig workloadsConfig. */ + public workloadsConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig|null); + + /** EnvironmentConfig environmentSize. */ + public environmentSize: (google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize); + + /** EnvironmentConfig masterAuthorizedNetworksConfig. */ + public masterAuthorizedNetworksConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig|null); + + /** EnvironmentConfig recoveryConfig. */ + public recoveryConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig|null); + + /** EnvironmentConfig dataRetentionConfig. */ + public dataRetentionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig|null); + + /** EnvironmentConfig resilienceMode. */ + public resilienceMode: (google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode); + + /** + * Creates a new EnvironmentConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EnvironmentConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig): google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig; + + /** + * Encodes the specified EnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.verify|verify} messages. + * @param message EnvironmentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.verify|verify} messages. + * @param message EnvironmentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnvironmentConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig; + + /** + * Decodes an EnvironmentConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig; + + /** + * Verifies an EnvironmentConfig message. + * @param message Plain 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 EnvironmentConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnvironmentConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig; + + /** + * Creates a plain object from an EnvironmentConfig message. Also converts values to other types if specified. + * @param message EnvironmentConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnvironmentConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnvironmentConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnvironmentConfig { + + /** EnvironmentSize enum. */ + enum EnvironmentSize { + ENVIRONMENT_SIZE_UNSPECIFIED = 0, + ENVIRONMENT_SIZE_SMALL = 1, + ENVIRONMENT_SIZE_MEDIUM = 2, + ENVIRONMENT_SIZE_LARGE = 3 + } + + /** ResilienceMode enum. */ + enum ResilienceMode { + RESILIENCE_MODE_UNSPECIFIED = 0, + HIGH_RESILIENCE = 1 + } + } + + /** Properties of a WebServerNetworkAccessControl. */ + interface IWebServerNetworkAccessControl { + + /** WebServerNetworkAccessControl allowedIpRanges */ + allowedIpRanges?: (google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange[]|null); + } + + /** Represents a WebServerNetworkAccessControl. */ + class WebServerNetworkAccessControl implements IWebServerNetworkAccessControl { + + /** + * Constructs a new WebServerNetworkAccessControl. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl); + + /** WebServerNetworkAccessControl allowedIpRanges. */ + public allowedIpRanges: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange[]; + + /** + * Creates a new WebServerNetworkAccessControl instance using the specified properties. + * @param [properties] Properties to set + * @returns WebServerNetworkAccessControl instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl; + + /** + * Encodes the specified WebServerNetworkAccessControl message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.verify|verify} messages. + * @param message WebServerNetworkAccessControl message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebServerNetworkAccessControl message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.verify|verify} messages. + * @param message WebServerNetworkAccessControl message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebServerNetworkAccessControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl; + + /** + * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebServerNetworkAccessControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl; + + /** + * Verifies a WebServerNetworkAccessControl message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebServerNetworkAccessControl message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebServerNetworkAccessControl + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl; + + /** + * Creates a plain object from a WebServerNetworkAccessControl message. Also converts values to other types if specified. + * @param message WebServerNetworkAccessControl + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebServerNetworkAccessControl to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebServerNetworkAccessControl + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WebServerNetworkAccessControl { + + /** Properties of an AllowedIpRange. */ + interface IAllowedIpRange { + + /** AllowedIpRange value */ + value?: (string|null); + + /** AllowedIpRange description */ + description?: (string|null); + } + + /** Represents an AllowedIpRange. */ + class AllowedIpRange implements IAllowedIpRange { + + /** + * Constructs a new AllowedIpRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange); + + /** AllowedIpRange value. */ + public value: string; + + /** AllowedIpRange description. */ + public description: string; + + /** + * Creates a new AllowedIpRange instance using the specified properties. + * @param [properties] Properties to set + * @returns AllowedIpRange instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange; + + /** + * Encodes the specified AllowedIpRange message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. + * @param message AllowedIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AllowedIpRange message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. + * @param message AllowedIpRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AllowedIpRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AllowedIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange; + + /** + * Decodes an AllowedIpRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AllowedIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange; + + /** + * Verifies an AllowedIpRange message. + * @param message Plain 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 AllowedIpRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AllowedIpRange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange; + + /** + * Creates a plain object from an AllowedIpRange message. Also converts values to other types if specified. + * @param message AllowedIpRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AllowedIpRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AllowedIpRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SoftwareConfig. */ + interface ISoftwareConfig { + + /** SoftwareConfig imageVersion */ + imageVersion?: (string|null); + + /** SoftwareConfig airflowConfigOverrides */ + airflowConfigOverrides?: ({ [k: string]: string }|null); + + /** SoftwareConfig pypiPackages */ + pypiPackages?: ({ [k: string]: string }|null); + + /** SoftwareConfig envVariables */ + envVariables?: ({ [k: string]: string }|null); + + /** SoftwareConfig pythonVersion */ + pythonVersion?: (string|null); + + /** SoftwareConfig schedulerCount */ + schedulerCount?: (number|null); + + /** SoftwareConfig cloudDataLineageIntegration */ + cloudDataLineageIntegration?: (google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration|null); + + /** SoftwareConfig webServerPluginsMode */ + webServerPluginsMode?: (google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode|null); + } + + /** Represents a SoftwareConfig. */ + class SoftwareConfig implements ISoftwareConfig { + + /** + * Constructs a new SoftwareConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig); + + /** SoftwareConfig imageVersion. */ + public imageVersion: string; + + /** SoftwareConfig airflowConfigOverrides. */ + public airflowConfigOverrides: { [k: string]: string }; + + /** SoftwareConfig pypiPackages. */ + public pypiPackages: { [k: string]: string }; + + /** SoftwareConfig envVariables. */ + public envVariables: { [k: string]: string }; + + /** SoftwareConfig pythonVersion. */ + public pythonVersion: string; + + /** SoftwareConfig schedulerCount. */ + public schedulerCount: number; + + /** SoftwareConfig cloudDataLineageIntegration. */ + public cloudDataLineageIntegration?: (google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration|null); + + /** SoftwareConfig webServerPluginsMode. */ + public webServerPluginsMode: (google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode); + + /** + * Creates a new SoftwareConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SoftwareConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig): google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig; + + /** + * Encodes the specified SoftwareConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.verify|verify} messages. + * @param message SoftwareConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SoftwareConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.verify|verify} messages. + * @param message SoftwareConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SoftwareConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SoftwareConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig; + + /** + * Decodes a SoftwareConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SoftwareConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig; + + /** + * Verifies a SoftwareConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SoftwareConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SoftwareConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig; + + /** + * Creates a plain object from a SoftwareConfig message. Also converts values to other types if specified. + * @param message SoftwareConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SoftwareConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SoftwareConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SoftwareConfig { + + /** WebServerPluginsMode enum. */ + enum WebServerPluginsMode { + WEB_SERVER_PLUGINS_MODE_UNSPECIFIED = 0, + PLUGINS_DISABLED = 1, + PLUGINS_ENABLED = 2 + } + } + + /** Properties of a IPAllocationPolicy. */ + interface IIPAllocationPolicy { + + /** IPAllocationPolicy useIpAliases */ + useIpAliases?: (boolean|null); + + /** IPAllocationPolicy clusterSecondaryRangeName */ + clusterSecondaryRangeName?: (string|null); + + /** IPAllocationPolicy servicesSecondaryRangeName */ + servicesSecondaryRangeName?: (string|null); + + /** IPAllocationPolicy clusterIpv4CidrBlock */ + clusterIpv4CidrBlock?: (string|null); + + /** IPAllocationPolicy servicesIpv4CidrBlock */ + servicesIpv4CidrBlock?: (string|null); + } + + /** Represents a IPAllocationPolicy. */ + class IPAllocationPolicy implements IIPAllocationPolicy { + + /** + * Constructs a new IPAllocationPolicy. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy); + + /** IPAllocationPolicy useIpAliases. */ + public useIpAliases: boolean; + + /** IPAllocationPolicy clusterSecondaryRangeName. */ + public clusterSecondaryRangeName: string; + + /** IPAllocationPolicy servicesSecondaryRangeName. */ + public servicesSecondaryRangeName: string; + + /** IPAllocationPolicy clusterIpv4CidrBlock. */ + public clusterIpv4CidrBlock: string; + + /** IPAllocationPolicy servicesIpv4CidrBlock. */ + public servicesIpv4CidrBlock: string; + + /** + * Creates a new IPAllocationPolicy instance using the specified properties. + * @param [properties] Properties to set + * @returns IPAllocationPolicy instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy): google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy; + + /** + * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.verify|verify} messages. + * @param message IPAllocationPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.verify|verify} messages. + * @param message IPAllocationPolicy message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy; + + /** + * Verifies a IPAllocationPolicy message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IPAllocationPolicy + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy; + + /** + * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. + * @param message IPAllocationPolicy + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IPAllocationPolicy to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IPAllocationPolicy + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeConfig. */ + interface INodeConfig { + + /** NodeConfig location */ + location?: (string|null); + + /** NodeConfig machineType */ + machineType?: (string|null); + + /** NodeConfig network */ + network?: (string|null); + + /** NodeConfig subnetwork */ + subnetwork?: (string|null); + + /** NodeConfig diskSizeGb */ + diskSizeGb?: (number|null); + + /** NodeConfig oauthScopes */ + oauthScopes?: (string[]|null); + + /** NodeConfig serviceAccount */ + serviceAccount?: (string|null); + + /** NodeConfig tags */ + tags?: (string[]|null); + + /** NodeConfig ipAllocationPolicy */ + ipAllocationPolicy?: (google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy|null); + + /** NodeConfig maxPodsPerNode */ + maxPodsPerNode?: (number|null); + + /** NodeConfig enableIpMasqAgent */ + enableIpMasqAgent?: (boolean|null); + + /** NodeConfig composerNetworkAttachment */ + composerNetworkAttachment?: (string|null); + + /** NodeConfig composerInternalIpv4CidrBlock */ + composerInternalIpv4CidrBlock?: (string|null); + } + + /** Represents a NodeConfig. */ + class NodeConfig implements INodeConfig { + + /** + * Constructs a new NodeConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.INodeConfig); + + /** NodeConfig location. */ + public location: string; + + /** NodeConfig machineType. */ + public machineType: string; + + /** NodeConfig network. */ + public network: string; + + /** NodeConfig subnetwork. */ + public subnetwork: string; + + /** NodeConfig diskSizeGb. */ + public diskSizeGb: number; + + /** NodeConfig oauthScopes. */ + public oauthScopes: string[]; + + /** NodeConfig serviceAccount. */ + public serviceAccount: string; + + /** NodeConfig tags. */ + public tags: string[]; + + /** NodeConfig ipAllocationPolicy. */ + public ipAllocationPolicy?: (google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy|null); + + /** NodeConfig maxPodsPerNode. */ + public maxPodsPerNode: number; + + /** NodeConfig enableIpMasqAgent. */ + public enableIpMasqAgent: boolean; + + /** NodeConfig composerNetworkAttachment. */ + public composerNetworkAttachment: string; + + /** NodeConfig composerInternalIpv4CidrBlock. */ + public composerInternalIpv4CidrBlock: string; + + /** + * Creates a new NodeConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.INodeConfig): google.cloud.orchestration.airflow.service.v1beta1.NodeConfig; + + /** + * Encodes the specified NodeConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.verify|verify} messages. + * @param message NodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.verify|verify} messages. + * @param message NodeConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.NodeConfig; + + /** + * Decodes a NodeConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.NodeConfig; + + /** + * Verifies a NodeConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.NodeConfig; + + /** + * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. + * @param message NodeConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.NodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrivateClusterConfig. */ + interface IPrivateClusterConfig { + + /** PrivateClusterConfig enablePrivateEndpoint */ + enablePrivateEndpoint?: (boolean|null); + + /** PrivateClusterConfig masterIpv4CidrBlock */ + masterIpv4CidrBlock?: (string|null); + + /** PrivateClusterConfig masterIpv4ReservedRange */ + masterIpv4ReservedRange?: (string|null); + } + + /** Represents a PrivateClusterConfig. */ + class PrivateClusterConfig implements IPrivateClusterConfig { + + /** + * Constructs a new PrivateClusterConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig); + + /** PrivateClusterConfig enablePrivateEndpoint. */ + public enablePrivateEndpoint: boolean; + + /** PrivateClusterConfig masterIpv4CidrBlock. */ + public masterIpv4CidrBlock: string; + + /** PrivateClusterConfig masterIpv4ReservedRange. */ + public masterIpv4ReservedRange: string; + + /** + * Creates a new PrivateClusterConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateClusterConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig): google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig; + + /** + * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.verify|verify} messages. + * @param message PrivateClusterConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.verify|verify} messages. + * @param message PrivateClusterConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig; + + /** + * Verifies a PrivateClusterConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateClusterConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig; + + /** + * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. + * @param message PrivateClusterConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateClusterConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateClusterConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetworkingConfig. */ + interface INetworkingConfig { + + /** NetworkingConfig connectionType */ + connectionType?: (google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType|null); + } + + /** Represents a NetworkingConfig. */ + class NetworkingConfig implements INetworkingConfig { + + /** + * Constructs a new NetworkingConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig); + + /** NetworkingConfig connectionType. */ + public connectionType: (google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType); + + /** + * Creates a new NetworkingConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NetworkingConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig): google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig; + + /** + * Encodes the specified NetworkingConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.verify|verify} messages. + * @param message NetworkingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetworkingConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.verify|verify} messages. + * @param message NetworkingConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetworkingConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetworkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig; + + /** + * Decodes a NetworkingConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetworkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig; + + /** + * Verifies a NetworkingConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NetworkingConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetworkingConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig; + + /** + * Creates a plain object from a NetworkingConfig message. Also converts values to other types if specified. + * @param message NetworkingConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetworkingConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetworkingConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace NetworkingConfig { + + /** ConnectionType enum. */ + enum ConnectionType { + CONNECTION_TYPE_UNSPECIFIED = 0, + VPC_PEERING = 1, + PRIVATE_SERVICE_CONNECT = 2 + } + } + + /** Properties of a PrivateEnvironmentConfig. */ + interface IPrivateEnvironmentConfig { + + /** PrivateEnvironmentConfig enablePrivateEnvironment */ + enablePrivateEnvironment?: (boolean|null); + + /** PrivateEnvironmentConfig enablePrivateBuildsOnly */ + enablePrivateBuildsOnly?: (boolean|null); + + /** PrivateEnvironmentConfig privateClusterConfig */ + privateClusterConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig|null); + + /** PrivateEnvironmentConfig webServerIpv4CidrBlock */ + webServerIpv4CidrBlock?: (string|null); + + /** PrivateEnvironmentConfig cloudSqlIpv4CidrBlock */ + cloudSqlIpv4CidrBlock?: (string|null); + + /** PrivateEnvironmentConfig webServerIpv4ReservedRange */ + webServerIpv4ReservedRange?: (string|null); + + /** PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock */ + cloudComposerNetworkIpv4CidrBlock?: (string|null); + + /** PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange */ + cloudComposerNetworkIpv4ReservedRange?: (string|null); + + /** PrivateEnvironmentConfig enablePrivatelyUsedPublicIps */ + enablePrivatelyUsedPublicIps?: (boolean|null); + + /** PrivateEnvironmentConfig cloudComposerConnectionSubnetwork */ + cloudComposerConnectionSubnetwork?: (string|null); + + /** PrivateEnvironmentConfig networkingConfig */ + networkingConfig?: (google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig|null); + } + + /** Represents a PrivateEnvironmentConfig. */ + class PrivateEnvironmentConfig implements IPrivateEnvironmentConfig { + + /** + * Constructs a new PrivateEnvironmentConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig); + + /** PrivateEnvironmentConfig enablePrivateEnvironment. */ + public enablePrivateEnvironment: boolean; + + /** PrivateEnvironmentConfig enablePrivateBuildsOnly. */ + public enablePrivateBuildsOnly: boolean; + + /** PrivateEnvironmentConfig privateClusterConfig. */ + public privateClusterConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig|null); + + /** PrivateEnvironmentConfig webServerIpv4CidrBlock. */ + public webServerIpv4CidrBlock: string; + + /** PrivateEnvironmentConfig cloudSqlIpv4CidrBlock. */ + public cloudSqlIpv4CidrBlock: string; + + /** PrivateEnvironmentConfig webServerIpv4ReservedRange. */ + public webServerIpv4ReservedRange: string; + + /** PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock. */ + public cloudComposerNetworkIpv4CidrBlock: string; + + /** PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange. */ + public cloudComposerNetworkIpv4ReservedRange: string; + + /** PrivateEnvironmentConfig enablePrivatelyUsedPublicIps. */ + public enablePrivatelyUsedPublicIps: boolean; + + /** PrivateEnvironmentConfig cloudComposerConnectionSubnetwork. */ + public cloudComposerConnectionSubnetwork: string; + + /** PrivateEnvironmentConfig networkingConfig. */ + public networkingConfig?: (google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig|null); + + /** + * Creates a new PrivateEnvironmentConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns PrivateEnvironmentConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig): google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig; + + /** + * Encodes the specified PrivateEnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.verify|verify} messages. + * @param message PrivateEnvironmentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrivateEnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.verify|verify} messages. + * @param message PrivateEnvironmentConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrivateEnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig; + + /** + * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrivateEnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig; + + /** + * Verifies a PrivateEnvironmentConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PrivateEnvironmentConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrivateEnvironmentConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig; + + /** + * Creates a plain object from a PrivateEnvironmentConfig message. Also converts values to other types if specified. + * @param message PrivateEnvironmentConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrivateEnvironmentConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrivateEnvironmentConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DatabaseConfig. */ + interface IDatabaseConfig { + + /** DatabaseConfig machineType */ + machineType?: (string|null); + + /** DatabaseConfig zone */ + zone?: (string|null); + } + + /** Represents a DatabaseConfig. */ + class DatabaseConfig implements IDatabaseConfig { + + /** + * Constructs a new DatabaseConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig); + + /** DatabaseConfig machineType. */ + public machineType: string; + + /** DatabaseConfig zone. */ + public zone: string; + + /** + * Creates a new DatabaseConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DatabaseConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig): google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig; + + /** + * Encodes the specified DatabaseConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.verify|verify} messages. + * @param message DatabaseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatabaseConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.verify|verify} messages. + * @param message DatabaseConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatabaseConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatabaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig; + + /** + * Decodes a DatabaseConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatabaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig; + + /** + * Verifies a DatabaseConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DatabaseConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatabaseConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig; + + /** + * Creates a plain object from a DatabaseConfig message. Also converts values to other types if specified. + * @param message DatabaseConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatabaseConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatabaseConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WebServerConfig. */ + interface IWebServerConfig { + + /** WebServerConfig machineType */ + machineType?: (string|null); + } + + /** Represents a WebServerConfig. */ + class WebServerConfig implements IWebServerConfig { + + /** + * Constructs a new WebServerConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig); + + /** WebServerConfig machineType. */ + public machineType: string; + + /** + * Creates a new WebServerConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WebServerConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig): google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig; + + /** + * Encodes the specified WebServerConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.verify|verify} messages. + * @param message WebServerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebServerConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.verify|verify} messages. + * @param message WebServerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebServerConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig; + + /** + * Decodes a WebServerConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig; + + /** + * Verifies a WebServerConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebServerConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebServerConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig; + + /** + * Creates a plain object from a WebServerConfig message. Also converts values to other types if specified. + * @param message WebServerConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebServerConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebServerConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EncryptionConfig. */ + interface IEncryptionConfig { + + /** EncryptionConfig kmsKeyName */ + kmsKeyName?: (string|null); + } + + /** Represents an EncryptionConfig. */ + class EncryptionConfig implements IEncryptionConfig { + + /** + * Constructs a new EncryptionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig); + + /** EncryptionConfig kmsKeyName. */ + public kmsKeyName: string; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig): google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.verify|verify} messages. + * @param message EncryptionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig; + + /** + * Verifies an EncryptionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @param message EncryptionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MaintenanceWindow. */ + interface IMaintenanceWindow { + + /** MaintenanceWindow startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** MaintenanceWindow endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** MaintenanceWindow recurrence */ + recurrence?: (string|null); + } + + /** Represents a MaintenanceWindow. */ + class MaintenanceWindow implements IMaintenanceWindow { + + /** + * Constructs a new MaintenanceWindow. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow); + + /** MaintenanceWindow startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** MaintenanceWindow endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** MaintenanceWindow recurrence. */ + public recurrence: string; + + /** + * Creates a new MaintenanceWindow instance using the specified properties. + * @param [properties] Properties to set + * @returns MaintenanceWindow instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow): google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow; + + /** + * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.verify|verify} messages. + * @param message MaintenanceWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.verify|verify} messages. + * @param message MaintenanceWindow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow; + + /** + * Verifies a MaintenanceWindow message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MaintenanceWindow + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow; + + /** + * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. + * @param message MaintenanceWindow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MaintenanceWindow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MaintenanceWindow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkloadsConfig. */ + interface IWorkloadsConfig { + + /** WorkloadsConfig scheduler */ + scheduler?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource|null); + + /** WorkloadsConfig webServer */ + webServer?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource|null); + + /** WorkloadsConfig worker */ + worker?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource|null); + + /** WorkloadsConfig triggerer */ + triggerer?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource|null); + + /** WorkloadsConfig dagProcessor */ + dagProcessor?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource|null); + } + + /** Represents a WorkloadsConfig. */ + class WorkloadsConfig implements IWorkloadsConfig { + + /** + * Constructs a new WorkloadsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig); + + /** WorkloadsConfig scheduler. */ + public scheduler?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource|null); + + /** WorkloadsConfig webServer. */ + public webServer?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource|null); + + /** WorkloadsConfig worker. */ + public worker?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource|null); + + /** WorkloadsConfig triggerer. */ + public triggerer?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource|null); + + /** WorkloadsConfig dagProcessor. */ + public dagProcessor?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource|null); + + /** + * Creates a new WorkloadsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkloadsConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig; + + /** + * Encodes the specified WorkloadsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.verify|verify} messages. + * @param message WorkloadsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkloadsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.verify|verify} messages. + * @param message WorkloadsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkloadsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkloadsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig; + + /** + * Decodes a WorkloadsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkloadsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig; + + /** + * Verifies a WorkloadsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkloadsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkloadsConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig; + + /** + * Creates a plain object from a WorkloadsConfig message. Also converts values to other types if specified. + * @param message WorkloadsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkloadsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkloadsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace WorkloadsConfig { + + /** Properties of a SchedulerResource. */ + interface ISchedulerResource { + + /** SchedulerResource cpu */ + cpu?: (number|null); + + /** SchedulerResource memoryGb */ + memoryGb?: (number|null); + + /** SchedulerResource storageGb */ + storageGb?: (number|null); + + /** SchedulerResource count */ + count?: (number|null); + } + + /** Represents a SchedulerResource. */ + class SchedulerResource implements ISchedulerResource { + + /** + * Constructs a new SchedulerResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource); + + /** SchedulerResource cpu. */ + public cpu: number; + + /** SchedulerResource memoryGb. */ + public memoryGb: number; + + /** SchedulerResource storageGb. */ + public storageGb: number; + + /** SchedulerResource count. */ + public count: number; + + /** + * Creates a new SchedulerResource instance using the specified properties. + * @param [properties] Properties to set + * @returns SchedulerResource instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource; + + /** + * Encodes the specified SchedulerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.verify|verify} messages. + * @param message SchedulerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SchedulerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.verify|verify} messages. + * @param message SchedulerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SchedulerResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SchedulerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource; + + /** + * Decodes a SchedulerResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SchedulerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource; + + /** + * Verifies a SchedulerResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SchedulerResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SchedulerResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource; + + /** + * Creates a plain object from a SchedulerResource message. Also converts values to other types if specified. + * @param message SchedulerResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SchedulerResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SchedulerResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WebServerResource. */ + interface IWebServerResource { + + /** WebServerResource cpu */ + cpu?: (number|null); + + /** WebServerResource memoryGb */ + memoryGb?: (number|null); + + /** WebServerResource storageGb */ + storageGb?: (number|null); + } + + /** Represents a WebServerResource. */ + class WebServerResource implements IWebServerResource { + + /** + * Constructs a new WebServerResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource); + + /** WebServerResource cpu. */ + public cpu: number; + + /** WebServerResource memoryGb. */ + public memoryGb: number; + + /** WebServerResource storageGb. */ + public storageGb: number; + + /** + * Creates a new WebServerResource instance using the specified properties. + * @param [properties] Properties to set + * @returns WebServerResource instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource; + + /** + * Encodes the specified WebServerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.verify|verify} messages. + * @param message WebServerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WebServerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.verify|verify} messages. + * @param message WebServerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WebServerResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WebServerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource; + + /** + * Decodes a WebServerResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WebServerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource; + + /** + * Verifies a WebServerResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WebServerResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WebServerResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource; + + /** + * Creates a plain object from a WebServerResource message. Also converts values to other types if specified. + * @param message WebServerResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WebServerResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WebServerResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a WorkerResource. */ + interface IWorkerResource { + + /** WorkerResource cpu */ + cpu?: (number|null); + + /** WorkerResource memoryGb */ + memoryGb?: (number|null); + + /** WorkerResource storageGb */ + storageGb?: (number|null); + + /** WorkerResource minCount */ + minCount?: (number|null); + + /** WorkerResource maxCount */ + maxCount?: (number|null); + } + + /** Represents a WorkerResource. */ + class WorkerResource implements IWorkerResource { + + /** + * Constructs a new WorkerResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource); + + /** WorkerResource cpu. */ + public cpu: number; + + /** WorkerResource memoryGb. */ + public memoryGb: number; + + /** WorkerResource storageGb. */ + public storageGb: number; + + /** WorkerResource minCount. */ + public minCount: number; + + /** WorkerResource maxCount. */ + public maxCount: number; + + /** + * Creates a new WorkerResource instance using the specified properties. + * @param [properties] Properties to set + * @returns WorkerResource instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource; + + /** + * Encodes the specified WorkerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.verify|verify} messages. + * @param message WorkerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified WorkerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.verify|verify} messages. + * @param message WorkerResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a WorkerResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns WorkerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource; + + /** + * Decodes a WorkerResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns WorkerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource; + + /** + * Verifies a WorkerResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a WorkerResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns WorkerResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource; + + /** + * Creates a plain object from a WorkerResource message. Also converts values to other types if specified. + * @param message WorkerResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this WorkerResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for WorkerResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TriggererResource. */ + interface ITriggererResource { + + /** TriggererResource count */ + count?: (number|null); + + /** TriggererResource cpu */ + cpu?: (number|null); + + /** TriggererResource memoryGb */ + memoryGb?: (number|null); + } + + /** Represents a TriggererResource. */ + class TriggererResource implements ITriggererResource { + + /** + * Constructs a new TriggererResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource); + + /** TriggererResource count. */ + public count: number; + + /** TriggererResource cpu. */ + public cpu: number; + + /** TriggererResource memoryGb. */ + public memoryGb: number; + + /** + * Creates a new TriggererResource instance using the specified properties. + * @param [properties] Properties to set + * @returns TriggererResource instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource; + + /** + * Encodes the specified TriggererResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.verify|verify} messages. + * @param message TriggererResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TriggererResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.verify|verify} messages. + * @param message TriggererResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TriggererResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TriggererResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource; + + /** + * Decodes a TriggererResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TriggererResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource; + + /** + * Verifies a TriggererResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TriggererResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TriggererResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource; + + /** + * Creates a plain object from a TriggererResource message. Also converts values to other types if specified. + * @param message TriggererResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TriggererResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TriggererResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DagProcessorResource. */ + interface IDagProcessorResource { + + /** DagProcessorResource cpu */ + cpu?: (number|null); + + /** DagProcessorResource memoryGb */ + memoryGb?: (number|null); + + /** DagProcessorResource storageGb */ + storageGb?: (number|null); + + /** DagProcessorResource count */ + count?: (number|null); + } + + /** Represents a DagProcessorResource. */ + class DagProcessorResource implements IDagProcessorResource { + + /** + * Constructs a new DagProcessorResource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource); + + /** DagProcessorResource cpu. */ + public cpu: number; + + /** DagProcessorResource memoryGb. */ + public memoryGb: number; + + /** DagProcessorResource storageGb. */ + public storageGb: number; + + /** DagProcessorResource count. */ + public count: number; + + /** + * Creates a new DagProcessorResource instance using the specified properties. + * @param [properties] Properties to set + * @returns DagProcessorResource instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource; + + /** + * Encodes the specified DagProcessorResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.verify|verify} messages. + * @param message DagProcessorResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DagProcessorResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.verify|verify} messages. + * @param message DagProcessorResource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DagProcessorResource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DagProcessorResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource; + + /** + * Decodes a DagProcessorResource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DagProcessorResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource; + + /** + * Verifies a DagProcessorResource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DagProcessorResource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DagProcessorResource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource; + + /** + * Creates a plain object from a DagProcessorResource message. Also converts values to other types if specified. + * @param message DagProcessorResource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DagProcessorResource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DagProcessorResource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a DataRetentionConfig. */ + interface IDataRetentionConfig { + + /** DataRetentionConfig airflowDatabaseRetentionDays */ + airflowDatabaseRetentionDays?: (number|null); + + /** DataRetentionConfig taskLogsRetentionConfig */ + taskLogsRetentionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig|null); + + /** DataRetentionConfig airflowMetadataRetentionConfig */ + airflowMetadataRetentionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig|null); + } + + /** Represents a DataRetentionConfig. */ + class DataRetentionConfig implements IDataRetentionConfig { + + /** + * Constructs a new DataRetentionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig); + + /** DataRetentionConfig airflowDatabaseRetentionDays. */ + public airflowDatabaseRetentionDays: number; + + /** DataRetentionConfig taskLogsRetentionConfig. */ + public taskLogsRetentionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig|null); + + /** DataRetentionConfig airflowMetadataRetentionConfig. */ + public airflowMetadataRetentionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig|null); + + /** + * Creates a new DataRetentionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DataRetentionConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig): google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig; + + /** + * Encodes the specified DataRetentionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.verify|verify} messages. + * @param message DataRetentionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DataRetentionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.verify|verify} messages. + * @param message DataRetentionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DataRetentionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DataRetentionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig; + + /** + * Decodes a DataRetentionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DataRetentionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig; + + /** + * Verifies a DataRetentionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DataRetentionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DataRetentionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig; + + /** + * Creates a plain object from a DataRetentionConfig message. Also converts values to other types if specified. + * @param message DataRetentionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DataRetentionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DataRetentionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TaskLogsRetentionConfig. */ + interface ITaskLogsRetentionConfig { + + /** TaskLogsRetentionConfig storageMode */ + storageMode?: (google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode|null); + } + + /** Represents a TaskLogsRetentionConfig. */ + class TaskLogsRetentionConfig implements ITaskLogsRetentionConfig { + + /** + * Constructs a new TaskLogsRetentionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig); + + /** TaskLogsRetentionConfig storageMode. */ + public storageMode: (google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode); + + /** + * Creates a new TaskLogsRetentionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TaskLogsRetentionConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig): google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig; + + /** + * Encodes the specified TaskLogsRetentionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.verify|verify} messages. + * @param message TaskLogsRetentionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TaskLogsRetentionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.verify|verify} messages. + * @param message TaskLogsRetentionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TaskLogsRetentionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TaskLogsRetentionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig; + + /** + * Decodes a TaskLogsRetentionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TaskLogsRetentionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig; + + /** + * Verifies a TaskLogsRetentionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TaskLogsRetentionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TaskLogsRetentionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig; + + /** + * Creates a plain object from a TaskLogsRetentionConfig message. Also converts values to other types if specified. + * @param message TaskLogsRetentionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TaskLogsRetentionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TaskLogsRetentionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TaskLogsRetentionConfig { + + /** TaskLogsStorageMode enum. */ + enum TaskLogsStorageMode { + TASK_LOGS_STORAGE_MODE_UNSPECIFIED = 0, + CLOUD_LOGGING_AND_CLOUD_STORAGE = 1, + CLOUD_LOGGING_ONLY = 2 + } + } + + /** Properties of an AirflowMetadataRetentionPolicyConfig. */ + interface IAirflowMetadataRetentionPolicyConfig { + + /** AirflowMetadataRetentionPolicyConfig retentionMode */ + retentionMode?: (google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode|null); + + /** AirflowMetadataRetentionPolicyConfig retentionDays */ + retentionDays?: (number|null); + } + + /** Represents an AirflowMetadataRetentionPolicyConfig. */ + class AirflowMetadataRetentionPolicyConfig implements IAirflowMetadataRetentionPolicyConfig { + + /** + * Constructs a new AirflowMetadataRetentionPolicyConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig); + + /** AirflowMetadataRetentionPolicyConfig retentionMode. */ + public retentionMode: (google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode); + + /** AirflowMetadataRetentionPolicyConfig retentionDays. */ + public retentionDays: number; + + /** + * Creates a new AirflowMetadataRetentionPolicyConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns AirflowMetadataRetentionPolicyConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig): google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig; + + /** + * Encodes the specified AirflowMetadataRetentionPolicyConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.verify|verify} messages. + * @param message AirflowMetadataRetentionPolicyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AirflowMetadataRetentionPolicyConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.verify|verify} messages. + * @param message AirflowMetadataRetentionPolicyConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AirflowMetadataRetentionPolicyConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AirflowMetadataRetentionPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig; + + /** + * Decodes an AirflowMetadataRetentionPolicyConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AirflowMetadataRetentionPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig; + + /** + * Verifies an AirflowMetadataRetentionPolicyConfig message. + * @param message Plain 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 AirflowMetadataRetentionPolicyConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AirflowMetadataRetentionPolicyConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig; + + /** + * Creates a plain object from an AirflowMetadataRetentionPolicyConfig message. Also converts values to other types if specified. + * @param message AirflowMetadataRetentionPolicyConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AirflowMetadataRetentionPolicyConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AirflowMetadataRetentionPolicyConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AirflowMetadataRetentionPolicyConfig { + + /** RetentionMode enum. */ + enum RetentionMode { + RETENTION_MODE_UNSPECIFIED = 0, + RETENTION_MODE_ENABLED = 1, + RETENTION_MODE_DISABLED = 2 + } + } + + /** Properties of a StorageConfig. */ + interface IStorageConfig { + + /** StorageConfig bucket */ + bucket?: (string|null); + } + + /** Represents a StorageConfig. */ + class StorageConfig implements IStorageConfig { + + /** + * Constructs a new StorageConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig); + + /** StorageConfig bucket. */ + public bucket: string; + + /** + * Creates a new StorageConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns StorageConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig): google.cloud.orchestration.airflow.service.v1beta1.StorageConfig; + + /** + * Encodes the specified StorageConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.verify|verify} messages. + * @param message StorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StorageConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.verify|verify} messages. + * @param message StorageConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StorageConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.StorageConfig; + + /** + * Decodes a StorageConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.StorageConfig; + + /** + * Verifies a StorageConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a StorageConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StorageConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.StorageConfig; + + /** + * Creates a plain object from a StorageConfig message. Also converts values to other types if specified. + * @param message StorageConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.StorageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StorageConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StorageConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RecoveryConfig. */ + interface IRecoveryConfig { + + /** RecoveryConfig scheduledSnapshotsConfig */ + scheduledSnapshotsConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig|null); + } + + /** Represents a RecoveryConfig. */ + class RecoveryConfig implements IRecoveryConfig { + + /** + * Constructs a new RecoveryConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig); + + /** RecoveryConfig scheduledSnapshotsConfig. */ + public scheduledSnapshotsConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig|null); + + /** + * Creates a new RecoveryConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns RecoveryConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig): google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig; + + /** + * Encodes the specified RecoveryConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.verify|verify} messages. + * @param message RecoveryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RecoveryConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.verify|verify} messages. + * @param message RecoveryConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RecoveryConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RecoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig; + + /** + * Decodes a RecoveryConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RecoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig; + + /** + * Verifies a RecoveryConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RecoveryConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RecoveryConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig; + + /** + * Creates a plain object from a RecoveryConfig message. Also converts values to other types if specified. + * @param message RecoveryConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RecoveryConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RecoveryConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ScheduledSnapshotsConfig. */ + interface IScheduledSnapshotsConfig { + + /** ScheduledSnapshotsConfig enabled */ + enabled?: (boolean|null); + + /** ScheduledSnapshotsConfig snapshotLocation */ + snapshotLocation?: (string|null); + + /** ScheduledSnapshotsConfig snapshotCreationSchedule */ + snapshotCreationSchedule?: (string|null); + + /** ScheduledSnapshotsConfig timeZone */ + timeZone?: (string|null); + } + + /** Represents a ScheduledSnapshotsConfig. */ + class ScheduledSnapshotsConfig implements IScheduledSnapshotsConfig { + + /** + * Constructs a new ScheduledSnapshotsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig); + + /** ScheduledSnapshotsConfig enabled. */ + public enabled: boolean; + + /** ScheduledSnapshotsConfig snapshotLocation. */ + public snapshotLocation: string; + + /** ScheduledSnapshotsConfig snapshotCreationSchedule. */ + public snapshotCreationSchedule: string; + + /** ScheduledSnapshotsConfig timeZone. */ + public timeZone: string; + + /** + * Creates a new ScheduledSnapshotsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ScheduledSnapshotsConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig): google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig; + + /** + * Encodes the specified ScheduledSnapshotsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.verify|verify} messages. + * @param message ScheduledSnapshotsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ScheduledSnapshotsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.verify|verify} messages. + * @param message ScheduledSnapshotsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ScheduledSnapshotsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ScheduledSnapshotsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig; + + /** + * Decodes a ScheduledSnapshotsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ScheduledSnapshotsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig; + + /** + * Verifies a ScheduledSnapshotsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ScheduledSnapshotsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ScheduledSnapshotsConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig; + + /** + * Creates a plain object from a ScheduledSnapshotsConfig message. Also converts values to other types if specified. + * @param message ScheduledSnapshotsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ScheduledSnapshotsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ScheduledSnapshotsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MasterAuthorizedNetworksConfig. */ + interface IMasterAuthorizedNetworksConfig { + + /** MasterAuthorizedNetworksConfig enabled */ + enabled?: (boolean|null); + + /** MasterAuthorizedNetworksConfig cidrBlocks */ + cidrBlocks?: (google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock[]|null); + } + + /** Represents a MasterAuthorizedNetworksConfig. */ + class MasterAuthorizedNetworksConfig implements IMasterAuthorizedNetworksConfig { + + /** + * Constructs a new MasterAuthorizedNetworksConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig); + + /** MasterAuthorizedNetworksConfig enabled. */ + public enabled: boolean; + + /** MasterAuthorizedNetworksConfig cidrBlocks. */ + public cidrBlocks: google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock[]; + + /** + * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns MasterAuthorizedNetworksConfig instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig): google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig; + + /** + * Encodes the specified MasterAuthorizedNetworksConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.verify|verify} messages. + * @param message MasterAuthorizedNetworksConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MasterAuthorizedNetworksConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.verify|verify} messages. + * @param message MasterAuthorizedNetworksConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MasterAuthorizedNetworksConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig; + + /** + * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MasterAuthorizedNetworksConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig; + + /** + * Verifies a MasterAuthorizedNetworksConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MasterAuthorizedNetworksConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MasterAuthorizedNetworksConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig; + + /** + * Creates a plain object from a MasterAuthorizedNetworksConfig message. Also converts values to other types if specified. + * @param message MasterAuthorizedNetworksConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MasterAuthorizedNetworksConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MasterAuthorizedNetworksConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MasterAuthorizedNetworksConfig { + + /** Properties of a CidrBlock. */ + interface ICidrBlock { + + /** CidrBlock displayName */ + displayName?: (string|null); + + /** CidrBlock cidrBlock */ + cidrBlock?: (string|null); + } + + /** Represents a CidrBlock. */ + class CidrBlock implements ICidrBlock { + + /** + * Constructs a new CidrBlock. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock); + + /** CidrBlock displayName. */ + public displayName: string; + + /** CidrBlock cidrBlock. */ + public cidrBlock: string; + + /** + * Creates a new CidrBlock instance using the specified properties. + * @param [properties] Properties to set + * @returns CidrBlock instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock): google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock; + + /** + * Encodes the specified CidrBlock message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. + * @param message CidrBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CidrBlock message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. + * @param message CidrBlock message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CidrBlock message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CidrBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock; + + /** + * Decodes a CidrBlock message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CidrBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock; + + /** + * Verifies a CidrBlock message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CidrBlock message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CidrBlock + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock; + + /** + * Creates a plain object from a CidrBlock message. Also converts values to other types if specified. + * @param message CidrBlock + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CidrBlock to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CidrBlock + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a CloudDataLineageIntegration. */ + interface ICloudDataLineageIntegration { + + /** CloudDataLineageIntegration enabled */ + enabled?: (boolean|null); + } + + /** Represents a CloudDataLineageIntegration. */ + class CloudDataLineageIntegration implements ICloudDataLineageIntegration { + + /** + * Constructs a new CloudDataLineageIntegration. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration); + + /** CloudDataLineageIntegration enabled. */ + public enabled: boolean; + + /** + * Creates a new CloudDataLineageIntegration instance using the specified properties. + * @param [properties] Properties to set + * @returns CloudDataLineageIntegration instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration): google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration; + + /** + * Encodes the specified CloudDataLineageIntegration message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.verify|verify} messages. + * @param message CloudDataLineageIntegration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CloudDataLineageIntegration message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.verify|verify} messages. + * @param message CloudDataLineageIntegration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CloudDataLineageIntegration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CloudDataLineageIntegration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration; + + /** + * Decodes a CloudDataLineageIntegration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CloudDataLineageIntegration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration; + + /** + * Verifies a CloudDataLineageIntegration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CloudDataLineageIntegration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CloudDataLineageIntegration + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration; + + /** + * Creates a plain object from a CloudDataLineageIntegration message. Also converts values to other types if specified. + * @param message CloudDataLineageIntegration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CloudDataLineageIntegration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CloudDataLineageIntegration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Environment. */ + interface IEnvironment { + + /** Environment name */ + name?: (string|null); + + /** Environment config */ + config?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig|null); + + /** Environment uuid */ + uuid?: (string|null); + + /** Environment state */ + state?: (google.cloud.orchestration.airflow.service.v1beta1.Environment.State|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.Environment.State|null); + + /** Environment createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Environment updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Environment labels */ + labels?: ({ [k: string]: string }|null); + + /** Environment satisfiesPzs */ + satisfiesPzs?: (boolean|null); + + /** Environment satisfiesPzi */ + satisfiesPzi?: (boolean|null); + + /** Environment storageConfig */ + storageConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig|null); + } + + /** Represents an Environment. */ + class Environment implements IEnvironment { + + /** + * Constructs a new Environment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEnvironment); + + /** Environment name. */ + public name: string; + + /** Environment config. */ + public config?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig|null); + + /** Environment uuid. */ + public uuid: string; + + /** Environment state. */ + public state: (google.cloud.orchestration.airflow.service.v1beta1.Environment.State|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.Environment.State); + + /** Environment createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Environment updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Environment labels. */ + public labels: { [k: string]: string }; + + /** Environment satisfiesPzs. */ + public satisfiesPzs: boolean; + + /** Environment satisfiesPzi. */ + public satisfiesPzi: boolean; + + /** Environment storageConfig. */ + public storageConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig|null); + + /** + * Creates a new Environment instance using the specified properties. + * @param [properties] Properties to set + * @returns Environment instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEnvironment): google.cloud.orchestration.airflow.service.v1beta1.Environment; + + /** + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.Environment.verify|verify} messages. + * @param message Environment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.Environment.verify|verify} messages. + * @param message Environment message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Environment message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.Environment; + + /** + * Decodes an Environment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.Environment; + + /** + * Verifies an Environment message. + * @param message Plain 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 Environment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Environment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.Environment; + + /** + * Creates a plain object from an Environment message. Also converts values to other types if specified. + * @param message Environment + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.Environment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Environment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Environment + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Environment { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + CREATING = 1, + RUNNING = 2, + UPDATING = 3, + DELETING = 4, + ERROR = 5 + } + } + + /** Properties of a CheckUpgradeRequest. */ + interface ICheckUpgradeRequest { + + /** CheckUpgradeRequest environment */ + environment?: (string|null); + + /** CheckUpgradeRequest imageVersion */ + imageVersion?: (string|null); + } + + /** Represents a CheckUpgradeRequest. */ + class CheckUpgradeRequest implements ICheckUpgradeRequest { + + /** + * Constructs a new CheckUpgradeRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest); + + /** CheckUpgradeRequest environment. */ + public environment: string; + + /** CheckUpgradeRequest imageVersion. */ + public imageVersion: string; + + /** + * Creates a new CheckUpgradeRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckUpgradeRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; + + /** + * Encodes the specified CheckUpgradeRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.verify|verify} messages. + * @param message CheckUpgradeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckUpgradeRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.verify|verify} messages. + * @param message CheckUpgradeRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckUpgradeRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; + + /** + * Decodes a CheckUpgradeRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; + + /** + * Verifies a CheckUpgradeRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckUpgradeRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckUpgradeRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; + + /** + * Creates a plain object from a CheckUpgradeRequest message. Also converts values to other types if specified. + * @param message CheckUpgradeRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckUpgradeRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckUpgradeRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CheckUpgradeResponse. */ + interface ICheckUpgradeResponse { + + /** CheckUpgradeResponse buildLogUri */ + buildLogUri?: (string|null); + + /** CheckUpgradeResponse containsPypiModulesConflict */ + containsPypiModulesConflict?: (google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult|null); + + /** CheckUpgradeResponse pypiConflictBuildLogExtract */ + pypiConflictBuildLogExtract?: (string|null); + + /** CheckUpgradeResponse imageVersion */ + imageVersion?: (string|null); + + /** CheckUpgradeResponse pypiDependencies */ + pypiDependencies?: ({ [k: string]: string }|null); + } + + /** Represents a CheckUpgradeResponse. */ + class CheckUpgradeResponse implements ICheckUpgradeResponse { + + /** + * Constructs a new CheckUpgradeResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse); + + /** CheckUpgradeResponse buildLogUri. */ + public buildLogUri: string; + + /** CheckUpgradeResponse containsPypiModulesConflict. */ + public containsPypiModulesConflict: (google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult); + + /** CheckUpgradeResponse pypiConflictBuildLogExtract. */ + public pypiConflictBuildLogExtract: string; + + /** CheckUpgradeResponse imageVersion. */ + public imageVersion: string; + + /** CheckUpgradeResponse pypiDependencies. */ + public pypiDependencies: { [k: string]: string }; + + /** + * Creates a new CheckUpgradeResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CheckUpgradeResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; + + /** + * Encodes the specified CheckUpgradeResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.verify|verify} messages. + * @param message CheckUpgradeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CheckUpgradeResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.verify|verify} messages. + * @param message CheckUpgradeResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CheckUpgradeResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CheckUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; + + /** + * Decodes a CheckUpgradeResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CheckUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; + + /** + * Verifies a CheckUpgradeResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CheckUpgradeResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CheckUpgradeResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; + + /** + * Creates a plain object from a CheckUpgradeResponse message. Also converts values to other types if specified. + * @param message CheckUpgradeResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CheckUpgradeResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CheckUpgradeResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CheckUpgradeResponse { + + /** ConflictResult enum. */ + enum ConflictResult { + CONFLICT_RESULT_UNSPECIFIED = 0, + CONFLICT = 1, + NO_CONFLICT = 2 + } + } + + /** Properties of an OperationMetadata. */ + interface IOperationMetadata { + + /** OperationMetadata state */ + state?: (google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State|null); + + /** OperationMetadata operationType */ + operationType?: (google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type|null); + + /** OperationMetadata resource */ + resource?: (string|null); + + /** OperationMetadata resourceUuid */ + resourceUuid?: (string|null); + + /** OperationMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents an OperationMetadata. */ + class OperationMetadata implements IOperationMetadata { + + /** + * Constructs a new OperationMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata); + + /** OperationMetadata state. */ + public state: (google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State); + + /** OperationMetadata operationType. */ + public operationType: (google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type); + + /** OperationMetadata resource. */ + public resource: string; + + /** OperationMetadata resourceUuid. */ + public resourceUuid: string; + + /** OperationMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** OperationMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns OperationMetadata instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata): google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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; + } + + namespace OperationMetadata { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PENDING = 1, + RUNNING = 2, + SUCCESSFUL = 3, + FAILED = 4 + } + + /** Type enum. */ + enum Type { + TYPE_UNSPECIFIED = 0, + CREATE = 1, + DELETE = 2, + UPDATE = 3, + CHECK = 4, + SAVE_SNAPSHOT = 5, + LOAD_SNAPSHOT = 6, + DATABASE_FAILOVER = 7 + } + } + + /** Represents an ImageVersions */ + class ImageVersions extends $protobuf.rpc.Service { + + /** + * Constructs a new ImageVersions 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 ImageVersions 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): ImageVersions; + + /** + * Calls ListImageVersions. + * @param request ListImageVersionsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListImageVersionsResponse + */ + public listImageVersions(request: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.ImageVersions.ListImageVersionsCallback): void; + + /** + * Calls ListImageVersions. + * @param request ListImageVersionsRequest message or plain object + * @returns Promise + */ + public listImageVersions(request: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest): Promise; + } + + namespace ImageVersions { + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersions|listImageVersions}. + * @param error Error, if any + * @param [response] ListImageVersionsResponse + */ + type ListImageVersionsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse) => void; + } + + /** Properties of a ListImageVersionsRequest. */ + interface IListImageVersionsRequest { + + /** ListImageVersionsRequest parent */ + parent?: (string|null); + + /** ListImageVersionsRequest pageSize */ + pageSize?: (number|null); + + /** ListImageVersionsRequest pageToken */ + pageToken?: (string|null); + + /** ListImageVersionsRequest includePastReleases */ + includePastReleases?: (boolean|null); + } + + /** Represents a ListImageVersionsRequest. */ + class ListImageVersionsRequest implements IListImageVersionsRequest { + + /** + * Constructs a new ListImageVersionsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest); + + /** ListImageVersionsRequest parent. */ + public parent: string; + + /** ListImageVersionsRequest pageSize. */ + public pageSize: number; + + /** ListImageVersionsRequest pageToken. */ + public pageToken: string; + + /** ListImageVersionsRequest includePastReleases. */ + public includePastReleases: boolean; + + /** + * Creates a new ListImageVersionsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListImageVersionsRequest instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest; + + /** + * Encodes the specified ListImageVersionsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.verify|verify} messages. + * @param message ListImageVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListImageVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.verify|verify} messages. + * @param message ListImageVersionsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListImageVersionsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListImageVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest; + + /** + * Decodes a ListImageVersionsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListImageVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest; + + /** + * Verifies a ListImageVersionsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListImageVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListImageVersionsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest; + + /** + * Creates a plain object from a ListImageVersionsRequest message. Also converts values to other types if specified. + * @param message ListImageVersionsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListImageVersionsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListImageVersionsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListImageVersionsResponse. */ + interface IListImageVersionsResponse { + + /** ListImageVersionsResponse imageVersions */ + imageVersions?: (google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[]|null); + + /** ListImageVersionsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListImageVersionsResponse. */ + class ListImageVersionsResponse implements IListImageVersionsResponse { + + /** + * Constructs a new ListImageVersionsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse); + + /** ListImageVersionsResponse imageVersions. */ + public imageVersions: google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[]; + + /** ListImageVersionsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListImageVersionsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListImageVersionsResponse instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse; + + /** + * Encodes the specified ListImageVersionsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.verify|verify} messages. + * @param message ListImageVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListImageVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.verify|verify} messages. + * @param message ListImageVersionsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListImageVersionsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListImageVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse; + + /** + * Decodes a ListImageVersionsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListImageVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse; + + /** + * Verifies a ListImageVersionsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListImageVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListImageVersionsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse; + + /** + * Creates a plain object from a ListImageVersionsResponse message. Also converts values to other types if specified. + * @param message ListImageVersionsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListImageVersionsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListImageVersionsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ImageVersion. */ + interface IImageVersion { + + /** ImageVersion imageVersionId */ + imageVersionId?: (string|null); + + /** ImageVersion isDefault */ + isDefault?: (boolean|null); + + /** ImageVersion supportedPythonVersions */ + supportedPythonVersions?: (string[]|null); + + /** ImageVersion releaseDate */ + releaseDate?: (google.type.IDate|null); + + /** ImageVersion creationDisabled */ + creationDisabled?: (boolean|null); + + /** ImageVersion upgradeDisabled */ + upgradeDisabled?: (boolean|null); + } + + /** Represents an ImageVersion. */ + class ImageVersion implements IImageVersion { + + /** + * Constructs a new ImageVersion. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IImageVersion); + + /** ImageVersion imageVersionId. */ + public imageVersionId: string; + + /** ImageVersion isDefault. */ + public isDefault: boolean; + + /** ImageVersion supportedPythonVersions. */ + public supportedPythonVersions: string[]; + + /** ImageVersion releaseDate. */ + public releaseDate?: (google.type.IDate|null); + + /** ImageVersion creationDisabled. */ + public creationDisabled: boolean; + + /** ImageVersion upgradeDisabled. */ + public upgradeDisabled: boolean; + + /** + * Creates a new ImageVersion instance using the specified properties. + * @param [properties] Properties to set + * @returns ImageVersion instance + */ + public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IImageVersion): google.cloud.orchestration.airflow.service.v1beta1.ImageVersion; + + /** + * Encodes the specified ImageVersion message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.verify|verify} messages. + * @param message ImageVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IImageVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ImageVersion message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.verify|verify} messages. + * @param message ImageVersion message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IImageVersion, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ImageVersion message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ImageVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ImageVersion; + + /** + * Decodes an ImageVersion message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ImageVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ImageVersion; + + /** + * Verifies an ImageVersion message. + * @param message Plain 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 ImageVersion message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ImageVersion + */ + public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ImageVersion; + + /** + * Creates a plain object from an ImageVersion message. Also converts values to other types if specified. + * @param message ImageVersion + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ImageVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ImageVersion to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ImageVersion + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** 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 + } + + /** 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; + } + } + + /** 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); + } + + /** 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|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|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 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 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 an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|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|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; + } + + /** 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; + } + } + + /** 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; + } + } + + /** Namespace type. */ + namespace type { + + /** Properties of a Date. */ + interface IDate { + + /** Date year */ + year?: (number|null); + + /** Date month */ + month?: (number|null); + + /** Date day */ + day?: (number|null); + } + + /** Represents a Date. */ + class Date implements IDate { + + /** + * Constructs a new Date. + * @param [properties] Properties to set + */ + constructor(properties?: google.type.IDate); + + /** Date year. */ + public year: number; + + /** Date month. */ + public month: number; + + /** Date day. */ + public day: number; + + /** + * Creates a new Date instance using the specified properties. + * @param [properties] Properties to set + * @returns Date instance + */ + public static create(properties?: google.type.IDate): google.type.Date; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @param message Date message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Date message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; + + /** + * Verifies a Date message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Date + */ + public static fromObject(object: { [k: string]: any }): google.type.Date; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @param message Date + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Date to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Date + * @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-orchestration-airflow-service/v1beta1/protos/protos.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.js new file mode 100644 index 00000000000..36cbcc534b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.js @@ -0,0 +1,43000 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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_orchestration_airflow_protos || ($protobuf.roots._google_cloud_orchestration_airflow_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.orchestration = (function() { + + /** + * Namespace orchestration. + * @memberof google.cloud + * @namespace + */ + var orchestration = {}; + + orchestration.airflow = (function() { + + /** + * Namespace airflow. + * @memberof google.cloud.orchestration + * @namespace + */ + var airflow = {}; + + airflow.service = (function() { + + /** + * Namespace service. + * @memberof google.cloud.orchestration.airflow + * @namespace + */ + var service = {}; + + service.v1beta1 = (function() { + + /** + * Namespace v1beta1. + * @memberof google.cloud.orchestration.airflow.service + * @namespace + */ + var v1beta1 = {}; + + v1beta1.Environments = (function() { + + /** + * Constructs a new Environments service. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an Environments + * @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 Environments(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (Environments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Environments; + + /** + * Creates new Environments service using the specified rpc implementation. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @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 {Environments} RPC service. Useful where requests and/or responses are streamed. + */ + Environments.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|createEnvironment}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef CreateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.createEnvironment = function createEnvironment(request, callback) { + return this.rpcCall(createEnvironment, $root.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CreateEnvironment" }); + + /** + * Calls CreateEnvironment. + * @function createEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|getEnvironment}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef GetEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environment} [response] Environment + */ + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.getEnvironment = function getEnvironment(request, callback) { + return this.rpcCall(getEnvironment, $root.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.Environment, request, callback); + }, "name", { value: "GetEnvironment" }); + + /** + * Calls GetEnvironment. + * @function getEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listEnvironments}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef ListEnvironmentsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse + */ + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.listEnvironments = function listEnvironments(request, callback) { + return this.rpcCall(listEnvironments, $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse, request, callback); + }, "name", { value: "ListEnvironments" }); + + /** + * Calls ListEnvironments. + * @function listEnvironments + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|updateEnvironment}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef UpdateEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.updateEnvironment = function updateEnvironment(request, callback) { + return this.rpcCall(updateEnvironment, $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "UpdateEnvironment" }); + + /** + * Calls UpdateEnvironment. + * @function updateEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|deleteEnvironment}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef DeleteEnvironmentCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { + return this.rpcCall(deleteEnvironment, $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DeleteEnvironment" }); + + /** + * Calls DeleteEnvironment. + * @function deleteEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|restartWebServer}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef RestartWebServerCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls RestartWebServer. + * @function restartWebServer + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest} request RestartWebServerRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.RestartWebServerCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.restartWebServer = function restartWebServer(request, callback) { + return this.rpcCall(restartWebServer, $root.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "RestartWebServer" }); + + /** + * Calls RestartWebServer. + * @function restartWebServer + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest} request RestartWebServerRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|checkUpgrade}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef CheckUpgradeCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls CheckUpgrade. + * @function checkUpgrade + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest} request CheckUpgradeRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.CheckUpgradeCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.checkUpgrade = function checkUpgrade(request, callback) { + return this.rpcCall(checkUpgrade, $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CheckUpgrade" }); + + /** + * Calls CheckUpgrade. + * @function checkUpgrade + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest} request CheckUpgradeRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|executeAirflowCommand}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef ExecuteAirflowCommandCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse} [response] ExecuteAirflowCommandResponse + */ + + /** + * Calls ExecuteAirflowCommand. + * @function executeAirflowCommand + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest} request ExecuteAirflowCommandRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.ExecuteAirflowCommandCallback} callback Node-style callback called with the error, if any, and ExecuteAirflowCommandResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.executeAirflowCommand = function executeAirflowCommand(request, callback) { + return this.rpcCall(executeAirflowCommand, $root.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse, request, callback); + }, "name", { value: "ExecuteAirflowCommand" }); + + /** + * Calls ExecuteAirflowCommand. + * @function executeAirflowCommand + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest} request ExecuteAirflowCommandRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|stopAirflowCommand}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef StopAirflowCommandCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse} [response] StopAirflowCommandResponse + */ + + /** + * Calls StopAirflowCommand. + * @function stopAirflowCommand + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest} request StopAirflowCommandRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.StopAirflowCommandCallback} callback Node-style callback called with the error, if any, and StopAirflowCommandResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.stopAirflowCommand = function stopAirflowCommand(request, callback) { + return this.rpcCall(stopAirflowCommand, $root.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse, request, callback); + }, "name", { value: "StopAirflowCommand" }); + + /** + * Calls StopAirflowCommand. + * @function stopAirflowCommand + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest} request StopAirflowCommandRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|pollAirflowCommand}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef PollAirflowCommandCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse} [response] PollAirflowCommandResponse + */ + + /** + * Calls PollAirflowCommand. + * @function pollAirflowCommand + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest} request PollAirflowCommandRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.PollAirflowCommandCallback} callback Node-style callback called with the error, if any, and PollAirflowCommandResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.pollAirflowCommand = function pollAirflowCommand(request, callback) { + return this.rpcCall(pollAirflowCommand, $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse, request, callback); + }, "name", { value: "PollAirflowCommand" }); + + /** + * Calls PollAirflowCommand. + * @function pollAirflowCommand + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest} request PollAirflowCommandRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listWorkloads}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef ListWorkloadsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse} [response] ListWorkloadsResponse + */ + + /** + * Calls ListWorkloads. + * @function listWorkloads + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest} request ListWorkloadsRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.ListWorkloadsCallback} callback Node-style callback called with the error, if any, and ListWorkloadsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.listWorkloads = function listWorkloads(request, callback) { + return this.rpcCall(listWorkloads, $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse, request, callback); + }, "name", { value: "ListWorkloads" }); + + /** + * Calls ListWorkloads. + * @function listWorkloads + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest} request ListWorkloadsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|createUserWorkloadsSecret}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef CreateUserWorkloadsSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} [response] UserWorkloadsSecret + */ + + /** + * Calls CreateUserWorkloadsSecret. + * @function createUserWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest} request CreateUserWorkloadsSecretRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateUserWorkloadsSecretCallback} callback Node-style callback called with the error, if any, and UserWorkloadsSecret + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.createUserWorkloadsSecret = function createUserWorkloadsSecret(request, callback) { + return this.rpcCall(createUserWorkloadsSecret, $root.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret, request, callback); + }, "name", { value: "CreateUserWorkloadsSecret" }); + + /** + * Calls CreateUserWorkloadsSecret. + * @function createUserWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest} request CreateUserWorkloadsSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|getUserWorkloadsSecret}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef GetUserWorkloadsSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} [response] UserWorkloadsSecret + */ + + /** + * Calls GetUserWorkloadsSecret. + * @function getUserWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest} request GetUserWorkloadsSecretRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.GetUserWorkloadsSecretCallback} callback Node-style callback called with the error, if any, and UserWorkloadsSecret + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.getUserWorkloadsSecret = function getUserWorkloadsSecret(request, callback) { + return this.rpcCall(getUserWorkloadsSecret, $root.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret, request, callback); + }, "name", { value: "GetUserWorkloadsSecret" }); + + /** + * Calls GetUserWorkloadsSecret. + * @function getUserWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest} request GetUserWorkloadsSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listUserWorkloadsSecrets}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef ListUserWorkloadsSecretsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse} [response] ListUserWorkloadsSecretsResponse + */ + + /** + * Calls ListUserWorkloadsSecrets. + * @function listUserWorkloadsSecrets + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest} request ListUserWorkloadsSecretsRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.ListUserWorkloadsSecretsCallback} callback Node-style callback called with the error, if any, and ListUserWorkloadsSecretsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.listUserWorkloadsSecrets = function listUserWorkloadsSecrets(request, callback) { + return this.rpcCall(listUserWorkloadsSecrets, $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse, request, callback); + }, "name", { value: "ListUserWorkloadsSecrets" }); + + /** + * Calls ListUserWorkloadsSecrets. + * @function listUserWorkloadsSecrets + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest} request ListUserWorkloadsSecretsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|updateUserWorkloadsSecret}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef UpdateUserWorkloadsSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} [response] UserWorkloadsSecret + */ + + /** + * Calls UpdateUserWorkloadsSecret. + * @function updateUserWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest} request UpdateUserWorkloadsSecretRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateUserWorkloadsSecretCallback} callback Node-style callback called with the error, if any, and UserWorkloadsSecret + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.updateUserWorkloadsSecret = function updateUserWorkloadsSecret(request, callback) { + return this.rpcCall(updateUserWorkloadsSecret, $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret, request, callback); + }, "name", { value: "UpdateUserWorkloadsSecret" }); + + /** + * Calls UpdateUserWorkloadsSecret. + * @function updateUserWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest} request UpdateUserWorkloadsSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|deleteUserWorkloadsSecret}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef DeleteUserWorkloadsSecretCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteUserWorkloadsSecret. + * @function deleteUserWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest} request DeleteUserWorkloadsSecretRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteUserWorkloadsSecretCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.deleteUserWorkloadsSecret = function deleteUserWorkloadsSecret(request, callback) { + return this.rpcCall(deleteUserWorkloadsSecret, $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteUserWorkloadsSecret" }); + + /** + * Calls DeleteUserWorkloadsSecret. + * @function deleteUserWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest} request DeleteUserWorkloadsSecretRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|createUserWorkloadsConfigMap}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef CreateUserWorkloadsConfigMapCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} [response] UserWorkloadsConfigMap + */ + + /** + * Calls CreateUserWorkloadsConfigMap. + * @function createUserWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest} request CreateUserWorkloadsConfigMapRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateUserWorkloadsConfigMapCallback} callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.createUserWorkloadsConfigMap = function createUserWorkloadsConfigMap(request, callback) { + return this.rpcCall(createUserWorkloadsConfigMap, $root.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap, request, callback); + }, "name", { value: "CreateUserWorkloadsConfigMap" }); + + /** + * Calls CreateUserWorkloadsConfigMap. + * @function createUserWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest} request CreateUserWorkloadsConfigMapRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|getUserWorkloadsConfigMap}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef GetUserWorkloadsConfigMapCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} [response] UserWorkloadsConfigMap + */ + + /** + * Calls GetUserWorkloadsConfigMap. + * @function getUserWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest} request GetUserWorkloadsConfigMapRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.GetUserWorkloadsConfigMapCallback} callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.getUserWorkloadsConfigMap = function getUserWorkloadsConfigMap(request, callback) { + return this.rpcCall(getUserWorkloadsConfigMap, $root.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap, request, callback); + }, "name", { value: "GetUserWorkloadsConfigMap" }); + + /** + * Calls GetUserWorkloadsConfigMap. + * @function getUserWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest} request GetUserWorkloadsConfigMapRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listUserWorkloadsConfigMaps}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef ListUserWorkloadsConfigMapsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse} [response] ListUserWorkloadsConfigMapsResponse + */ + + /** + * Calls ListUserWorkloadsConfigMaps. + * @function listUserWorkloadsConfigMaps + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest} request ListUserWorkloadsConfigMapsRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.ListUserWorkloadsConfigMapsCallback} callback Node-style callback called with the error, if any, and ListUserWorkloadsConfigMapsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.listUserWorkloadsConfigMaps = function listUserWorkloadsConfigMaps(request, callback) { + return this.rpcCall(listUserWorkloadsConfigMaps, $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse, request, callback); + }, "name", { value: "ListUserWorkloadsConfigMaps" }); + + /** + * Calls ListUserWorkloadsConfigMaps. + * @function listUserWorkloadsConfigMaps + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest} request ListUserWorkloadsConfigMapsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|updateUserWorkloadsConfigMap}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef UpdateUserWorkloadsConfigMapCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} [response] UserWorkloadsConfigMap + */ + + /** + * Calls UpdateUserWorkloadsConfigMap. + * @function updateUserWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest} request UpdateUserWorkloadsConfigMapRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateUserWorkloadsConfigMapCallback} callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.updateUserWorkloadsConfigMap = function updateUserWorkloadsConfigMap(request, callback) { + return this.rpcCall(updateUserWorkloadsConfigMap, $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap, request, callback); + }, "name", { value: "UpdateUserWorkloadsConfigMap" }); + + /** + * Calls UpdateUserWorkloadsConfigMap. + * @function updateUserWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest} request UpdateUserWorkloadsConfigMapRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|deleteUserWorkloadsConfigMap}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef DeleteUserWorkloadsConfigMapCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteUserWorkloadsConfigMap. + * @function deleteUserWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest} request DeleteUserWorkloadsConfigMapRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteUserWorkloadsConfigMapCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.deleteUserWorkloadsConfigMap = function deleteUserWorkloadsConfigMap(request, callback) { + return this.rpcCall(deleteUserWorkloadsConfigMap, $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteUserWorkloadsConfigMap" }); + + /** + * Calls DeleteUserWorkloadsConfigMap. + * @function deleteUserWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest} request DeleteUserWorkloadsConfigMapRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|saveSnapshot}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef SaveSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls SaveSnapshot. + * @function saveSnapshot + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest} request SaveSnapshotRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.SaveSnapshotCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.saveSnapshot = function saveSnapshot(request, callback) { + return this.rpcCall(saveSnapshot, $root.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "SaveSnapshot" }); + + /** + * Calls SaveSnapshot. + * @function saveSnapshot + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest} request SaveSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|loadSnapshot}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef LoadSnapshotCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls LoadSnapshot. + * @function loadSnapshot + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest} request LoadSnapshotRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.LoadSnapshotCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.loadSnapshot = function loadSnapshot(request, callback) { + return this.rpcCall(loadSnapshot, $root.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "LoadSnapshot" }); + + /** + * Calls LoadSnapshot. + * @function loadSnapshot + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest} request LoadSnapshotRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|databaseFailover}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef DatabaseFailoverCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls DatabaseFailover. + * @function databaseFailover + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest} request DatabaseFailoverRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.DatabaseFailoverCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.databaseFailover = function databaseFailover(request, callback) { + return this.rpcCall(databaseFailover, $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "DatabaseFailover" }); + + /** + * Calls DatabaseFailover. + * @function databaseFailover + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest} request DatabaseFailoverRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|fetchDatabaseProperties}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @typedef FetchDatabasePropertiesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse} [response] FetchDatabasePropertiesResponse + */ + + /** + * Calls FetchDatabaseProperties. + * @function fetchDatabaseProperties + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest} request FetchDatabasePropertiesRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.FetchDatabasePropertiesCallback} callback Node-style callback called with the error, if any, and FetchDatabasePropertiesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Environments.prototype.fetchDatabaseProperties = function fetchDatabaseProperties(request, callback) { + return this.rpcCall(fetchDatabaseProperties, $root.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse, request, callback); + }, "name", { value: "FetchDatabaseProperties" }); + + /** + * Calls FetchDatabaseProperties. + * @function fetchDatabaseProperties + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest} request FetchDatabasePropertiesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return Environments; + })(); + + v1beta1.CreateEnvironmentRequest = (function() { + + /** + * Properties of a CreateEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface ICreateEnvironmentRequest + * @property {string|null} [parent] CreateEnvironmentRequest parent + * @property {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null} [environment] CreateEnvironmentRequest environment + */ + + /** + * Constructs a new CreateEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a CreateEnvironmentRequest. + * @implements ICreateEnvironmentRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest=} [properties] Properties to set + */ + function CreateEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateEnvironmentRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.parent = ""; + + /** + * CreateEnvironmentRequest environment. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null|undefined} environment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @instance + */ + CreateEnvironmentRequest.prototype.environment = null; + + /** + * Creates a new CreateEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} CreateEnvironmentRequest instance + */ + CreateEnvironmentRequest.create = function create(properties) { + return new CreateEnvironmentRequest(properties); + }; + + /** + * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEnvironmentRequest.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.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} CreateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateEnvironmentRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateEnvironmentRequest.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.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.verify(message.environment); + if (error) + return "environment." + error; + } + return null; + }; + + /** + * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} CreateEnvironmentRequest + */ + CreateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.fromObject(object.environment); + } + return message; + }; + + /** + * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} message CreateEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.environment = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.toObject(message.environment, options); + return object; + }; + + /** + * Converts this CreateEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + CreateEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest"; + }; + + return CreateEnvironmentRequest; + })(); + + v1beta1.GetEnvironmentRequest = (function() { + + /** + * Properties of a GetEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IGetEnvironmentRequest + * @property {string|null} [name] GetEnvironmentRequest name + */ + + /** + * Constructs a new GetEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a GetEnvironmentRequest. + * @implements IGetEnvironmentRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest=} [properties] Properties to set + */ + function GetEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @instance + */ + GetEnvironmentRequest.prototype.name = ""; + + /** + * Creates a new GetEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} GetEnvironmentRequest instance + */ + GetEnvironmentRequest.create = function create(properties) { + return new GetEnvironmentRequest(properties); + }; + + /** + * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnvironmentRequest.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 GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} GetEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetEnvironmentRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetEnvironmentRequest.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 GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} GetEnvironmentRequest + */ + GetEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} message GetEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetEnvironmentRequest.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 GetEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + GetEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest"; + }; + + return GetEnvironmentRequest; + })(); + + v1beta1.ListEnvironmentsRequest = (function() { + + /** + * Properties of a ListEnvironmentsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IListEnvironmentsRequest + * @property {string|null} [parent] ListEnvironmentsRequest parent + * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize + * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken + */ + + /** + * Constructs a new ListEnvironmentsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a ListEnvironmentsRequest. + * @implements IListEnvironmentsRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest=} [properties] Properties to set + */ + function ListEnvironmentsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEnvironmentsRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.parent = ""; + + /** + * ListEnvironmentsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.pageSize = 0; + + /** + * ListEnvironmentsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @instance + */ + ListEnvironmentsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListEnvironmentsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} ListEnvironmentsRequest instance + */ + ListEnvironmentsRequest.create = function create(properties) { + return new ListEnvironmentsRequest(properties); + }; + + /** + * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} ListEnvironmentsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEnvironmentsRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEnvironmentsRequest.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"; + return null; + }; + + /** + * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} ListEnvironmentsRequest + */ + ListEnvironmentsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} message ListEnvironmentsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEnvironmentsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListEnvironmentsRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @instance + * @returns {Object.} JSON object + */ + ListEnvironmentsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEnvironmentsRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEnvironmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest"; + }; + + return ListEnvironmentsRequest; + })(); + + v1beta1.ListEnvironmentsResponse = (function() { + + /** + * Properties of a ListEnvironmentsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IListEnvironmentsResponse + * @property {Array.|null} [environments] ListEnvironmentsResponse environments + * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken + */ + + /** + * Constructs a new ListEnvironmentsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a ListEnvironmentsResponse. + * @implements IListEnvironmentsResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse=} [properties] Properties to set + */ + function ListEnvironmentsResponse(properties) { + this.environments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListEnvironmentsResponse environments. + * @member {Array.} environments + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @instance + */ + ListEnvironmentsResponse.prototype.environments = $util.emptyArray; + + /** + * ListEnvironmentsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @instance + */ + ListEnvironmentsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListEnvironmentsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} ListEnvironmentsResponse instance + */ + ListEnvironmentsResponse.create = function create(properties) { + return new ListEnvironmentsResponse(properties); + }; + + /** + * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environments != null && message.environments.length) + for (var i = 0; i < message.environments.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.encode(message.environments[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 ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.environments && message.environments.length)) + message.environments = []; + message.environments.push($root.google.cloud.orchestration.airflow.service.v1beta1.Environment.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListEnvironmentsResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListEnvironmentsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environments != null && message.hasOwnProperty("environments")) { + if (!Array.isArray(message.environments)) + return "environments: array expected"; + for (var i = 0; i < message.environments.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.verify(message.environments[i]); + if (error) + return "environments." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} ListEnvironmentsResponse + */ + ListEnvironmentsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse(); + if (object.environments) { + if (!Array.isArray(object.environments)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.environments: array expected"); + message.environments = []; + for (var i = 0; i < object.environments.length; ++i) { + if (typeof object.environments[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.environments: object expected"); + message.environments[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.fromObject(object.environments[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} message ListEnvironmentsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListEnvironmentsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.environments = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.environments && message.environments.length) { + object.environments = []; + for (var j = 0; j < message.environments.length; ++j) + object.environments[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.toObject(message.environments[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListEnvironmentsResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @instance + * @returns {Object.} JSON object + */ + ListEnvironmentsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListEnvironmentsResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListEnvironmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse"; + }; + + return ListEnvironmentsResponse; + })(); + + v1beta1.DeleteEnvironmentRequest = (function() { + + /** + * Properties of a DeleteEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IDeleteEnvironmentRequest + * @property {string|null} [name] DeleteEnvironmentRequest name + */ + + /** + * Constructs a new DeleteEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a DeleteEnvironmentRequest. + * @implements IDeleteEnvironmentRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest=} [properties] Properties to set + */ + function DeleteEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @instance + */ + DeleteEnvironmentRequest.prototype.name = ""; + + /** + * Creates a new DeleteEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance + */ + DeleteEnvironmentRequest.create = function create(properties) { + return new DeleteEnvironmentRequest(properties); + }; + + /** + * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEnvironmentRequest.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 DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteEnvironmentRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteEnvironmentRequest.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 DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest + */ + DeleteEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteEnvironmentRequest.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 DeleteEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest"; + }; + + return DeleteEnvironmentRequest; + })(); + + v1beta1.UpdateEnvironmentRequest = (function() { + + /** + * Properties of an UpdateEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IUpdateEnvironmentRequest + * @property {string|null} [name] UpdateEnvironmentRequest name + * @property {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask + */ + + /** + * Constructs a new UpdateEnvironmentRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an UpdateEnvironmentRequest. + * @implements IUpdateEnvironmentRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest=} [properties] Properties to set + */ + function UpdateEnvironmentRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateEnvironmentRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.name = ""; + + /** + * UpdateEnvironmentRequest environment. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null|undefined} environment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.environment = null; + + /** + * UpdateEnvironmentRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @instance + */ + UpdateEnvironmentRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateEnvironmentRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance + */ + UpdateEnvironmentRequest.create = function create(properties) { + return new UpdateEnvironmentRequest(properties); + }; + + /** + * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEnvironmentRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.encode(message.environment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEnvironmentRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.name = reader.string(); + break; + } + case 1: { + message.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.decode(reader, reader.uint32()); + break; + } + case 3: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateEnvironmentRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateEnvironmentRequest.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.environment != null && message.hasOwnProperty("environment")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.verify(message.environment); + if (error) + return "environment." + 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 UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest + */ + UpdateEnvironmentRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.environment != null) { + if (typeof object.environment !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.environment: object expected"); + message.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.fromObject(object.environment); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateEnvironmentRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = null; + object.name = ""; + object.updateMask = null; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.toObject(message.environment, options); + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateEnvironmentRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateEnvironmentRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest"; + }; + + return UpdateEnvironmentRequest; + })(); + + v1beta1.RestartWebServerRequest = (function() { + + /** + * Properties of a RestartWebServerRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IRestartWebServerRequest + * @property {string|null} [name] RestartWebServerRequest name + */ + + /** + * Constructs a new RestartWebServerRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a RestartWebServerRequest. + * @implements IRestartWebServerRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest=} [properties] Properties to set + */ + function RestartWebServerRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RestartWebServerRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @instance + */ + RestartWebServerRequest.prototype.name = ""; + + /** + * Creates a new RestartWebServerRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} RestartWebServerRequest instance + */ + RestartWebServerRequest.create = function create(properties) { + return new RestartWebServerRequest(properties); + }; + + /** + * Encodes the specified RestartWebServerRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest} message RestartWebServerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestartWebServerRequest.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 RestartWebServerRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest} message RestartWebServerRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RestartWebServerRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RestartWebServerRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} RestartWebServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestartWebServerRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RestartWebServerRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} RestartWebServerRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RestartWebServerRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RestartWebServerRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RestartWebServerRequest.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 RestartWebServerRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} RestartWebServerRequest + */ + RestartWebServerRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a RestartWebServerRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} message RestartWebServerRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RestartWebServerRequest.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 RestartWebServerRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @instance + * @returns {Object.} JSON object + */ + RestartWebServerRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RestartWebServerRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RestartWebServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest"; + }; + + return RestartWebServerRequest; + })(); + + v1beta1.ExecuteAirflowCommandRequest = (function() { + + /** + * Properties of an ExecuteAirflowCommandRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IExecuteAirflowCommandRequest + * @property {string|null} [environment] ExecuteAirflowCommandRequest environment + * @property {string|null} [command] ExecuteAirflowCommandRequest command + * @property {string|null} [subcommand] ExecuteAirflowCommandRequest subcommand + * @property {Array.|null} [parameters] ExecuteAirflowCommandRequest parameters + */ + + /** + * Constructs a new ExecuteAirflowCommandRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an ExecuteAirflowCommandRequest. + * @implements IExecuteAirflowCommandRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest=} [properties] Properties to set + */ + function ExecuteAirflowCommandRequest(properties) { + this.parameters = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecuteAirflowCommandRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + * @instance + */ + ExecuteAirflowCommandRequest.prototype.environment = ""; + + /** + * ExecuteAirflowCommandRequest command. + * @member {string} command + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + * @instance + */ + ExecuteAirflowCommandRequest.prototype.command = ""; + + /** + * ExecuteAirflowCommandRequest subcommand. + * @member {string} subcommand + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + * @instance + */ + ExecuteAirflowCommandRequest.prototype.subcommand = ""; + + /** + * ExecuteAirflowCommandRequest parameters. + * @member {Array.} parameters + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + * @instance + */ + ExecuteAirflowCommandRequest.prototype.parameters = $util.emptyArray; + + /** + * Creates a new ExecuteAirflowCommandRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest} ExecuteAirflowCommandRequest instance + */ + ExecuteAirflowCommandRequest.create = function create(properties) { + return new ExecuteAirflowCommandRequest(properties); + }; + + /** + * Encodes the specified ExecuteAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest} message ExecuteAirflowCommandRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteAirflowCommandRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.command != null && Object.hasOwnProperty.call(message, "command")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.command); + if (message.subcommand != null && Object.hasOwnProperty.call(message, "subcommand")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.subcommand); + if (message.parameters != null && message.parameters.length) + for (var i = 0; i < message.parameters.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.parameters[i]); + return writer; + }; + + /** + * Encodes the specified ExecuteAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest} message ExecuteAirflowCommandRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteAirflowCommandRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecuteAirflowCommandRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest} ExecuteAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteAirflowCommandRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); + break; + } + case 2: { + message.command = reader.string(); + break; + } + case 3: { + message.subcommand = reader.string(); + break; + } + case 4: { + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecuteAirflowCommandRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest} ExecuteAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteAirflowCommandRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecuteAirflowCommandRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecuteAirflowCommandRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.command != null && message.hasOwnProperty("command")) + if (!$util.isString(message.command)) + return "command: string expected"; + if (message.subcommand != null && message.hasOwnProperty("subcommand")) + if (!$util.isString(message.subcommand)) + return "subcommand: string expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!Array.isArray(message.parameters)) + return "parameters: array expected"; + for (var i = 0; i < message.parameters.length; ++i) + if (!$util.isString(message.parameters[i])) + return "parameters: string[] expected"; + } + return null; + }; + + /** + * Creates an ExecuteAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest} ExecuteAirflowCommandRequest + */ + ExecuteAirflowCommandRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.command != null) + message.command = String(object.command); + if (object.subcommand != null) + message.subcommand = String(object.subcommand); + if (object.parameters) { + if (!Array.isArray(object.parameters)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest.parameters: array expected"); + message.parameters = []; + for (var i = 0; i < object.parameters.length; ++i) + message.parameters[i] = String(object.parameters[i]); + } + return message; + }; + + /** + * Creates a plain object from an ExecuteAirflowCommandRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest} message ExecuteAirflowCommandRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecuteAirflowCommandRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.parameters = []; + if (options.defaults) { + object.environment = ""; + object.command = ""; + object.subcommand = ""; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.command != null && message.hasOwnProperty("command")) + object.command = message.command; + if (message.subcommand != null && message.hasOwnProperty("subcommand")) + object.subcommand = message.subcommand; + if (message.parameters && message.parameters.length) { + object.parameters = []; + for (var j = 0; j < message.parameters.length; ++j) + object.parameters[j] = message.parameters[j]; + } + return object; + }; + + /** + * Converts this ExecuteAirflowCommandRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + * @instance + * @returns {Object.} JSON object + */ + ExecuteAirflowCommandRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecuteAirflowCommandRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecuteAirflowCommandRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest"; + }; + + return ExecuteAirflowCommandRequest; + })(); + + v1beta1.ExecuteAirflowCommandResponse = (function() { + + /** + * Properties of an ExecuteAirflowCommandResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IExecuteAirflowCommandResponse + * @property {string|null} [executionId] ExecuteAirflowCommandResponse executionId + * @property {string|null} [pod] ExecuteAirflowCommandResponse pod + * @property {string|null} [podNamespace] ExecuteAirflowCommandResponse podNamespace + * @property {string|null} [error] ExecuteAirflowCommandResponse error + */ + + /** + * Constructs a new ExecuteAirflowCommandResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an ExecuteAirflowCommandResponse. + * @implements IExecuteAirflowCommandResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse=} [properties] Properties to set + */ + function ExecuteAirflowCommandResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExecuteAirflowCommandResponse executionId. + * @member {string} executionId + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse + * @instance + */ + ExecuteAirflowCommandResponse.prototype.executionId = ""; + + /** + * ExecuteAirflowCommandResponse pod. + * @member {string} pod + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse + * @instance + */ + ExecuteAirflowCommandResponse.prototype.pod = ""; + + /** + * ExecuteAirflowCommandResponse podNamespace. + * @member {string} podNamespace + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse + * @instance + */ + ExecuteAirflowCommandResponse.prototype.podNamespace = ""; + + /** + * ExecuteAirflowCommandResponse error. + * @member {string} error + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse + * @instance + */ + ExecuteAirflowCommandResponse.prototype.error = ""; + + /** + * Creates a new ExecuteAirflowCommandResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse} ExecuteAirflowCommandResponse instance + */ + ExecuteAirflowCommandResponse.create = function create(properties) { + return new ExecuteAirflowCommandResponse(properties); + }; + + /** + * Encodes the specified ExecuteAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse} message ExecuteAirflowCommandResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteAirflowCommandResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.executionId != null && Object.hasOwnProperty.call(message, "executionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.executionId); + if (message.pod != null && Object.hasOwnProperty.call(message, "pod")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pod); + if (message.podNamespace != null && Object.hasOwnProperty.call(message, "podNamespace")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.podNamespace); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.error); + return writer; + }; + + /** + * Encodes the specified ExecuteAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse} message ExecuteAirflowCommandResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExecuteAirflowCommandResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExecuteAirflowCommandResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse} ExecuteAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteAirflowCommandResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.executionId = reader.string(); + break; + } + case 2: { + message.pod = reader.string(); + break; + } + case 3: { + message.podNamespace = reader.string(); + break; + } + case 4: { + message.error = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExecuteAirflowCommandResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse} ExecuteAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExecuteAirflowCommandResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExecuteAirflowCommandResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExecuteAirflowCommandResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.executionId != null && message.hasOwnProperty("executionId")) + if (!$util.isString(message.executionId)) + return "executionId: string expected"; + if (message.pod != null && message.hasOwnProperty("pod")) + if (!$util.isString(message.pod)) + return "pod: string expected"; + if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) + if (!$util.isString(message.podNamespace)) + return "podNamespace: string expected"; + if (message.error != null && message.hasOwnProperty("error")) + if (!$util.isString(message.error)) + return "error: string expected"; + return null; + }; + + /** + * Creates an ExecuteAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse} ExecuteAirflowCommandResponse + */ + ExecuteAirflowCommandResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse(); + if (object.executionId != null) + message.executionId = String(object.executionId); + if (object.pod != null) + message.pod = String(object.pod); + if (object.podNamespace != null) + message.podNamespace = String(object.podNamespace); + if (object.error != null) + message.error = String(object.error); + return message; + }; + + /** + * Creates a plain object from an ExecuteAirflowCommandResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse} message ExecuteAirflowCommandResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExecuteAirflowCommandResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.executionId = ""; + object.pod = ""; + object.podNamespace = ""; + object.error = ""; + } + if (message.executionId != null && message.hasOwnProperty("executionId")) + object.executionId = message.executionId; + if (message.pod != null && message.hasOwnProperty("pod")) + object.pod = message.pod; + if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) + object.podNamespace = message.podNamespace; + if (message.error != null && message.hasOwnProperty("error")) + object.error = message.error; + return object; + }; + + /** + * Converts this ExecuteAirflowCommandResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse + * @instance + * @returns {Object.} JSON object + */ + ExecuteAirflowCommandResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExecuteAirflowCommandResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExecuteAirflowCommandResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse"; + }; + + return ExecuteAirflowCommandResponse; + })(); + + v1beta1.StopAirflowCommandRequest = (function() { + + /** + * Properties of a StopAirflowCommandRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IStopAirflowCommandRequest + * @property {string|null} [environment] StopAirflowCommandRequest environment + * @property {string|null} [executionId] StopAirflowCommandRequest executionId + * @property {string|null} [pod] StopAirflowCommandRequest pod + * @property {string|null} [podNamespace] StopAirflowCommandRequest podNamespace + * @property {boolean|null} [force] StopAirflowCommandRequest force + */ + + /** + * Constructs a new StopAirflowCommandRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a StopAirflowCommandRequest. + * @implements IStopAirflowCommandRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest=} [properties] Properties to set + */ + function StopAirflowCommandRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StopAirflowCommandRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + * @instance + */ + StopAirflowCommandRequest.prototype.environment = ""; + + /** + * StopAirflowCommandRequest executionId. + * @member {string} executionId + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + * @instance + */ + StopAirflowCommandRequest.prototype.executionId = ""; + + /** + * StopAirflowCommandRequest pod. + * @member {string} pod + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + * @instance + */ + StopAirflowCommandRequest.prototype.pod = ""; + + /** + * StopAirflowCommandRequest podNamespace. + * @member {string} podNamespace + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + * @instance + */ + StopAirflowCommandRequest.prototype.podNamespace = ""; + + /** + * StopAirflowCommandRequest force. + * @member {boolean} force + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + * @instance + */ + StopAirflowCommandRequest.prototype.force = false; + + /** + * Creates a new StopAirflowCommandRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest} StopAirflowCommandRequest instance + */ + StopAirflowCommandRequest.create = function create(properties) { + return new StopAirflowCommandRequest(properties); + }; + + /** + * Encodes the specified StopAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest} message StopAirflowCommandRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopAirflowCommandRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.executionId != null && Object.hasOwnProperty.call(message, "executionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.executionId); + if (message.pod != null && Object.hasOwnProperty.call(message, "pod")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pod); + if (message.podNamespace != null && Object.hasOwnProperty.call(message, "podNamespace")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.podNamespace); + if (message.force != null && Object.hasOwnProperty.call(message, "force")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); + return writer; + }; + + /** + * Encodes the specified StopAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest} message StopAirflowCommandRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopAirflowCommandRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StopAirflowCommandRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest} StopAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopAirflowCommandRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); + break; + } + case 2: { + message.executionId = reader.string(); + break; + } + case 3: { + message.pod = reader.string(); + break; + } + case 4: { + message.podNamespace = reader.string(); + break; + } + case 5: { + message.force = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StopAirflowCommandRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest} StopAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopAirflowCommandRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StopAirflowCommandRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StopAirflowCommandRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.executionId != null && message.hasOwnProperty("executionId")) + if (!$util.isString(message.executionId)) + return "executionId: string expected"; + if (message.pod != null && message.hasOwnProperty("pod")) + if (!$util.isString(message.pod)) + return "pod: string expected"; + if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) + if (!$util.isString(message.podNamespace)) + return "podNamespace: string expected"; + if (message.force != null && message.hasOwnProperty("force")) + if (typeof message.force !== "boolean") + return "force: boolean expected"; + return null; + }; + + /** + * Creates a StopAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest} StopAirflowCommandRequest + */ + StopAirflowCommandRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.executionId != null) + message.executionId = String(object.executionId); + if (object.pod != null) + message.pod = String(object.pod); + if (object.podNamespace != null) + message.podNamespace = String(object.podNamespace); + if (object.force != null) + message.force = Boolean(object.force); + return message; + }; + + /** + * Creates a plain object from a StopAirflowCommandRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest} message StopAirflowCommandRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StopAirflowCommandRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = ""; + object.executionId = ""; + object.pod = ""; + object.podNamespace = ""; + object.force = false; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.executionId != null && message.hasOwnProperty("executionId")) + object.executionId = message.executionId; + if (message.pod != null && message.hasOwnProperty("pod")) + object.pod = message.pod; + if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) + object.podNamespace = message.podNamespace; + if (message.force != null && message.hasOwnProperty("force")) + object.force = message.force; + return object; + }; + + /** + * Converts this StopAirflowCommandRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + * @instance + * @returns {Object.} JSON object + */ + StopAirflowCommandRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StopAirflowCommandRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StopAirflowCommandRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest"; + }; + + return StopAirflowCommandRequest; + })(); + + v1beta1.StopAirflowCommandResponse = (function() { + + /** + * Properties of a StopAirflowCommandResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IStopAirflowCommandResponse + * @property {boolean|null} [isDone] StopAirflowCommandResponse isDone + * @property {Array.|null} [output] StopAirflowCommandResponse output + */ + + /** + * Constructs a new StopAirflowCommandResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a StopAirflowCommandResponse. + * @implements IStopAirflowCommandResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse=} [properties] Properties to set + */ + function StopAirflowCommandResponse(properties) { + this.output = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StopAirflowCommandResponse isDone. + * @member {boolean} isDone + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + * @instance + */ + StopAirflowCommandResponse.prototype.isDone = false; + + /** + * StopAirflowCommandResponse output. + * @member {Array.} output + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + * @instance + */ + StopAirflowCommandResponse.prototype.output = $util.emptyArray; + + /** + * Creates a new StopAirflowCommandResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse} StopAirflowCommandResponse instance + */ + StopAirflowCommandResponse.create = function create(properties) { + return new StopAirflowCommandResponse(properties); + }; + + /** + * Encodes the specified StopAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse} message StopAirflowCommandResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopAirflowCommandResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.isDone != null && Object.hasOwnProperty.call(message, "isDone")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isDone); + if (message.output != null && message.output.length) + for (var i = 0; i < message.output.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.output[i]); + return writer; + }; + + /** + * Encodes the specified StopAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse} message StopAirflowCommandResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StopAirflowCommandResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StopAirflowCommandResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse} StopAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopAirflowCommandResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.isDone = reader.bool(); + break; + } + case 2: { + if (!(message.output && message.output.length)) + message.output = []; + message.output.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StopAirflowCommandResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse} StopAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StopAirflowCommandResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StopAirflowCommandResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StopAirflowCommandResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.isDone != null && message.hasOwnProperty("isDone")) + if (typeof message.isDone !== "boolean") + return "isDone: boolean expected"; + if (message.output != null && message.hasOwnProperty("output")) { + if (!Array.isArray(message.output)) + return "output: array expected"; + for (var i = 0; i < message.output.length; ++i) + if (!$util.isString(message.output[i])) + return "output: string[] expected"; + } + return null; + }; + + /** + * Creates a StopAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse} StopAirflowCommandResponse + */ + StopAirflowCommandResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse(); + if (object.isDone != null) + message.isDone = Boolean(object.isDone); + if (object.output) { + if (!Array.isArray(object.output)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse.output: array expected"); + message.output = []; + for (var i = 0; i < object.output.length; ++i) + message.output[i] = String(object.output[i]); + } + return message; + }; + + /** + * Creates a plain object from a StopAirflowCommandResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse} message StopAirflowCommandResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StopAirflowCommandResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.output = []; + if (options.defaults) + object.isDone = false; + if (message.isDone != null && message.hasOwnProperty("isDone")) + object.isDone = message.isDone; + if (message.output && message.output.length) { + object.output = []; + for (var j = 0; j < message.output.length; ++j) + object.output[j] = message.output[j]; + } + return object; + }; + + /** + * Converts this StopAirflowCommandResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + * @instance + * @returns {Object.} JSON object + */ + StopAirflowCommandResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StopAirflowCommandResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StopAirflowCommandResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse"; + }; + + return StopAirflowCommandResponse; + })(); + + v1beta1.PollAirflowCommandRequest = (function() { + + /** + * Properties of a PollAirflowCommandRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IPollAirflowCommandRequest + * @property {string|null} [environment] PollAirflowCommandRequest environment + * @property {string|null} [executionId] PollAirflowCommandRequest executionId + * @property {string|null} [pod] PollAirflowCommandRequest pod + * @property {string|null} [podNamespace] PollAirflowCommandRequest podNamespace + * @property {number|null} [nextLineNumber] PollAirflowCommandRequest nextLineNumber + */ + + /** + * Constructs a new PollAirflowCommandRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a PollAirflowCommandRequest. + * @implements IPollAirflowCommandRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest=} [properties] Properties to set + */ + function PollAirflowCommandRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PollAirflowCommandRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + * @instance + */ + PollAirflowCommandRequest.prototype.environment = ""; + + /** + * PollAirflowCommandRequest executionId. + * @member {string} executionId + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + * @instance + */ + PollAirflowCommandRequest.prototype.executionId = ""; + + /** + * PollAirflowCommandRequest pod. + * @member {string} pod + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + * @instance + */ + PollAirflowCommandRequest.prototype.pod = ""; + + /** + * PollAirflowCommandRequest podNamespace. + * @member {string} podNamespace + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + * @instance + */ + PollAirflowCommandRequest.prototype.podNamespace = ""; + + /** + * PollAirflowCommandRequest nextLineNumber. + * @member {number} nextLineNumber + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + * @instance + */ + PollAirflowCommandRequest.prototype.nextLineNumber = 0; + + /** + * Creates a new PollAirflowCommandRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest} PollAirflowCommandRequest instance + */ + PollAirflowCommandRequest.create = function create(properties) { + return new PollAirflowCommandRequest(properties); + }; + + /** + * Encodes the specified PollAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest} message PollAirflowCommandRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollAirflowCommandRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.executionId != null && Object.hasOwnProperty.call(message, "executionId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.executionId); + if (message.pod != null && Object.hasOwnProperty.call(message, "pod")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pod); + if (message.podNamespace != null && Object.hasOwnProperty.call(message, "podNamespace")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.podNamespace); + if (message.nextLineNumber != null && Object.hasOwnProperty.call(message, "nextLineNumber")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.nextLineNumber); + return writer; + }; + + /** + * Encodes the specified PollAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest} message PollAirflowCommandRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollAirflowCommandRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollAirflowCommandRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest} PollAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollAirflowCommandRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); + break; + } + case 2: { + message.executionId = reader.string(); + break; + } + case 3: { + message.pod = reader.string(); + break; + } + case 4: { + message.podNamespace = reader.string(); + break; + } + case 5: { + message.nextLineNumber = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollAirflowCommandRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest} PollAirflowCommandRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollAirflowCommandRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollAirflowCommandRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollAirflowCommandRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.executionId != null && message.hasOwnProperty("executionId")) + if (!$util.isString(message.executionId)) + return "executionId: string expected"; + if (message.pod != null && message.hasOwnProperty("pod")) + if (!$util.isString(message.pod)) + return "pod: string expected"; + if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) + if (!$util.isString(message.podNamespace)) + return "podNamespace: string expected"; + if (message.nextLineNumber != null && message.hasOwnProperty("nextLineNumber")) + if (!$util.isInteger(message.nextLineNumber)) + return "nextLineNumber: integer expected"; + return null; + }; + + /** + * Creates a PollAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest} PollAirflowCommandRequest + */ + PollAirflowCommandRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.executionId != null) + message.executionId = String(object.executionId); + if (object.pod != null) + message.pod = String(object.pod); + if (object.podNamespace != null) + message.podNamespace = String(object.podNamespace); + if (object.nextLineNumber != null) + message.nextLineNumber = object.nextLineNumber | 0; + return message; + }; + + /** + * Creates a plain object from a PollAirflowCommandRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest} message PollAirflowCommandRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollAirflowCommandRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = ""; + object.executionId = ""; + object.pod = ""; + object.podNamespace = ""; + object.nextLineNumber = 0; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.executionId != null && message.hasOwnProperty("executionId")) + object.executionId = message.executionId; + if (message.pod != null && message.hasOwnProperty("pod")) + object.pod = message.pod; + if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) + object.podNamespace = message.podNamespace; + if (message.nextLineNumber != null && message.hasOwnProperty("nextLineNumber")) + object.nextLineNumber = message.nextLineNumber; + return object; + }; + + /** + * Converts this PollAirflowCommandRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + * @instance + * @returns {Object.} JSON object + */ + PollAirflowCommandRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PollAirflowCommandRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollAirflowCommandRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest"; + }; + + return PollAirflowCommandRequest; + })(); + + v1beta1.PollAirflowCommandResponse = (function() { + + /** + * Properties of a PollAirflowCommandResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IPollAirflowCommandResponse + * @property {Array.|null} [output] PollAirflowCommandResponse output + * @property {boolean|null} [outputEnd] PollAirflowCommandResponse outputEnd + * @property {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo|null} [exitInfo] PollAirflowCommandResponse exitInfo + */ + + /** + * Constructs a new PollAirflowCommandResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a PollAirflowCommandResponse. + * @implements IPollAirflowCommandResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse=} [properties] Properties to set + */ + function PollAirflowCommandResponse(properties) { + this.output = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PollAirflowCommandResponse output. + * @member {Array.} output + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @instance + */ + PollAirflowCommandResponse.prototype.output = $util.emptyArray; + + /** + * PollAirflowCommandResponse outputEnd. + * @member {boolean} outputEnd + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @instance + */ + PollAirflowCommandResponse.prototype.outputEnd = false; + + /** + * PollAirflowCommandResponse exitInfo. + * @member {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo|null|undefined} exitInfo + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @instance + */ + PollAirflowCommandResponse.prototype.exitInfo = null; + + /** + * Creates a new PollAirflowCommandResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse} PollAirflowCommandResponse instance + */ + PollAirflowCommandResponse.create = function create(properties) { + return new PollAirflowCommandResponse(properties); + }; + + /** + * Encodes the specified PollAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse} message PollAirflowCommandResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollAirflowCommandResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.output != null && message.output.length) + for (var i = 0; i < message.output.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.encode(message.output[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.outputEnd != null && Object.hasOwnProperty.call(message, "outputEnd")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.outputEnd); + if (message.exitInfo != null && Object.hasOwnProperty.call(message, "exitInfo")) + $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.encode(message.exitInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PollAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse} message PollAirflowCommandResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PollAirflowCommandResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PollAirflowCommandResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse} PollAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollAirflowCommandResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.output && message.output.length)) + message.output = []; + message.output.push($root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.decode(reader, reader.uint32())); + break; + } + case 2: { + message.outputEnd = reader.bool(); + break; + } + case 3: { + message.exitInfo = $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PollAirflowCommandResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse} PollAirflowCommandResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PollAirflowCommandResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PollAirflowCommandResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PollAirflowCommandResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.output != null && message.hasOwnProperty("output")) { + if (!Array.isArray(message.output)) + return "output: array expected"; + for (var i = 0; i < message.output.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.verify(message.output[i]); + if (error) + return "output." + error; + } + } + if (message.outputEnd != null && message.hasOwnProperty("outputEnd")) + if (typeof message.outputEnd !== "boolean") + return "outputEnd: boolean expected"; + if (message.exitInfo != null && message.hasOwnProperty("exitInfo")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.verify(message.exitInfo); + if (error) + return "exitInfo." + error; + } + return null; + }; + + /** + * Creates a PollAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse} PollAirflowCommandResponse + */ + PollAirflowCommandResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse(); + if (object.output) { + if (!Array.isArray(object.output)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.output: array expected"); + message.output = []; + for (var i = 0; i < object.output.length; ++i) { + if (typeof object.output[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.output: object expected"); + message.output[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.fromObject(object.output[i]); + } + } + if (object.outputEnd != null) + message.outputEnd = Boolean(object.outputEnd); + if (object.exitInfo != null) { + if (typeof object.exitInfo !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.exitInfo: object expected"); + message.exitInfo = $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.fromObject(object.exitInfo); + } + return message; + }; + + /** + * Creates a plain object from a PollAirflowCommandResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse} message PollAirflowCommandResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PollAirflowCommandResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.output = []; + if (options.defaults) { + object.outputEnd = false; + object.exitInfo = null; + } + if (message.output && message.output.length) { + object.output = []; + for (var j = 0; j < message.output.length; ++j) + object.output[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.toObject(message.output[j], options); + } + if (message.outputEnd != null && message.hasOwnProperty("outputEnd")) + object.outputEnd = message.outputEnd; + if (message.exitInfo != null && message.hasOwnProperty("exitInfo")) + object.exitInfo = $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.toObject(message.exitInfo, options); + return object; + }; + + /** + * Converts this PollAirflowCommandResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @instance + * @returns {Object.} JSON object + */ + PollAirflowCommandResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PollAirflowCommandResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PollAirflowCommandResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse"; + }; + + PollAirflowCommandResponse.Line = (function() { + + /** + * Properties of a Line. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @interface ILine + * @property {number|null} [lineNumber] Line lineNumber + * @property {string|null} [content] Line content + */ + + /** + * Constructs a new Line. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @classdesc Represents a Line. + * @implements ILine + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine=} [properties] Properties to set + */ + function Line(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Line lineNumber. + * @member {number} lineNumber + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line + * @instance + */ + Line.prototype.lineNumber = 0; + + /** + * Line content. + * @member {string} content + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line + * @instance + */ + Line.prototype.content = ""; + + /** + * Creates a new Line instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line} Line instance + */ + Line.create = function create(properties) { + return new Line(properties); + }; + + /** + * Encodes the specified Line message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine} message Line message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Line.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lineNumber != null && Object.hasOwnProperty.call(message, "lineNumber")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.lineNumber); + if (message.content != null && Object.hasOwnProperty.call(message, "content")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); + return writer; + }; + + /** + * Encodes the specified Line message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine} message Line message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Line.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Line message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line} Line + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Line.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lineNumber = reader.int32(); + break; + } + case 2: { + message.content = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Line message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line} Line + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Line.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Line message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Line.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lineNumber != null && message.hasOwnProperty("lineNumber")) + if (!$util.isInteger(message.lineNumber)) + return "lineNumber: integer expected"; + if (message.content != null && message.hasOwnProperty("content")) + if (!$util.isString(message.content)) + return "content: string expected"; + return null; + }; + + /** + * Creates a Line message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line} Line + */ + Line.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line(); + if (object.lineNumber != null) + message.lineNumber = object.lineNumber | 0; + if (object.content != null) + message.content = String(object.content); + return message; + }; + + /** + * Creates a plain object from a Line message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line} message Line + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Line.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lineNumber = 0; + object.content = ""; + } + if (message.lineNumber != null && message.hasOwnProperty("lineNumber")) + object.lineNumber = message.lineNumber; + if (message.content != null && message.hasOwnProperty("content")) + object.content = message.content; + return object; + }; + + /** + * Converts this Line to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line + * @instance + * @returns {Object.} JSON object + */ + Line.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Line + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Line.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line"; + }; + + return Line; + })(); + + PollAirflowCommandResponse.ExitInfo = (function() { + + /** + * Properties of an ExitInfo. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @interface IExitInfo + * @property {number|null} [exitCode] ExitInfo exitCode + * @property {string|null} [error] ExitInfo error + */ + + /** + * Constructs a new ExitInfo. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse + * @classdesc Represents an ExitInfo. + * @implements IExitInfo + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo=} [properties] Properties to set + */ + function ExitInfo(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExitInfo exitCode. + * @member {number} exitCode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo + * @instance + */ + ExitInfo.prototype.exitCode = 0; + + /** + * ExitInfo error. + * @member {string} error + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo + * @instance + */ + ExitInfo.prototype.error = ""; + + /** + * Creates a new ExitInfo instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo} ExitInfo instance + */ + ExitInfo.create = function create(properties) { + return new ExitInfo(properties); + }; + + /** + * Encodes the specified ExitInfo message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo} message ExitInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExitInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.exitCode != null && Object.hasOwnProperty.call(message, "exitCode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.exitCode); + if (message.error != null && Object.hasOwnProperty.call(message, "error")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.error); + return writer; + }; + + /** + * Encodes the specified ExitInfo message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo} message ExitInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExitInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExitInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo} ExitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExitInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.exitCode = reader.int32(); + break; + } + case 2: { + message.error = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExitInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo} ExitInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExitInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExitInfo message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExitInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.exitCode != null && message.hasOwnProperty("exitCode")) + if (!$util.isInteger(message.exitCode)) + return "exitCode: integer expected"; + if (message.error != null && message.hasOwnProperty("error")) + if (!$util.isString(message.error)) + return "error: string expected"; + return null; + }; + + /** + * Creates an ExitInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo} ExitInfo + */ + ExitInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo(); + if (object.exitCode != null) + message.exitCode = object.exitCode | 0; + if (object.error != null) + message.error = String(object.error); + return message; + }; + + /** + * Creates a plain object from an ExitInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo} message ExitInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExitInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.exitCode = 0; + object.error = ""; + } + if (message.exitCode != null && message.hasOwnProperty("exitCode")) + object.exitCode = message.exitCode; + if (message.error != null && message.hasOwnProperty("error")) + object.error = message.error; + return object; + }; + + /** + * Converts this ExitInfo to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo + * @instance + * @returns {Object.} JSON object + */ + ExitInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExitInfo + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExitInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo"; + }; + + return ExitInfo; + })(); + + return PollAirflowCommandResponse; + })(); + + v1beta1.CreateUserWorkloadsSecretRequest = (function() { + + /** + * Properties of a CreateUserWorkloadsSecretRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface ICreateUserWorkloadsSecretRequest + * @property {string|null} [parent] CreateUserWorkloadsSecretRequest parent + * @property {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null} [userWorkloadsSecret] CreateUserWorkloadsSecretRequest userWorkloadsSecret + */ + + /** + * Constructs a new CreateUserWorkloadsSecretRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a CreateUserWorkloadsSecretRequest. + * @implements ICreateUserWorkloadsSecretRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest=} [properties] Properties to set + */ + function CreateUserWorkloadsSecretRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserWorkloadsSecretRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest + * @instance + */ + CreateUserWorkloadsSecretRequest.prototype.parent = ""; + + /** + * CreateUserWorkloadsSecretRequest userWorkloadsSecret. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null|undefined} userWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest + * @instance + */ + CreateUserWorkloadsSecretRequest.prototype.userWorkloadsSecret = null; + + /** + * Creates a new CreateUserWorkloadsSecretRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest} CreateUserWorkloadsSecretRequest instance + */ + CreateUserWorkloadsSecretRequest.create = function create(properties) { + return new CreateUserWorkloadsSecretRequest(properties); + }; + + /** + * Encodes the specified CreateUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest} message CreateUserWorkloadsSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserWorkloadsSecretRequest.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.userWorkloadsSecret != null && Object.hasOwnProperty.call(message, "userWorkloadsSecret")) + $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.encode(message.userWorkloadsSecret, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest} message CreateUserWorkloadsSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserWorkloadsSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserWorkloadsSecretRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest} CreateUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserWorkloadsSecretRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest} CreateUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserWorkloadsSecretRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserWorkloadsSecretRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserWorkloadsSecretRequest.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.userWorkloadsSecret != null && message.hasOwnProperty("userWorkloadsSecret")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.verify(message.userWorkloadsSecret); + if (error) + return "userWorkloadsSecret." + error; + } + return null; + }; + + /** + * Creates a CreateUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest} CreateUserWorkloadsSecretRequest + */ + CreateUserWorkloadsSecretRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.userWorkloadsSecret != null) { + if (typeof object.userWorkloadsSecret !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest.userWorkloadsSecret: object expected"); + message.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.fromObject(object.userWorkloadsSecret); + } + return message; + }; + + /** + * Creates a plain object from a CreateUserWorkloadsSecretRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest} message CreateUserWorkloadsSecretRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserWorkloadsSecretRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.userWorkloadsSecret = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.userWorkloadsSecret != null && message.hasOwnProperty("userWorkloadsSecret")) + object.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.toObject(message.userWorkloadsSecret, options); + return object; + }; + + /** + * Converts this CreateUserWorkloadsSecretRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest + * @instance + * @returns {Object.} JSON object + */ + CreateUserWorkloadsSecretRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserWorkloadsSecretRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserWorkloadsSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest"; + }; + + return CreateUserWorkloadsSecretRequest; + })(); + + v1beta1.GetUserWorkloadsSecretRequest = (function() { + + /** + * Properties of a GetUserWorkloadsSecretRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IGetUserWorkloadsSecretRequest + * @property {string|null} [name] GetUserWorkloadsSecretRequest name + */ + + /** + * Constructs a new GetUserWorkloadsSecretRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a GetUserWorkloadsSecretRequest. + * @implements IGetUserWorkloadsSecretRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest=} [properties] Properties to set + */ + function GetUserWorkloadsSecretRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetUserWorkloadsSecretRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest + * @instance + */ + GetUserWorkloadsSecretRequest.prototype.name = ""; + + /** + * Creates a new GetUserWorkloadsSecretRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest} GetUserWorkloadsSecretRequest instance + */ + GetUserWorkloadsSecretRequest.create = function create(properties) { + return new GetUserWorkloadsSecretRequest(properties); + }; + + /** + * Encodes the specified GetUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest} message GetUserWorkloadsSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserWorkloadsSecretRequest.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 GetUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest} message GetUserWorkloadsSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserWorkloadsSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetUserWorkloadsSecretRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest} GetUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserWorkloadsSecretRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest} GetUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserWorkloadsSecretRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetUserWorkloadsSecretRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetUserWorkloadsSecretRequest.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 GetUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest} GetUserWorkloadsSecretRequest + */ + GetUserWorkloadsSecretRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetUserWorkloadsSecretRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest} message GetUserWorkloadsSecretRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetUserWorkloadsSecretRequest.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 GetUserWorkloadsSecretRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest + * @instance + * @returns {Object.} JSON object + */ + GetUserWorkloadsSecretRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetUserWorkloadsSecretRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetUserWorkloadsSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest"; + }; + + return GetUserWorkloadsSecretRequest; + })(); + + v1beta1.ListUserWorkloadsSecretsRequest = (function() { + + /** + * Properties of a ListUserWorkloadsSecretsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IListUserWorkloadsSecretsRequest + * @property {string|null} [parent] ListUserWorkloadsSecretsRequest parent + * @property {number|null} [pageSize] ListUserWorkloadsSecretsRequest pageSize + * @property {string|null} [pageToken] ListUserWorkloadsSecretsRequest pageToken + */ + + /** + * Constructs a new ListUserWorkloadsSecretsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a ListUserWorkloadsSecretsRequest. + * @implements IListUserWorkloadsSecretsRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest=} [properties] Properties to set + */ + function ListUserWorkloadsSecretsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserWorkloadsSecretsRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest + * @instance + */ + ListUserWorkloadsSecretsRequest.prototype.parent = ""; + + /** + * ListUserWorkloadsSecretsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest + * @instance + */ + ListUserWorkloadsSecretsRequest.prototype.pageSize = 0; + + /** + * ListUserWorkloadsSecretsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest + * @instance + */ + ListUserWorkloadsSecretsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListUserWorkloadsSecretsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest} ListUserWorkloadsSecretsRequest instance + */ + ListUserWorkloadsSecretsRequest.create = function create(properties) { + return new ListUserWorkloadsSecretsRequest(properties); + }; + + /** + * Encodes the specified ListUserWorkloadsSecretsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest} message ListUserWorkloadsSecretsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserWorkloadsSecretsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListUserWorkloadsSecretsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest} message ListUserWorkloadsSecretsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserWorkloadsSecretsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserWorkloadsSecretsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest} ListUserWorkloadsSecretsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserWorkloadsSecretsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserWorkloadsSecretsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest} ListUserWorkloadsSecretsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserWorkloadsSecretsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserWorkloadsSecretsRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserWorkloadsSecretsRequest.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"; + return null; + }; + + /** + * Creates a ListUserWorkloadsSecretsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest} ListUserWorkloadsSecretsRequest + */ + ListUserWorkloadsSecretsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserWorkloadsSecretsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest} message ListUserWorkloadsSecretsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserWorkloadsSecretsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListUserWorkloadsSecretsRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest + * @instance + * @returns {Object.} JSON object + */ + ListUserWorkloadsSecretsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserWorkloadsSecretsRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserWorkloadsSecretsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest"; + }; + + return ListUserWorkloadsSecretsRequest; + })(); + + v1beta1.UpdateUserWorkloadsSecretRequest = (function() { + + /** + * Properties of an UpdateUserWorkloadsSecretRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IUpdateUserWorkloadsSecretRequest + * @property {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null} [userWorkloadsSecret] UpdateUserWorkloadsSecretRequest userWorkloadsSecret + */ + + /** + * Constructs a new UpdateUserWorkloadsSecretRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an UpdateUserWorkloadsSecretRequest. + * @implements IUpdateUserWorkloadsSecretRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest=} [properties] Properties to set + */ + function UpdateUserWorkloadsSecretRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserWorkloadsSecretRequest userWorkloadsSecret. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null|undefined} userWorkloadsSecret + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest + * @instance + */ + UpdateUserWorkloadsSecretRequest.prototype.userWorkloadsSecret = null; + + /** + * Creates a new UpdateUserWorkloadsSecretRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest} UpdateUserWorkloadsSecretRequest instance + */ + UpdateUserWorkloadsSecretRequest.create = function create(properties) { + return new UpdateUserWorkloadsSecretRequest(properties); + }; + + /** + * Encodes the specified UpdateUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest} message UpdateUserWorkloadsSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserWorkloadsSecretRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userWorkloadsSecret != null && Object.hasOwnProperty.call(message, "userWorkloadsSecret")) + $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.encode(message.userWorkloadsSecret, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest} message UpdateUserWorkloadsSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserWorkloadsSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserWorkloadsSecretRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest} UpdateUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserWorkloadsSecretRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest} UpdateUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserWorkloadsSecretRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserWorkloadsSecretRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserWorkloadsSecretRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userWorkloadsSecret != null && message.hasOwnProperty("userWorkloadsSecret")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.verify(message.userWorkloadsSecret); + if (error) + return "userWorkloadsSecret." + error; + } + return null; + }; + + /** + * Creates an UpdateUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest} UpdateUserWorkloadsSecretRequest + */ + UpdateUserWorkloadsSecretRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest(); + if (object.userWorkloadsSecret != null) { + if (typeof object.userWorkloadsSecret !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest.userWorkloadsSecret: object expected"); + message.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.fromObject(object.userWorkloadsSecret); + } + return message; + }; + + /** + * Creates a plain object from an UpdateUserWorkloadsSecretRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest} message UpdateUserWorkloadsSecretRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserWorkloadsSecretRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.userWorkloadsSecret = null; + if (message.userWorkloadsSecret != null && message.hasOwnProperty("userWorkloadsSecret")) + object.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.toObject(message.userWorkloadsSecret, options); + return object; + }; + + /** + * Converts this UpdateUserWorkloadsSecretRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateUserWorkloadsSecretRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserWorkloadsSecretRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserWorkloadsSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest"; + }; + + return UpdateUserWorkloadsSecretRequest; + })(); + + v1beta1.DeleteUserWorkloadsSecretRequest = (function() { + + /** + * Properties of a DeleteUserWorkloadsSecretRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IDeleteUserWorkloadsSecretRequest + * @property {string|null} [name] DeleteUserWorkloadsSecretRequest name + */ + + /** + * Constructs a new DeleteUserWorkloadsSecretRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a DeleteUserWorkloadsSecretRequest. + * @implements IDeleteUserWorkloadsSecretRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest=} [properties] Properties to set + */ + function DeleteUserWorkloadsSecretRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteUserWorkloadsSecretRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest + * @instance + */ + DeleteUserWorkloadsSecretRequest.prototype.name = ""; + + /** + * Creates a new DeleteUserWorkloadsSecretRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest} DeleteUserWorkloadsSecretRequest instance + */ + DeleteUserWorkloadsSecretRequest.create = function create(properties) { + return new DeleteUserWorkloadsSecretRequest(properties); + }; + + /** + * Encodes the specified DeleteUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest} message DeleteUserWorkloadsSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteUserWorkloadsSecretRequest.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 DeleteUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest} message DeleteUserWorkloadsSecretRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteUserWorkloadsSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteUserWorkloadsSecretRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest} DeleteUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteUserWorkloadsSecretRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest} DeleteUserWorkloadsSecretRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteUserWorkloadsSecretRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteUserWorkloadsSecretRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteUserWorkloadsSecretRequest.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 DeleteUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest} DeleteUserWorkloadsSecretRequest + */ + DeleteUserWorkloadsSecretRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteUserWorkloadsSecretRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest} message DeleteUserWorkloadsSecretRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteUserWorkloadsSecretRequest.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 DeleteUserWorkloadsSecretRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteUserWorkloadsSecretRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteUserWorkloadsSecretRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteUserWorkloadsSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest"; + }; + + return DeleteUserWorkloadsSecretRequest; + })(); + + v1beta1.CreateUserWorkloadsConfigMapRequest = (function() { + + /** + * Properties of a CreateUserWorkloadsConfigMapRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface ICreateUserWorkloadsConfigMapRequest + * @property {string|null} [parent] CreateUserWorkloadsConfigMapRequest parent + * @property {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null} [userWorkloadsConfigMap] CreateUserWorkloadsConfigMapRequest userWorkloadsConfigMap + */ + + /** + * Constructs a new CreateUserWorkloadsConfigMapRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a CreateUserWorkloadsConfigMapRequest. + * @implements ICreateUserWorkloadsConfigMapRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest=} [properties] Properties to set + */ + function CreateUserWorkloadsConfigMapRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateUserWorkloadsConfigMapRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest + * @instance + */ + CreateUserWorkloadsConfigMapRequest.prototype.parent = ""; + + /** + * CreateUserWorkloadsConfigMapRequest userWorkloadsConfigMap. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null|undefined} userWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest + * @instance + */ + CreateUserWorkloadsConfigMapRequest.prototype.userWorkloadsConfigMap = null; + + /** + * Creates a new CreateUserWorkloadsConfigMapRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest} CreateUserWorkloadsConfigMapRequest instance + */ + CreateUserWorkloadsConfigMapRequest.create = function create(properties) { + return new CreateUserWorkloadsConfigMapRequest(properties); + }; + + /** + * Encodes the specified CreateUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest} message CreateUserWorkloadsConfigMapRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserWorkloadsConfigMapRequest.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.userWorkloadsConfigMap != null && Object.hasOwnProperty.call(message, "userWorkloadsConfigMap")) + $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.encode(message.userWorkloadsConfigMap, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest} message CreateUserWorkloadsConfigMapRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateUserWorkloadsConfigMapRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateUserWorkloadsConfigMapRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest} CreateUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserWorkloadsConfigMapRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest} CreateUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateUserWorkloadsConfigMapRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateUserWorkloadsConfigMapRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateUserWorkloadsConfigMapRequest.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.userWorkloadsConfigMap != null && message.hasOwnProperty("userWorkloadsConfigMap")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.verify(message.userWorkloadsConfigMap); + if (error) + return "userWorkloadsConfigMap." + error; + } + return null; + }; + + /** + * Creates a CreateUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest} CreateUserWorkloadsConfigMapRequest + */ + CreateUserWorkloadsConfigMapRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.userWorkloadsConfigMap != null) { + if (typeof object.userWorkloadsConfigMap !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest.userWorkloadsConfigMap: object expected"); + message.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.fromObject(object.userWorkloadsConfigMap); + } + return message; + }; + + /** + * Creates a plain object from a CreateUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest} message CreateUserWorkloadsConfigMapRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateUserWorkloadsConfigMapRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.userWorkloadsConfigMap = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.userWorkloadsConfigMap != null && message.hasOwnProperty("userWorkloadsConfigMap")) + object.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.toObject(message.userWorkloadsConfigMap, options); + return object; + }; + + /** + * Converts this CreateUserWorkloadsConfigMapRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest + * @instance + * @returns {Object.} JSON object + */ + CreateUserWorkloadsConfigMapRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateUserWorkloadsConfigMapRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateUserWorkloadsConfigMapRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest"; + }; + + return CreateUserWorkloadsConfigMapRequest; + })(); + + v1beta1.GetUserWorkloadsConfigMapRequest = (function() { + + /** + * Properties of a GetUserWorkloadsConfigMapRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IGetUserWorkloadsConfigMapRequest + * @property {string|null} [name] GetUserWorkloadsConfigMapRequest name + */ + + /** + * Constructs a new GetUserWorkloadsConfigMapRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a GetUserWorkloadsConfigMapRequest. + * @implements IGetUserWorkloadsConfigMapRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest=} [properties] Properties to set + */ + function GetUserWorkloadsConfigMapRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetUserWorkloadsConfigMapRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest + * @instance + */ + GetUserWorkloadsConfigMapRequest.prototype.name = ""; + + /** + * Creates a new GetUserWorkloadsConfigMapRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest} GetUserWorkloadsConfigMapRequest instance + */ + GetUserWorkloadsConfigMapRequest.create = function create(properties) { + return new GetUserWorkloadsConfigMapRequest(properties); + }; + + /** + * Encodes the specified GetUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest} message GetUserWorkloadsConfigMapRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserWorkloadsConfigMapRequest.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 GetUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest} message GetUserWorkloadsConfigMapRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetUserWorkloadsConfigMapRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetUserWorkloadsConfigMapRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest} GetUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserWorkloadsConfigMapRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest} GetUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetUserWorkloadsConfigMapRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetUserWorkloadsConfigMapRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetUserWorkloadsConfigMapRequest.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 GetUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest} GetUserWorkloadsConfigMapRequest + */ + GetUserWorkloadsConfigMapRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest} message GetUserWorkloadsConfigMapRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetUserWorkloadsConfigMapRequest.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 GetUserWorkloadsConfigMapRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest + * @instance + * @returns {Object.} JSON object + */ + GetUserWorkloadsConfigMapRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetUserWorkloadsConfigMapRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetUserWorkloadsConfigMapRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest"; + }; + + return GetUserWorkloadsConfigMapRequest; + })(); + + v1beta1.ListUserWorkloadsConfigMapsRequest = (function() { + + /** + * Properties of a ListUserWorkloadsConfigMapsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IListUserWorkloadsConfigMapsRequest + * @property {string|null} [parent] ListUserWorkloadsConfigMapsRequest parent + * @property {number|null} [pageSize] ListUserWorkloadsConfigMapsRequest pageSize + * @property {string|null} [pageToken] ListUserWorkloadsConfigMapsRequest pageToken + */ + + /** + * Constructs a new ListUserWorkloadsConfigMapsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a ListUserWorkloadsConfigMapsRequest. + * @implements IListUserWorkloadsConfigMapsRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest=} [properties] Properties to set + */ + function ListUserWorkloadsConfigMapsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserWorkloadsConfigMapsRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest + * @instance + */ + ListUserWorkloadsConfigMapsRequest.prototype.parent = ""; + + /** + * ListUserWorkloadsConfigMapsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest + * @instance + */ + ListUserWorkloadsConfigMapsRequest.prototype.pageSize = 0; + + /** + * ListUserWorkloadsConfigMapsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest + * @instance + */ + ListUserWorkloadsConfigMapsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListUserWorkloadsConfigMapsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest} ListUserWorkloadsConfigMapsRequest instance + */ + ListUserWorkloadsConfigMapsRequest.create = function create(properties) { + return new ListUserWorkloadsConfigMapsRequest(properties); + }; + + /** + * Encodes the specified ListUserWorkloadsConfigMapsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest} message ListUserWorkloadsConfigMapsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserWorkloadsConfigMapsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListUserWorkloadsConfigMapsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest} message ListUserWorkloadsConfigMapsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserWorkloadsConfigMapsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserWorkloadsConfigMapsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest} ListUserWorkloadsConfigMapsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserWorkloadsConfigMapsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserWorkloadsConfigMapsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest} ListUserWorkloadsConfigMapsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserWorkloadsConfigMapsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserWorkloadsConfigMapsRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserWorkloadsConfigMapsRequest.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"; + return null; + }; + + /** + * Creates a ListUserWorkloadsConfigMapsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest} ListUserWorkloadsConfigMapsRequest + */ + ListUserWorkloadsConfigMapsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserWorkloadsConfigMapsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest} message ListUserWorkloadsConfigMapsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserWorkloadsConfigMapsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListUserWorkloadsConfigMapsRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest + * @instance + * @returns {Object.} JSON object + */ + ListUserWorkloadsConfigMapsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserWorkloadsConfigMapsRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserWorkloadsConfigMapsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest"; + }; + + return ListUserWorkloadsConfigMapsRequest; + })(); + + v1beta1.UpdateUserWorkloadsConfigMapRequest = (function() { + + /** + * Properties of an UpdateUserWorkloadsConfigMapRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IUpdateUserWorkloadsConfigMapRequest + * @property {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null} [userWorkloadsConfigMap] UpdateUserWorkloadsConfigMapRequest userWorkloadsConfigMap + */ + + /** + * Constructs a new UpdateUserWorkloadsConfigMapRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an UpdateUserWorkloadsConfigMapRequest. + * @implements IUpdateUserWorkloadsConfigMapRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest=} [properties] Properties to set + */ + function UpdateUserWorkloadsConfigMapRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateUserWorkloadsConfigMapRequest userWorkloadsConfigMap. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null|undefined} userWorkloadsConfigMap + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest + * @instance + */ + UpdateUserWorkloadsConfigMapRequest.prototype.userWorkloadsConfigMap = null; + + /** + * Creates a new UpdateUserWorkloadsConfigMapRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest} UpdateUserWorkloadsConfigMapRequest instance + */ + UpdateUserWorkloadsConfigMapRequest.create = function create(properties) { + return new UpdateUserWorkloadsConfigMapRequest(properties); + }; + + /** + * Encodes the specified UpdateUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest} message UpdateUserWorkloadsConfigMapRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserWorkloadsConfigMapRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userWorkloadsConfigMap != null && Object.hasOwnProperty.call(message, "userWorkloadsConfigMap")) + $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.encode(message.userWorkloadsConfigMap, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest} message UpdateUserWorkloadsConfigMapRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateUserWorkloadsConfigMapRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateUserWorkloadsConfigMapRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest} UpdateUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserWorkloadsConfigMapRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest} UpdateUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateUserWorkloadsConfigMapRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateUserWorkloadsConfigMapRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateUserWorkloadsConfigMapRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userWorkloadsConfigMap != null && message.hasOwnProperty("userWorkloadsConfigMap")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.verify(message.userWorkloadsConfigMap); + if (error) + return "userWorkloadsConfigMap." + error; + } + return null; + }; + + /** + * Creates an UpdateUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest} UpdateUserWorkloadsConfigMapRequest + */ + UpdateUserWorkloadsConfigMapRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest(); + if (object.userWorkloadsConfigMap != null) { + if (typeof object.userWorkloadsConfigMap !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest.userWorkloadsConfigMap: object expected"); + message.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.fromObject(object.userWorkloadsConfigMap); + } + return message; + }; + + /** + * Creates a plain object from an UpdateUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest} message UpdateUserWorkloadsConfigMapRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateUserWorkloadsConfigMapRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.userWorkloadsConfigMap = null; + if (message.userWorkloadsConfigMap != null && message.hasOwnProperty("userWorkloadsConfigMap")) + object.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.toObject(message.userWorkloadsConfigMap, options); + return object; + }; + + /** + * Converts this UpdateUserWorkloadsConfigMapRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateUserWorkloadsConfigMapRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateUserWorkloadsConfigMapRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateUserWorkloadsConfigMapRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest"; + }; + + return UpdateUserWorkloadsConfigMapRequest; + })(); + + v1beta1.DeleteUserWorkloadsConfigMapRequest = (function() { + + /** + * Properties of a DeleteUserWorkloadsConfigMapRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IDeleteUserWorkloadsConfigMapRequest + * @property {string|null} [name] DeleteUserWorkloadsConfigMapRequest name + */ + + /** + * Constructs a new DeleteUserWorkloadsConfigMapRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a DeleteUserWorkloadsConfigMapRequest. + * @implements IDeleteUserWorkloadsConfigMapRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest=} [properties] Properties to set + */ + function DeleteUserWorkloadsConfigMapRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteUserWorkloadsConfigMapRequest name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest + * @instance + */ + DeleteUserWorkloadsConfigMapRequest.prototype.name = ""; + + /** + * Creates a new DeleteUserWorkloadsConfigMapRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest} DeleteUserWorkloadsConfigMapRequest instance + */ + DeleteUserWorkloadsConfigMapRequest.create = function create(properties) { + return new DeleteUserWorkloadsConfigMapRequest(properties); + }; + + /** + * Encodes the specified DeleteUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest} message DeleteUserWorkloadsConfigMapRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteUserWorkloadsConfigMapRequest.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 DeleteUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest} message DeleteUserWorkloadsConfigMapRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteUserWorkloadsConfigMapRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteUserWorkloadsConfigMapRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest} DeleteUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteUserWorkloadsConfigMapRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest} DeleteUserWorkloadsConfigMapRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteUserWorkloadsConfigMapRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteUserWorkloadsConfigMapRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteUserWorkloadsConfigMapRequest.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 DeleteUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest} DeleteUserWorkloadsConfigMapRequest + */ + DeleteUserWorkloadsConfigMapRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest} message DeleteUserWorkloadsConfigMapRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteUserWorkloadsConfigMapRequest.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 DeleteUserWorkloadsConfigMapRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteUserWorkloadsConfigMapRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteUserWorkloadsConfigMapRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteUserWorkloadsConfigMapRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest"; + }; + + return DeleteUserWorkloadsConfigMapRequest; + })(); + + v1beta1.UserWorkloadsSecret = (function() { + + /** + * Properties of a UserWorkloadsSecret. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IUserWorkloadsSecret + * @property {string|null} [name] UserWorkloadsSecret name + * @property {Object.|null} [data] UserWorkloadsSecret data + */ + + /** + * Constructs a new UserWorkloadsSecret. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a UserWorkloadsSecret. + * @implements IUserWorkloadsSecret + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret=} [properties] Properties to set + */ + function UserWorkloadsSecret(properties) { + this.data = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserWorkloadsSecret name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret + * @instance + */ + UserWorkloadsSecret.prototype.name = ""; + + /** + * UserWorkloadsSecret data. + * @member {Object.} data + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret + * @instance + */ + UserWorkloadsSecret.prototype.data = $util.emptyObject; + + /** + * Creates a new UserWorkloadsSecret instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} UserWorkloadsSecret instance + */ + UserWorkloadsSecret.create = function create(properties) { + return new UserWorkloadsSecret(properties); + }; + + /** + * Encodes the specified UserWorkloadsSecret message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret} message UserWorkloadsSecret message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserWorkloadsSecret.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.data != null && Object.hasOwnProperty.call(message, "data")) + for (var keys = Object.keys(message.data), 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.data[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserWorkloadsSecret message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret} message UserWorkloadsSecret message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserWorkloadsSecret.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserWorkloadsSecret message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} UserWorkloadsSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserWorkloadsSecret.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (message.data === $util.emptyObject) + message.data = {}; + 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.data[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserWorkloadsSecret message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} UserWorkloadsSecret + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserWorkloadsSecret.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserWorkloadsSecret message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserWorkloadsSecret.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.data != null && message.hasOwnProperty("data")) { + if (!$util.isObject(message.data)) + return "data: object expected"; + var key = Object.keys(message.data); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.data[key[i]])) + return "data: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a UserWorkloadsSecret message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} UserWorkloadsSecret + */ + UserWorkloadsSecret.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret(); + if (object.name != null) + message.name = String(object.name); + if (object.data) { + if (typeof object.data !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.data: object expected"); + message.data = {}; + for (var keys = Object.keys(object.data), i = 0; i < keys.length; ++i) + message.data[keys[i]] = String(object.data[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a UserWorkloadsSecret message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} message UserWorkloadsSecret + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserWorkloadsSecret.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.data = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + var keys2; + if (message.data && (keys2 = Object.keys(message.data)).length) { + object.data = {}; + for (var j = 0; j < keys2.length; ++j) + object.data[keys2[j]] = message.data[keys2[j]]; + } + return object; + }; + + /** + * Converts this UserWorkloadsSecret to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret + * @instance + * @returns {Object.} JSON object + */ + UserWorkloadsSecret.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserWorkloadsSecret + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserWorkloadsSecret.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret"; + }; + + return UserWorkloadsSecret; + })(); + + v1beta1.ListUserWorkloadsSecretsResponse = (function() { + + /** + * Properties of a ListUserWorkloadsSecretsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IListUserWorkloadsSecretsResponse + * @property {Array.|null} [userWorkloadsSecrets] ListUserWorkloadsSecretsResponse userWorkloadsSecrets + * @property {string|null} [nextPageToken] ListUserWorkloadsSecretsResponse nextPageToken + */ + + /** + * Constructs a new ListUserWorkloadsSecretsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a ListUserWorkloadsSecretsResponse. + * @implements IListUserWorkloadsSecretsResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse=} [properties] Properties to set + */ + function ListUserWorkloadsSecretsResponse(properties) { + this.userWorkloadsSecrets = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserWorkloadsSecretsResponse userWorkloadsSecrets. + * @member {Array.} userWorkloadsSecrets + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse + * @instance + */ + ListUserWorkloadsSecretsResponse.prototype.userWorkloadsSecrets = $util.emptyArray; + + /** + * ListUserWorkloadsSecretsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse + * @instance + */ + ListUserWorkloadsSecretsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListUserWorkloadsSecretsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse} ListUserWorkloadsSecretsResponse instance + */ + ListUserWorkloadsSecretsResponse.create = function create(properties) { + return new ListUserWorkloadsSecretsResponse(properties); + }; + + /** + * Encodes the specified ListUserWorkloadsSecretsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse} message ListUserWorkloadsSecretsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserWorkloadsSecretsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userWorkloadsSecrets != null && message.userWorkloadsSecrets.length) + for (var i = 0; i < message.userWorkloadsSecrets.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.encode(message.userWorkloadsSecrets[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 ListUserWorkloadsSecretsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse} message ListUserWorkloadsSecretsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserWorkloadsSecretsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserWorkloadsSecretsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse} ListUserWorkloadsSecretsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserWorkloadsSecretsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.userWorkloadsSecrets && message.userWorkloadsSecrets.length)) + message.userWorkloadsSecrets = []; + message.userWorkloadsSecrets.push($root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserWorkloadsSecretsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse} ListUserWorkloadsSecretsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserWorkloadsSecretsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserWorkloadsSecretsResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserWorkloadsSecretsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userWorkloadsSecrets != null && message.hasOwnProperty("userWorkloadsSecrets")) { + if (!Array.isArray(message.userWorkloadsSecrets)) + return "userWorkloadsSecrets: array expected"; + for (var i = 0; i < message.userWorkloadsSecrets.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.verify(message.userWorkloadsSecrets[i]); + if (error) + return "userWorkloadsSecrets." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListUserWorkloadsSecretsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse} ListUserWorkloadsSecretsResponse + */ + ListUserWorkloadsSecretsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse(); + if (object.userWorkloadsSecrets) { + if (!Array.isArray(object.userWorkloadsSecrets)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse.userWorkloadsSecrets: array expected"); + message.userWorkloadsSecrets = []; + for (var i = 0; i < object.userWorkloadsSecrets.length; ++i) { + if (typeof object.userWorkloadsSecrets[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse.userWorkloadsSecrets: object expected"); + message.userWorkloadsSecrets[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.fromObject(object.userWorkloadsSecrets[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserWorkloadsSecretsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse} message ListUserWorkloadsSecretsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserWorkloadsSecretsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userWorkloadsSecrets = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.userWorkloadsSecrets && message.userWorkloadsSecrets.length) { + object.userWorkloadsSecrets = []; + for (var j = 0; j < message.userWorkloadsSecrets.length; ++j) + object.userWorkloadsSecrets[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.toObject(message.userWorkloadsSecrets[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListUserWorkloadsSecretsResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse + * @instance + * @returns {Object.} JSON object + */ + ListUserWorkloadsSecretsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserWorkloadsSecretsResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserWorkloadsSecretsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse"; + }; + + return ListUserWorkloadsSecretsResponse; + })(); + + v1beta1.UserWorkloadsConfigMap = (function() { + + /** + * Properties of a UserWorkloadsConfigMap. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IUserWorkloadsConfigMap + * @property {string|null} [name] UserWorkloadsConfigMap name + * @property {Object.|null} [data] UserWorkloadsConfigMap data + */ + + /** + * Constructs a new UserWorkloadsConfigMap. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a UserWorkloadsConfigMap. + * @implements IUserWorkloadsConfigMap + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap=} [properties] Properties to set + */ + function UserWorkloadsConfigMap(properties) { + this.data = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserWorkloadsConfigMap name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap + * @instance + */ + UserWorkloadsConfigMap.prototype.name = ""; + + /** + * UserWorkloadsConfigMap data. + * @member {Object.} data + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap + * @instance + */ + UserWorkloadsConfigMap.prototype.data = $util.emptyObject; + + /** + * Creates a new UserWorkloadsConfigMap instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} UserWorkloadsConfigMap instance + */ + UserWorkloadsConfigMap.create = function create(properties) { + return new UserWorkloadsConfigMap(properties); + }; + + /** + * Encodes the specified UserWorkloadsConfigMap message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap} message UserWorkloadsConfigMap message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserWorkloadsConfigMap.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.data != null && Object.hasOwnProperty.call(message, "data")) + for (var keys = Object.keys(message.data), 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.data[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified UserWorkloadsConfigMap message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap} message UserWorkloadsConfigMap message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserWorkloadsConfigMap.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserWorkloadsConfigMap message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} UserWorkloadsConfigMap + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserWorkloadsConfigMap.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (message.data === $util.emptyObject) + message.data = {}; + 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.data[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserWorkloadsConfigMap message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} UserWorkloadsConfigMap + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserWorkloadsConfigMap.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserWorkloadsConfigMap message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserWorkloadsConfigMap.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.data != null && message.hasOwnProperty("data")) { + if (!$util.isObject(message.data)) + return "data: object expected"; + var key = Object.keys(message.data); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.data[key[i]])) + return "data: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a UserWorkloadsConfigMap message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} UserWorkloadsConfigMap + */ + UserWorkloadsConfigMap.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap(); + if (object.name != null) + message.name = String(object.name); + if (object.data) { + if (typeof object.data !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.data: object expected"); + message.data = {}; + for (var keys = Object.keys(object.data), i = 0; i < keys.length; ++i) + message.data[keys[i]] = String(object.data[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a UserWorkloadsConfigMap message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} message UserWorkloadsConfigMap + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserWorkloadsConfigMap.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.data = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + var keys2; + if (message.data && (keys2 = Object.keys(message.data)).length) { + object.data = {}; + for (var j = 0; j < keys2.length; ++j) + object.data[keys2[j]] = message.data[keys2[j]]; + } + return object; + }; + + /** + * Converts this UserWorkloadsConfigMap to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap + * @instance + * @returns {Object.} JSON object + */ + UserWorkloadsConfigMap.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserWorkloadsConfigMap + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserWorkloadsConfigMap.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap"; + }; + + return UserWorkloadsConfigMap; + })(); + + v1beta1.ListUserWorkloadsConfigMapsResponse = (function() { + + /** + * Properties of a ListUserWorkloadsConfigMapsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IListUserWorkloadsConfigMapsResponse + * @property {Array.|null} [userWorkloadsConfigMaps] ListUserWorkloadsConfigMapsResponse userWorkloadsConfigMaps + * @property {string|null} [nextPageToken] ListUserWorkloadsConfigMapsResponse nextPageToken + */ + + /** + * Constructs a new ListUserWorkloadsConfigMapsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a ListUserWorkloadsConfigMapsResponse. + * @implements IListUserWorkloadsConfigMapsResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse=} [properties] Properties to set + */ + function ListUserWorkloadsConfigMapsResponse(properties) { + this.userWorkloadsConfigMaps = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListUserWorkloadsConfigMapsResponse userWorkloadsConfigMaps. + * @member {Array.} userWorkloadsConfigMaps + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse + * @instance + */ + ListUserWorkloadsConfigMapsResponse.prototype.userWorkloadsConfigMaps = $util.emptyArray; + + /** + * ListUserWorkloadsConfigMapsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse + * @instance + */ + ListUserWorkloadsConfigMapsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListUserWorkloadsConfigMapsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse} ListUserWorkloadsConfigMapsResponse instance + */ + ListUserWorkloadsConfigMapsResponse.create = function create(properties) { + return new ListUserWorkloadsConfigMapsResponse(properties); + }; + + /** + * Encodes the specified ListUserWorkloadsConfigMapsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse} message ListUserWorkloadsConfigMapsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserWorkloadsConfigMapsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.userWorkloadsConfigMaps != null && message.userWorkloadsConfigMaps.length) + for (var i = 0; i < message.userWorkloadsConfigMaps.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.encode(message.userWorkloadsConfigMaps[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 ListUserWorkloadsConfigMapsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse} message ListUserWorkloadsConfigMapsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListUserWorkloadsConfigMapsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListUserWorkloadsConfigMapsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse} ListUserWorkloadsConfigMapsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserWorkloadsConfigMapsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.userWorkloadsConfigMaps && message.userWorkloadsConfigMaps.length)) + message.userWorkloadsConfigMaps = []; + message.userWorkloadsConfigMaps.push($root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListUserWorkloadsConfigMapsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse} ListUserWorkloadsConfigMapsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListUserWorkloadsConfigMapsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListUserWorkloadsConfigMapsResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListUserWorkloadsConfigMapsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.userWorkloadsConfigMaps != null && message.hasOwnProperty("userWorkloadsConfigMaps")) { + if (!Array.isArray(message.userWorkloadsConfigMaps)) + return "userWorkloadsConfigMaps: array expected"; + for (var i = 0; i < message.userWorkloadsConfigMaps.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.verify(message.userWorkloadsConfigMaps[i]); + if (error) + return "userWorkloadsConfigMaps." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListUserWorkloadsConfigMapsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse} ListUserWorkloadsConfigMapsResponse + */ + ListUserWorkloadsConfigMapsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse(); + if (object.userWorkloadsConfigMaps) { + if (!Array.isArray(object.userWorkloadsConfigMaps)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse.userWorkloadsConfigMaps: array expected"); + message.userWorkloadsConfigMaps = []; + for (var i = 0; i < object.userWorkloadsConfigMaps.length; ++i) { + if (typeof object.userWorkloadsConfigMaps[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse.userWorkloadsConfigMaps: object expected"); + message.userWorkloadsConfigMaps[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.fromObject(object.userWorkloadsConfigMaps[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListUserWorkloadsConfigMapsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse} message ListUserWorkloadsConfigMapsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListUserWorkloadsConfigMapsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.userWorkloadsConfigMaps = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.userWorkloadsConfigMaps && message.userWorkloadsConfigMaps.length) { + object.userWorkloadsConfigMaps = []; + for (var j = 0; j < message.userWorkloadsConfigMaps.length; ++j) + object.userWorkloadsConfigMaps[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.toObject(message.userWorkloadsConfigMaps[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListUserWorkloadsConfigMapsResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse + * @instance + * @returns {Object.} JSON object + */ + ListUserWorkloadsConfigMapsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListUserWorkloadsConfigMapsResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListUserWorkloadsConfigMapsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse"; + }; + + return ListUserWorkloadsConfigMapsResponse; + })(); + + v1beta1.ListWorkloadsRequest = (function() { + + /** + * Properties of a ListWorkloadsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IListWorkloadsRequest + * @property {string|null} [parent] ListWorkloadsRequest parent + * @property {number|null} [pageSize] ListWorkloadsRequest pageSize + * @property {string|null} [pageToken] ListWorkloadsRequest pageToken + * @property {string|null} [filter] ListWorkloadsRequest filter + */ + + /** + * Constructs a new ListWorkloadsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a ListWorkloadsRequest. + * @implements IListWorkloadsRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest=} [properties] Properties to set + */ + function ListWorkloadsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkloadsRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest + * @instance + */ + ListWorkloadsRequest.prototype.parent = ""; + + /** + * ListWorkloadsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest + * @instance + */ + ListWorkloadsRequest.prototype.pageSize = 0; + + /** + * ListWorkloadsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest + * @instance + */ + ListWorkloadsRequest.prototype.pageToken = ""; + + /** + * ListWorkloadsRequest filter. + * @member {string} filter + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest + * @instance + */ + ListWorkloadsRequest.prototype.filter = ""; + + /** + * Creates a new ListWorkloadsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest} ListWorkloadsRequest instance + */ + ListWorkloadsRequest.create = function create(properties) { + return new ListWorkloadsRequest(properties); + }; + + /** + * Encodes the specified ListWorkloadsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest} message ListWorkloadsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkloadsRequest.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); + return writer; + }; + + /** + * Encodes the specified ListWorkloadsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest} message ListWorkloadsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkloadsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkloadsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest} ListWorkloadsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkloadsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkloadsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest} ListWorkloadsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkloadsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkloadsRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkloadsRequest.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"; + return null; + }; + + /** + * Creates a ListWorkloadsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest} ListWorkloadsRequest + */ + ListWorkloadsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListWorkloadsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest} message ListWorkloadsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkloadsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListWorkloadsRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest + * @instance + * @returns {Object.} JSON object + */ + ListWorkloadsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListWorkloadsRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkloadsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest"; + }; + + return ListWorkloadsRequest; + })(); + + v1beta1.ListWorkloadsResponse = (function() { + + /** + * Properties of a ListWorkloadsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IListWorkloadsResponse + * @property {Array.|null} [workloads] ListWorkloadsResponse workloads + * @property {string|null} [nextPageToken] ListWorkloadsResponse nextPageToken + */ + + /** + * Constructs a new ListWorkloadsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a ListWorkloadsResponse. + * @implements IListWorkloadsResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse=} [properties] Properties to set + */ + function ListWorkloadsResponse(properties) { + this.workloads = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListWorkloadsResponse workloads. + * @member {Array.} workloads + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse + * @instance + */ + ListWorkloadsResponse.prototype.workloads = $util.emptyArray; + + /** + * ListWorkloadsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse + * @instance + */ + ListWorkloadsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListWorkloadsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse} ListWorkloadsResponse instance + */ + ListWorkloadsResponse.create = function create(properties) { + return new ListWorkloadsResponse(properties); + }; + + /** + * Encodes the specified ListWorkloadsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse} message ListWorkloadsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkloadsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.workloads != null && message.workloads.length) + for (var i = 0; i < message.workloads.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.encode(message.workloads[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 ListWorkloadsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse} message ListWorkloadsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListWorkloadsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListWorkloadsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse} ListWorkloadsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkloadsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.workloads && message.workloads.length)) + message.workloads = []; + message.workloads.push($root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListWorkloadsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse} ListWorkloadsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListWorkloadsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListWorkloadsResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListWorkloadsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.workloads != null && message.hasOwnProperty("workloads")) { + if (!Array.isArray(message.workloads)) + return "workloads: array expected"; + for (var i = 0; i < message.workloads.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.verify(message.workloads[i]); + if (error) + return "workloads." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListWorkloadsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse} ListWorkloadsResponse + */ + ListWorkloadsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse(); + if (object.workloads) { + if (!Array.isArray(object.workloads)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.workloads: array expected"); + message.workloads = []; + for (var i = 0; i < object.workloads.length; ++i) { + if (typeof object.workloads[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.workloads: object expected"); + message.workloads[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.fromObject(object.workloads[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListWorkloadsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse} message ListWorkloadsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListWorkloadsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.workloads = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.workloads && message.workloads.length) { + object.workloads = []; + for (var j = 0; j < message.workloads.length; ++j) + object.workloads[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.toObject(message.workloads[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListWorkloadsResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse + * @instance + * @returns {Object.} JSON object + */ + ListWorkloadsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListWorkloadsResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListWorkloadsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse"; + }; + + ListWorkloadsResponse.ComposerWorkload = (function() { + + /** + * Properties of a ComposerWorkload. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse + * @interface IComposerWorkload + * @property {string|null} [name] ComposerWorkload name + * @property {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType|null} [type] ComposerWorkload type + * @property {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus|null} [status] ComposerWorkload status + */ + + /** + * Constructs a new ComposerWorkload. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse + * @classdesc Represents a ComposerWorkload. + * @implements IComposerWorkload + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload=} [properties] Properties to set + */ + function ComposerWorkload(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComposerWorkload name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload + * @instance + */ + ComposerWorkload.prototype.name = ""; + + /** + * ComposerWorkload type. + * @member {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType} type + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload + * @instance + */ + ComposerWorkload.prototype.type = 0; + + /** + * ComposerWorkload status. + * @member {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus|null|undefined} status + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload + * @instance + */ + ComposerWorkload.prototype.status = null; + + /** + * Creates a new ComposerWorkload instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload} ComposerWorkload instance + */ + ComposerWorkload.create = function create(properties) { + return new ComposerWorkload(properties); + }; + + /** + * Encodes the specified ComposerWorkload message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload} message ComposerWorkload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComposerWorkload.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.status != null && Object.hasOwnProperty.call(message, "status")) + $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.encode(message.status, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ComposerWorkload message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload} message ComposerWorkload message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComposerWorkload.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComposerWorkload message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload} ComposerWorkload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComposerWorkload.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.type = reader.int32(); + break; + } + case 3: { + message.status = $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComposerWorkload message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload} ComposerWorkload + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComposerWorkload.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComposerWorkload message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComposerWorkload.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: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + if (message.status != null && message.hasOwnProperty("status")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.verify(message.status); + if (error) + return "status." + error; + } + return null; + }; + + /** + * Creates a ComposerWorkload message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload} ComposerWorkload + */ + ComposerWorkload.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload(); + 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 "COMPOSER_WORKLOAD_TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "CELERY_WORKER": + case 1: + message.type = 1; + break; + case "KUBERNETES_WORKER": + case 2: + message.type = 2; + break; + case "KUBERNETES_OPERATOR_POD": + case 3: + message.type = 3; + break; + case "SCHEDULER": + case 4: + message.type = 4; + break; + case "DAG_PROCESSOR": + case 5: + message.type = 5; + break; + case "TRIGGERER": + case 6: + message.type = 6; + break; + case "WEB_SERVER": + case 7: + message.type = 7; + break; + case "REDIS": + case 8: + message.type = 8; + break; + } + if (object.status != null) { + if (typeof object.status !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.status: object expected"); + message.status = $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.fromObject(object.status); + } + return message; + }; + + /** + * Creates a plain object from a ComposerWorkload message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload} message ComposerWorkload + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComposerWorkload.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.type = options.enums === String ? "COMPOSER_WORKLOAD_TYPE_UNSPECIFIED" : 0; + object.status = null; + } + 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.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType[message.type] === undefined ? message.type : $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType[message.type] : message.type; + if (message.status != null && message.hasOwnProperty("status")) + object.status = $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.toObject(message.status, options); + return object; + }; + + /** + * Converts this ComposerWorkload to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload + * @instance + * @returns {Object.} JSON object + */ + ComposerWorkload.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComposerWorkload + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComposerWorkload.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload"; + }; + + return ComposerWorkload; + })(); + + /** + * ComposerWorkloadType enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType + * @enum {number} + * @property {number} COMPOSER_WORKLOAD_TYPE_UNSPECIFIED=0 COMPOSER_WORKLOAD_TYPE_UNSPECIFIED value + * @property {number} CELERY_WORKER=1 CELERY_WORKER value + * @property {number} KUBERNETES_WORKER=2 KUBERNETES_WORKER value + * @property {number} KUBERNETES_OPERATOR_POD=3 KUBERNETES_OPERATOR_POD value + * @property {number} SCHEDULER=4 SCHEDULER value + * @property {number} DAG_PROCESSOR=5 DAG_PROCESSOR value + * @property {number} TRIGGERER=6 TRIGGERER value + * @property {number} WEB_SERVER=7 WEB_SERVER value + * @property {number} REDIS=8 REDIS value + */ + ListWorkloadsResponse.ComposerWorkloadType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPOSER_WORKLOAD_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CELERY_WORKER"] = 1; + values[valuesById[2] = "KUBERNETES_WORKER"] = 2; + values[valuesById[3] = "KUBERNETES_OPERATOR_POD"] = 3; + values[valuesById[4] = "SCHEDULER"] = 4; + values[valuesById[5] = "DAG_PROCESSOR"] = 5; + values[valuesById[6] = "TRIGGERER"] = 6; + values[valuesById[7] = "WEB_SERVER"] = 7; + values[valuesById[8] = "REDIS"] = 8; + return values; + })(); + + ListWorkloadsResponse.ComposerWorkloadStatus = (function() { + + /** + * Properties of a ComposerWorkloadStatus. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse + * @interface IComposerWorkloadStatus + * @property {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState|null} [state] ComposerWorkloadStatus state + * @property {string|null} [statusMessage] ComposerWorkloadStatus statusMessage + * @property {string|null} [detailedStatusMessage] ComposerWorkloadStatus detailedStatusMessage + */ + + /** + * Constructs a new ComposerWorkloadStatus. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse + * @classdesc Represents a ComposerWorkloadStatus. + * @implements IComposerWorkloadStatus + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus=} [properties] Properties to set + */ + function ComposerWorkloadStatus(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComposerWorkloadStatus state. + * @member {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState} state + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus + * @instance + */ + ComposerWorkloadStatus.prototype.state = 0; + + /** + * ComposerWorkloadStatus statusMessage. + * @member {string} statusMessage + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus + * @instance + */ + ComposerWorkloadStatus.prototype.statusMessage = ""; + + /** + * ComposerWorkloadStatus detailedStatusMessage. + * @member {string} detailedStatusMessage + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus + * @instance + */ + ComposerWorkloadStatus.prototype.detailedStatusMessage = ""; + + /** + * Creates a new ComposerWorkloadStatus instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus} ComposerWorkloadStatus instance + */ + ComposerWorkloadStatus.create = function create(properties) { + return new ComposerWorkloadStatus(properties); + }; + + /** + * Encodes the specified ComposerWorkloadStatus message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus} message ComposerWorkloadStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComposerWorkloadStatus.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.statusMessage); + if (message.detailedStatusMessage != null && Object.hasOwnProperty.call(message, "detailedStatusMessage")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.detailedStatusMessage); + return writer; + }; + + /** + * Encodes the specified ComposerWorkloadStatus message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus} message ComposerWorkloadStatus message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComposerWorkloadStatus.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComposerWorkloadStatus message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus} ComposerWorkloadStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComposerWorkloadStatus.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.statusMessage = reader.string(); + break; + } + case 3: { + message.detailedStatusMessage = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComposerWorkloadStatus message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus} ComposerWorkloadStatus + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComposerWorkloadStatus.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComposerWorkloadStatus message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComposerWorkloadStatus.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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.statusMessage != null && message.hasOwnProperty("statusMessage")) + if (!$util.isString(message.statusMessage)) + return "statusMessage: string expected"; + if (message.detailedStatusMessage != null && message.hasOwnProperty("detailedStatusMessage")) + if (!$util.isString(message.detailedStatusMessage)) + return "detailedStatusMessage: string expected"; + return null; + }; + + /** + * Creates a ComposerWorkloadStatus message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus} ComposerWorkloadStatus + */ + ComposerWorkloadStatus.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus(); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "COMPOSER_WORKLOAD_STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "OK": + case 2: + message.state = 2; + break; + case "WARNING": + case 3: + message.state = 3; + break; + case "ERROR": + case 4: + message.state = 4; + break; + case "SUCCEEDED": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + } + if (object.statusMessage != null) + message.statusMessage = String(object.statusMessage); + if (object.detailedStatusMessage != null) + message.detailedStatusMessage = String(object.detailedStatusMessage); + return message; + }; + + /** + * Creates a plain object from a ComposerWorkloadStatus message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus} message ComposerWorkloadStatus + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComposerWorkloadStatus.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.state = options.enums === String ? "COMPOSER_WORKLOAD_STATE_UNSPECIFIED" : 0; + object.statusMessage = ""; + object.detailedStatusMessage = ""; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState[message.state] === undefined ? message.state : $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState[message.state] : message.state; + if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) + object.statusMessage = message.statusMessage; + if (message.detailedStatusMessage != null && message.hasOwnProperty("detailedStatusMessage")) + object.detailedStatusMessage = message.detailedStatusMessage; + return object; + }; + + /** + * Converts this ComposerWorkloadStatus to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus + * @instance + * @returns {Object.} JSON object + */ + ComposerWorkloadStatus.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComposerWorkloadStatus + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComposerWorkloadStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus"; + }; + + return ComposerWorkloadStatus; + })(); + + /** + * ComposerWorkloadState enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState + * @enum {number} + * @property {number} COMPOSER_WORKLOAD_STATE_UNSPECIFIED=0 COMPOSER_WORKLOAD_STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} OK=2 OK value + * @property {number} WARNING=3 WARNING value + * @property {number} ERROR=4 ERROR value + * @property {number} SUCCEEDED=5 SUCCEEDED value + * @property {number} FAILED=6 FAILED value + */ + ListWorkloadsResponse.ComposerWorkloadState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPOSER_WORKLOAD_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "OK"] = 2; + values[valuesById[3] = "WARNING"] = 3; + values[valuesById[4] = "ERROR"] = 4; + values[valuesById[5] = "SUCCEEDED"] = 5; + values[valuesById[6] = "FAILED"] = 6; + return values; + })(); + + return ListWorkloadsResponse; + })(); + + v1beta1.SaveSnapshotRequest = (function() { + + /** + * Properties of a SaveSnapshotRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface ISaveSnapshotRequest + * @property {string|null} [environment] SaveSnapshotRequest environment + * @property {string|null} [snapshotLocation] SaveSnapshotRequest snapshotLocation + */ + + /** + * Constructs a new SaveSnapshotRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a SaveSnapshotRequest. + * @implements ISaveSnapshotRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest=} [properties] Properties to set + */ + function SaveSnapshotRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveSnapshotRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest + * @instance + */ + SaveSnapshotRequest.prototype.environment = ""; + + /** + * SaveSnapshotRequest snapshotLocation. + * @member {string} snapshotLocation + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest + * @instance + */ + SaveSnapshotRequest.prototype.snapshotLocation = ""; + + /** + * Creates a new SaveSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest} SaveSnapshotRequest instance + */ + SaveSnapshotRequest.create = function create(properties) { + return new SaveSnapshotRequest(properties); + }; + + /** + * Encodes the specified SaveSnapshotRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest} message SaveSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveSnapshotRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.snapshotLocation != null && Object.hasOwnProperty.call(message, "snapshotLocation")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.snapshotLocation); + return writer; + }; + + /** + * Encodes the specified SaveSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest} message SaveSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest} SaveSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveSnapshotRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); + break; + } + case 2: { + message.snapshotLocation = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SaveSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest} SaveSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveSnapshotRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveSnapshotRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.snapshotLocation != null && message.hasOwnProperty("snapshotLocation")) + if (!$util.isString(message.snapshotLocation)) + return "snapshotLocation: string expected"; + return null; + }; + + /** + * Creates a SaveSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest} SaveSnapshotRequest + */ + SaveSnapshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.snapshotLocation != null) + message.snapshotLocation = String(object.snapshotLocation); + return message; + }; + + /** + * Creates a plain object from a SaveSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest} message SaveSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveSnapshotRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = ""; + object.snapshotLocation = ""; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.snapshotLocation != null && message.hasOwnProperty("snapshotLocation")) + object.snapshotLocation = message.snapshotLocation; + return object; + }; + + /** + * Converts this SaveSnapshotRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + SaveSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveSnapshotRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest"; + }; + + return SaveSnapshotRequest; + })(); + + v1beta1.SaveSnapshotResponse = (function() { + + /** + * Properties of a SaveSnapshotResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface ISaveSnapshotResponse + * @property {string|null} [snapshotPath] SaveSnapshotResponse snapshotPath + */ + + /** + * Constructs a new SaveSnapshotResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a SaveSnapshotResponse. + * @implements ISaveSnapshotResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotResponse=} [properties] Properties to set + */ + function SaveSnapshotResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SaveSnapshotResponse snapshotPath. + * @member {string} snapshotPath + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse + * @instance + */ + SaveSnapshotResponse.prototype.snapshotPath = ""; + + /** + * Creates a new SaveSnapshotResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse} SaveSnapshotResponse instance + */ + SaveSnapshotResponse.create = function create(properties) { + return new SaveSnapshotResponse(properties); + }; + + /** + * Encodes the specified SaveSnapshotResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotResponse} message SaveSnapshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveSnapshotResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.snapshotPath != null && Object.hasOwnProperty.call(message, "snapshotPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.snapshotPath); + return writer; + }; + + /** + * Encodes the specified SaveSnapshotResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotResponse} message SaveSnapshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SaveSnapshotResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SaveSnapshotResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse} SaveSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveSnapshotResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.snapshotPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SaveSnapshotResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse} SaveSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SaveSnapshotResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SaveSnapshotResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SaveSnapshotResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.snapshotPath != null && message.hasOwnProperty("snapshotPath")) + if (!$util.isString(message.snapshotPath)) + return "snapshotPath: string expected"; + return null; + }; + + /** + * Creates a SaveSnapshotResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse} SaveSnapshotResponse + */ + SaveSnapshotResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse(); + if (object.snapshotPath != null) + message.snapshotPath = String(object.snapshotPath); + return message; + }; + + /** + * Creates a plain object from a SaveSnapshotResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse} message SaveSnapshotResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SaveSnapshotResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.snapshotPath = ""; + if (message.snapshotPath != null && message.hasOwnProperty("snapshotPath")) + object.snapshotPath = message.snapshotPath; + return object; + }; + + /** + * Converts this SaveSnapshotResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse + * @instance + * @returns {Object.} JSON object + */ + SaveSnapshotResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SaveSnapshotResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SaveSnapshotResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse"; + }; + + return SaveSnapshotResponse; + })(); + + v1beta1.LoadSnapshotRequest = (function() { + + /** + * Properties of a LoadSnapshotRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface ILoadSnapshotRequest + * @property {string|null} [environment] LoadSnapshotRequest environment + * @property {string|null} [snapshotPath] LoadSnapshotRequest snapshotPath + * @property {boolean|null} [skipPypiPackagesInstallation] LoadSnapshotRequest skipPypiPackagesInstallation + * @property {boolean|null} [skipEnvironmentVariablesSetting] LoadSnapshotRequest skipEnvironmentVariablesSetting + * @property {boolean|null} [skipAirflowOverridesSetting] LoadSnapshotRequest skipAirflowOverridesSetting + * @property {boolean|null} [skipGcsDataCopying] LoadSnapshotRequest skipGcsDataCopying + */ + + /** + * Constructs a new LoadSnapshotRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a LoadSnapshotRequest. + * @implements ILoadSnapshotRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest=} [properties] Properties to set + */ + function LoadSnapshotRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LoadSnapshotRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest + * @instance + */ + LoadSnapshotRequest.prototype.environment = ""; + + /** + * LoadSnapshotRequest snapshotPath. + * @member {string} snapshotPath + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest + * @instance + */ + LoadSnapshotRequest.prototype.snapshotPath = ""; + + /** + * LoadSnapshotRequest skipPypiPackagesInstallation. + * @member {boolean} skipPypiPackagesInstallation + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest + * @instance + */ + LoadSnapshotRequest.prototype.skipPypiPackagesInstallation = false; + + /** + * LoadSnapshotRequest skipEnvironmentVariablesSetting. + * @member {boolean} skipEnvironmentVariablesSetting + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest + * @instance + */ + LoadSnapshotRequest.prototype.skipEnvironmentVariablesSetting = false; + + /** + * LoadSnapshotRequest skipAirflowOverridesSetting. + * @member {boolean} skipAirflowOverridesSetting + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest + * @instance + */ + LoadSnapshotRequest.prototype.skipAirflowOverridesSetting = false; + + /** + * LoadSnapshotRequest skipGcsDataCopying. + * @member {boolean} skipGcsDataCopying + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest + * @instance + */ + LoadSnapshotRequest.prototype.skipGcsDataCopying = false; + + /** + * Creates a new LoadSnapshotRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest} LoadSnapshotRequest instance + */ + LoadSnapshotRequest.create = function create(properties) { + return new LoadSnapshotRequest(properties); + }; + + /** + * Encodes the specified LoadSnapshotRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest} message LoadSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadSnapshotRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.snapshotPath != null && Object.hasOwnProperty.call(message, "snapshotPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.snapshotPath); + if (message.skipPypiPackagesInstallation != null && Object.hasOwnProperty.call(message, "skipPypiPackagesInstallation")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.skipPypiPackagesInstallation); + if (message.skipEnvironmentVariablesSetting != null && Object.hasOwnProperty.call(message, "skipEnvironmentVariablesSetting")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.skipEnvironmentVariablesSetting); + if (message.skipAirflowOverridesSetting != null && Object.hasOwnProperty.call(message, "skipAirflowOverridesSetting")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.skipAirflowOverridesSetting); + if (message.skipGcsDataCopying != null && Object.hasOwnProperty.call(message, "skipGcsDataCopying")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.skipGcsDataCopying); + return writer; + }; + + /** + * Encodes the specified LoadSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest} message LoadSnapshotRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadSnapshotRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest} LoadSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadSnapshotRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); + break; + } + case 2: { + message.snapshotPath = reader.string(); + break; + } + case 3: { + message.skipPypiPackagesInstallation = reader.bool(); + break; + } + case 4: { + message.skipEnvironmentVariablesSetting = reader.bool(); + break; + } + case 5: { + message.skipAirflowOverridesSetting = reader.bool(); + break; + } + case 6: { + message.skipGcsDataCopying = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadSnapshotRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest} LoadSnapshotRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadSnapshotRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadSnapshotRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.snapshotPath != null && message.hasOwnProperty("snapshotPath")) + if (!$util.isString(message.snapshotPath)) + return "snapshotPath: string expected"; + if (message.skipPypiPackagesInstallation != null && message.hasOwnProperty("skipPypiPackagesInstallation")) + if (typeof message.skipPypiPackagesInstallation !== "boolean") + return "skipPypiPackagesInstallation: boolean expected"; + if (message.skipEnvironmentVariablesSetting != null && message.hasOwnProperty("skipEnvironmentVariablesSetting")) + if (typeof message.skipEnvironmentVariablesSetting !== "boolean") + return "skipEnvironmentVariablesSetting: boolean expected"; + if (message.skipAirflowOverridesSetting != null && message.hasOwnProperty("skipAirflowOverridesSetting")) + if (typeof message.skipAirflowOverridesSetting !== "boolean") + return "skipAirflowOverridesSetting: boolean expected"; + if (message.skipGcsDataCopying != null && message.hasOwnProperty("skipGcsDataCopying")) + if (typeof message.skipGcsDataCopying !== "boolean") + return "skipGcsDataCopying: boolean expected"; + return null; + }; + + /** + * Creates a LoadSnapshotRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest} LoadSnapshotRequest + */ + LoadSnapshotRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.snapshotPath != null) + message.snapshotPath = String(object.snapshotPath); + if (object.skipPypiPackagesInstallation != null) + message.skipPypiPackagesInstallation = Boolean(object.skipPypiPackagesInstallation); + if (object.skipEnvironmentVariablesSetting != null) + message.skipEnvironmentVariablesSetting = Boolean(object.skipEnvironmentVariablesSetting); + if (object.skipAirflowOverridesSetting != null) + message.skipAirflowOverridesSetting = Boolean(object.skipAirflowOverridesSetting); + if (object.skipGcsDataCopying != null) + message.skipGcsDataCopying = Boolean(object.skipGcsDataCopying); + return message; + }; + + /** + * Creates a plain object from a LoadSnapshotRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest} message LoadSnapshotRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadSnapshotRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = ""; + object.snapshotPath = ""; + object.skipPypiPackagesInstallation = false; + object.skipEnvironmentVariablesSetting = false; + object.skipAirflowOverridesSetting = false; + object.skipGcsDataCopying = false; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.snapshotPath != null && message.hasOwnProperty("snapshotPath")) + object.snapshotPath = message.snapshotPath; + if (message.skipPypiPackagesInstallation != null && message.hasOwnProperty("skipPypiPackagesInstallation")) + object.skipPypiPackagesInstallation = message.skipPypiPackagesInstallation; + if (message.skipEnvironmentVariablesSetting != null && message.hasOwnProperty("skipEnvironmentVariablesSetting")) + object.skipEnvironmentVariablesSetting = message.skipEnvironmentVariablesSetting; + if (message.skipAirflowOverridesSetting != null && message.hasOwnProperty("skipAirflowOverridesSetting")) + object.skipAirflowOverridesSetting = message.skipAirflowOverridesSetting; + if (message.skipGcsDataCopying != null && message.hasOwnProperty("skipGcsDataCopying")) + object.skipGcsDataCopying = message.skipGcsDataCopying; + return object; + }; + + /** + * Converts this LoadSnapshotRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest + * @instance + * @returns {Object.} JSON object + */ + LoadSnapshotRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadSnapshotRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest"; + }; + + return LoadSnapshotRequest; + })(); + + v1beta1.LoadSnapshotResponse = (function() { + + /** + * Properties of a LoadSnapshotResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface ILoadSnapshotResponse + */ + + /** + * Constructs a new LoadSnapshotResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a LoadSnapshotResponse. + * @implements ILoadSnapshotResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotResponse=} [properties] Properties to set + */ + function LoadSnapshotResponse(properties) { + if (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 LoadSnapshotResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse} LoadSnapshotResponse instance + */ + LoadSnapshotResponse.create = function create(properties) { + return new LoadSnapshotResponse(properties); + }; + + /** + * Encodes the specified LoadSnapshotResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotResponse} message LoadSnapshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadSnapshotResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified LoadSnapshotResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotResponse} message LoadSnapshotResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LoadSnapshotResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LoadSnapshotResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse} LoadSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadSnapshotResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LoadSnapshotResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse} LoadSnapshotResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LoadSnapshotResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LoadSnapshotResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LoadSnapshotResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a LoadSnapshotResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse} LoadSnapshotResponse + */ + LoadSnapshotResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse) + return object; + return new $root.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse(); + }; + + /** + * Creates a plain object from a LoadSnapshotResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse} message LoadSnapshotResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LoadSnapshotResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this LoadSnapshotResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse + * @instance + * @returns {Object.} JSON object + */ + LoadSnapshotResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LoadSnapshotResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LoadSnapshotResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse"; + }; + + return LoadSnapshotResponse; + })(); + + v1beta1.DatabaseFailoverRequest = (function() { + + /** + * Properties of a DatabaseFailoverRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IDatabaseFailoverRequest + * @property {string|null} [environment] DatabaseFailoverRequest environment + */ + + /** + * Constructs a new DatabaseFailoverRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a DatabaseFailoverRequest. + * @implements IDatabaseFailoverRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest=} [properties] Properties to set + */ + function DatabaseFailoverRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatabaseFailoverRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + * @instance + */ + DatabaseFailoverRequest.prototype.environment = ""; + + /** + * Creates a new DatabaseFailoverRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest} DatabaseFailoverRequest instance + */ + DatabaseFailoverRequest.create = function create(properties) { + return new DatabaseFailoverRequest(properties); + }; + + /** + * Encodes the specified DatabaseFailoverRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest} message DatabaseFailoverRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseFailoverRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + return writer; + }; + + /** + * Encodes the specified DatabaseFailoverRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest} message DatabaseFailoverRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseFailoverRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseFailoverRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest} DatabaseFailoverRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseFailoverRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseFailoverRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest} DatabaseFailoverRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseFailoverRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseFailoverRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseFailoverRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + return null; + }; + + /** + * Creates a DatabaseFailoverRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest} DatabaseFailoverRequest + */ + DatabaseFailoverRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest(); + if (object.environment != null) + message.environment = String(object.environment); + return message; + }; + + /** + * Creates a plain object from a DatabaseFailoverRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest} message DatabaseFailoverRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseFailoverRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.environment = ""; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + return object; + }; + + /** + * Converts this DatabaseFailoverRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + * @instance + * @returns {Object.} JSON object + */ + DatabaseFailoverRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseFailoverRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseFailoverRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest"; + }; + + return DatabaseFailoverRequest; + })(); + + v1beta1.DatabaseFailoverResponse = (function() { + + /** + * Properties of a DatabaseFailoverResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IDatabaseFailoverResponse + */ + + /** + * Constructs a new DatabaseFailoverResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a DatabaseFailoverResponse. + * @implements IDatabaseFailoverResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverResponse=} [properties] Properties to set + */ + function DatabaseFailoverResponse(properties) { + if (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 DatabaseFailoverResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse} DatabaseFailoverResponse instance + */ + DatabaseFailoverResponse.create = function create(properties) { + return new DatabaseFailoverResponse(properties); + }; + + /** + * Encodes the specified DatabaseFailoverResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverResponse} message DatabaseFailoverResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseFailoverResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified DatabaseFailoverResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverResponse} message DatabaseFailoverResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseFailoverResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseFailoverResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse} DatabaseFailoverResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseFailoverResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseFailoverResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse} DatabaseFailoverResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseFailoverResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseFailoverResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseFailoverResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a DatabaseFailoverResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse} DatabaseFailoverResponse + */ + DatabaseFailoverResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse) + return object; + return new $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse(); + }; + + /** + * Creates a plain object from a DatabaseFailoverResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse} message DatabaseFailoverResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseFailoverResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DatabaseFailoverResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + * @instance + * @returns {Object.} JSON object + */ + DatabaseFailoverResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseFailoverResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseFailoverResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse"; + }; + + return DatabaseFailoverResponse; + })(); + + v1beta1.FetchDatabasePropertiesRequest = (function() { + + /** + * Properties of a FetchDatabasePropertiesRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IFetchDatabasePropertiesRequest + * @property {string|null} [environment] FetchDatabasePropertiesRequest environment + */ + + /** + * Constructs a new FetchDatabasePropertiesRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a FetchDatabasePropertiesRequest. + * @implements IFetchDatabasePropertiesRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest=} [properties] Properties to set + */ + function FetchDatabasePropertiesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchDatabasePropertiesRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + * @instance + */ + FetchDatabasePropertiesRequest.prototype.environment = ""; + + /** + * Creates a new FetchDatabasePropertiesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest} FetchDatabasePropertiesRequest instance + */ + FetchDatabasePropertiesRequest.create = function create(properties) { + return new FetchDatabasePropertiesRequest(properties); + }; + + /** + * Encodes the specified FetchDatabasePropertiesRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest} message FetchDatabasePropertiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchDatabasePropertiesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + return writer; + }; + + /** + * Encodes the specified FetchDatabasePropertiesRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest} message FetchDatabasePropertiesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchDatabasePropertiesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchDatabasePropertiesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest} FetchDatabasePropertiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchDatabasePropertiesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchDatabasePropertiesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest} FetchDatabasePropertiesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchDatabasePropertiesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchDatabasePropertiesRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchDatabasePropertiesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + return null; + }; + + /** + * Creates a FetchDatabasePropertiesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest} FetchDatabasePropertiesRequest + */ + FetchDatabasePropertiesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest(); + if (object.environment != null) + message.environment = String(object.environment); + return message; + }; + + /** + * Creates a plain object from a FetchDatabasePropertiesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest} message FetchDatabasePropertiesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchDatabasePropertiesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.environment = ""; + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + return object; + }; + + /** + * Converts this FetchDatabasePropertiesRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + * @instance + * @returns {Object.} JSON object + */ + FetchDatabasePropertiesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchDatabasePropertiesRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchDatabasePropertiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest"; + }; + + return FetchDatabasePropertiesRequest; + })(); + + v1beta1.FetchDatabasePropertiesResponse = (function() { + + /** + * Properties of a FetchDatabasePropertiesResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IFetchDatabasePropertiesResponse + * @property {string|null} [primaryGceZone] FetchDatabasePropertiesResponse primaryGceZone + * @property {string|null} [secondaryGceZone] FetchDatabasePropertiesResponse secondaryGceZone + * @property {boolean|null} [isFailoverReplicaAvailable] FetchDatabasePropertiesResponse isFailoverReplicaAvailable + */ + + /** + * Constructs a new FetchDatabasePropertiesResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a FetchDatabasePropertiesResponse. + * @implements IFetchDatabasePropertiesResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse=} [properties] Properties to set + */ + function FetchDatabasePropertiesResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FetchDatabasePropertiesResponse primaryGceZone. + * @member {string} primaryGceZone + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + * @instance + */ + FetchDatabasePropertiesResponse.prototype.primaryGceZone = ""; + + /** + * FetchDatabasePropertiesResponse secondaryGceZone. + * @member {string} secondaryGceZone + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + * @instance + */ + FetchDatabasePropertiesResponse.prototype.secondaryGceZone = ""; + + /** + * FetchDatabasePropertiesResponse isFailoverReplicaAvailable. + * @member {boolean} isFailoverReplicaAvailable + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + * @instance + */ + FetchDatabasePropertiesResponse.prototype.isFailoverReplicaAvailable = false; + + /** + * Creates a new FetchDatabasePropertiesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse} FetchDatabasePropertiesResponse instance + */ + FetchDatabasePropertiesResponse.create = function create(properties) { + return new FetchDatabasePropertiesResponse(properties); + }; + + /** + * Encodes the specified FetchDatabasePropertiesResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse} message FetchDatabasePropertiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchDatabasePropertiesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.primaryGceZone != null && Object.hasOwnProperty.call(message, "primaryGceZone")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.primaryGceZone); + if (message.secondaryGceZone != null && Object.hasOwnProperty.call(message, "secondaryGceZone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.secondaryGceZone); + if (message.isFailoverReplicaAvailable != null && Object.hasOwnProperty.call(message, "isFailoverReplicaAvailable")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isFailoverReplicaAvailable); + return writer; + }; + + /** + * Encodes the specified FetchDatabasePropertiesResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse} message FetchDatabasePropertiesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FetchDatabasePropertiesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FetchDatabasePropertiesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse} FetchDatabasePropertiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchDatabasePropertiesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.primaryGceZone = reader.string(); + break; + } + case 2: { + message.secondaryGceZone = reader.string(); + break; + } + case 3: { + message.isFailoverReplicaAvailable = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FetchDatabasePropertiesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse} FetchDatabasePropertiesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FetchDatabasePropertiesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FetchDatabasePropertiesResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FetchDatabasePropertiesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.primaryGceZone != null && message.hasOwnProperty("primaryGceZone")) + if (!$util.isString(message.primaryGceZone)) + return "primaryGceZone: string expected"; + if (message.secondaryGceZone != null && message.hasOwnProperty("secondaryGceZone")) + if (!$util.isString(message.secondaryGceZone)) + return "secondaryGceZone: string expected"; + if (message.isFailoverReplicaAvailable != null && message.hasOwnProperty("isFailoverReplicaAvailable")) + if (typeof message.isFailoverReplicaAvailable !== "boolean") + return "isFailoverReplicaAvailable: boolean expected"; + return null; + }; + + /** + * Creates a FetchDatabasePropertiesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse} FetchDatabasePropertiesResponse + */ + FetchDatabasePropertiesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse(); + if (object.primaryGceZone != null) + message.primaryGceZone = String(object.primaryGceZone); + if (object.secondaryGceZone != null) + message.secondaryGceZone = String(object.secondaryGceZone); + if (object.isFailoverReplicaAvailable != null) + message.isFailoverReplicaAvailable = Boolean(object.isFailoverReplicaAvailable); + return message; + }; + + /** + * Creates a plain object from a FetchDatabasePropertiesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse} message FetchDatabasePropertiesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FetchDatabasePropertiesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.primaryGceZone = ""; + object.secondaryGceZone = ""; + object.isFailoverReplicaAvailable = false; + } + if (message.primaryGceZone != null && message.hasOwnProperty("primaryGceZone")) + object.primaryGceZone = message.primaryGceZone; + if (message.secondaryGceZone != null && message.hasOwnProperty("secondaryGceZone")) + object.secondaryGceZone = message.secondaryGceZone; + if (message.isFailoverReplicaAvailable != null && message.hasOwnProperty("isFailoverReplicaAvailable")) + object.isFailoverReplicaAvailable = message.isFailoverReplicaAvailable; + return object; + }; + + /** + * Converts this FetchDatabasePropertiesResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + * @instance + * @returns {Object.} JSON object + */ + FetchDatabasePropertiesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FetchDatabasePropertiesResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FetchDatabasePropertiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse"; + }; + + return FetchDatabasePropertiesResponse; + })(); + + v1beta1.EnvironmentConfig = (function() { + + /** + * Properties of an EnvironmentConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IEnvironmentConfig + * @property {string|null} [gkeCluster] EnvironmentConfig gkeCluster + * @property {string|null} [dagGcsPrefix] EnvironmentConfig dagGcsPrefix + * @property {number|null} [nodeCount] EnvironmentConfig nodeCount + * @property {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig|null} [softwareConfig] EnvironmentConfig softwareConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig|null} [nodeConfig] EnvironmentConfig nodeConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig|null} [privateEnvironmentConfig] EnvironmentConfig privateEnvironmentConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl|null} [webServerNetworkAccessControl] EnvironmentConfig webServerNetworkAccessControl + * @property {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig|null} [databaseConfig] EnvironmentConfig databaseConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig|null} [webServerConfig] EnvironmentConfig webServerConfig + * @property {string|null} [airflowUri] EnvironmentConfig airflowUri + * @property {string|null} [airflowByoidUri] EnvironmentConfig airflowByoidUri + * @property {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig|null} [encryptionConfig] EnvironmentConfig encryptionConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow|null} [maintenanceWindow] EnvironmentConfig maintenanceWindow + * @property {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig|null} [workloadsConfig] EnvironmentConfig workloadsConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize|null} [environmentSize] EnvironmentConfig environmentSize + * @property {google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig|null} [masterAuthorizedNetworksConfig] EnvironmentConfig masterAuthorizedNetworksConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig|null} [recoveryConfig] EnvironmentConfig recoveryConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig|null} [dataRetentionConfig] EnvironmentConfig dataRetentionConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode|null} [resilienceMode] EnvironmentConfig resilienceMode + */ + + /** + * Constructs a new EnvironmentConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an EnvironmentConfig. + * @implements IEnvironmentConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig=} [properties] Properties to set + */ + function EnvironmentConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnvironmentConfig gkeCluster. + * @member {string} gkeCluster + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.gkeCluster = ""; + + /** + * EnvironmentConfig dagGcsPrefix. + * @member {string} dagGcsPrefix + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.dagGcsPrefix = ""; + + /** + * EnvironmentConfig nodeCount. + * @member {number} nodeCount + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.nodeCount = 0; + + /** + * EnvironmentConfig softwareConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig|null|undefined} softwareConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.softwareConfig = null; + + /** + * EnvironmentConfig nodeConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig|null|undefined} nodeConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.nodeConfig = null; + + /** + * EnvironmentConfig privateEnvironmentConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig|null|undefined} privateEnvironmentConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.privateEnvironmentConfig = null; + + /** + * EnvironmentConfig webServerNetworkAccessControl. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl|null|undefined} webServerNetworkAccessControl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.webServerNetworkAccessControl = null; + + /** + * EnvironmentConfig databaseConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig|null|undefined} databaseConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.databaseConfig = null; + + /** + * EnvironmentConfig webServerConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig|null|undefined} webServerConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.webServerConfig = null; + + /** + * EnvironmentConfig airflowUri. + * @member {string} airflowUri + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.airflowUri = ""; + + /** + * EnvironmentConfig airflowByoidUri. + * @member {string} airflowByoidUri + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.airflowByoidUri = ""; + + /** + * EnvironmentConfig encryptionConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig|null|undefined} encryptionConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.encryptionConfig = null; + + /** + * EnvironmentConfig maintenanceWindow. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow|null|undefined} maintenanceWindow + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.maintenanceWindow = null; + + /** + * EnvironmentConfig workloadsConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig|null|undefined} workloadsConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.workloadsConfig = null; + + /** + * EnvironmentConfig environmentSize. + * @member {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize} environmentSize + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.environmentSize = 0; + + /** + * EnvironmentConfig masterAuthorizedNetworksConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig|null|undefined} masterAuthorizedNetworksConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.masterAuthorizedNetworksConfig = null; + + /** + * EnvironmentConfig recoveryConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig|null|undefined} recoveryConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.recoveryConfig = null; + + /** + * EnvironmentConfig dataRetentionConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig|null|undefined} dataRetentionConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.dataRetentionConfig = null; + + /** + * EnvironmentConfig resilienceMode. + * @member {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode} resilienceMode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + */ + EnvironmentConfig.prototype.resilienceMode = 0; + + /** + * Creates a new EnvironmentConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} EnvironmentConfig instance + */ + EnvironmentConfig.create = function create(properties) { + return new EnvironmentConfig(properties); + }; + + /** + * Encodes the specified EnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig} message EnvironmentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnvironmentConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.gkeCluster != null && Object.hasOwnProperty.call(message, "gkeCluster")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.gkeCluster); + if (message.dagGcsPrefix != null && Object.hasOwnProperty.call(message, "dagGcsPrefix")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.dagGcsPrefix); + if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.nodeCount); + if (message.softwareConfig != null && Object.hasOwnProperty.call(message, "softwareConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.encode(message.softwareConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.nodeConfig != null && Object.hasOwnProperty.call(message, "nodeConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.encode(message.nodeConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.airflowUri != null && Object.hasOwnProperty.call(message, "airflowUri")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.airflowUri); + if (message.privateEnvironmentConfig != null && Object.hasOwnProperty.call(message, "privateEnvironmentConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.encode(message.privateEnvironmentConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.webServerNetworkAccessControl != null && Object.hasOwnProperty.call(message, "webServerNetworkAccessControl")) + $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.encode(message.webServerNetworkAccessControl, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.databaseConfig != null && Object.hasOwnProperty.call(message, "databaseConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.encode(message.databaseConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.webServerConfig != null && Object.hasOwnProperty.call(message, "webServerConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.encode(message.webServerConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.maintenanceWindow != null && Object.hasOwnProperty.call(message, "maintenanceWindow")) + $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.encode(message.maintenanceWindow, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + if (message.workloadsConfig != null && Object.hasOwnProperty.call(message, "workloadsConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.encode(message.workloadsConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); + if (message.environmentSize != null && Object.hasOwnProperty.call(message, "environmentSize")) + writer.uint32(/* id 16, wireType 0 =*/128).int32(message.environmentSize); + if (message.masterAuthorizedNetworksConfig != null && Object.hasOwnProperty.call(message, "masterAuthorizedNetworksConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.encode(message.masterAuthorizedNetworksConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.recoveryConfig != null && Object.hasOwnProperty.call(message, "recoveryConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.encode(message.recoveryConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.dataRetentionConfig != null && Object.hasOwnProperty.call(message, "dataRetentionConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.encode(message.dataRetentionConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.resilienceMode != null && Object.hasOwnProperty.call(message, "resilienceMode")) + writer.uint32(/* id 20, wireType 0 =*/160).int32(message.resilienceMode); + if (message.airflowByoidUri != null && Object.hasOwnProperty.call(message, "airflowByoidUri")) + writer.uint32(/* id 21, wireType 2 =*/170).string(message.airflowByoidUri); + return writer; + }; + + /** + * Encodes the specified EnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig} message EnvironmentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnvironmentConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnvironmentConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} EnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnvironmentConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.gkeCluster = reader.string(); + break; + } + case 2: { + message.dagGcsPrefix = reader.string(); + break; + } + case 3: { + message.nodeCount = reader.int32(); + break; + } + case 4: { + message.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.decode(reader, reader.uint32()); + break; + } + case 7: { + message.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.decode(reader, reader.uint32()); + break; + } + case 9: { + message.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.decode(reader, reader.uint32()); + break; + } + case 10: { + message.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.decode(reader, reader.uint32()); + break; + } + case 11: { + message.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.decode(reader, reader.uint32()); + break; + } + case 6: { + message.airflowUri = reader.string(); + break; + } + case 21: { + message.airflowByoidUri = reader.string(); + break; + } + case 12: { + message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.decode(reader, reader.uint32()); + break; + } + case 13: { + message.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.decode(reader, reader.uint32()); + break; + } + case 15: { + message.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.decode(reader, reader.uint32()); + break; + } + case 16: { + message.environmentSize = reader.int32(); + break; + } + case 17: { + message.masterAuthorizedNetworksConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.decode(reader, reader.uint32()); + break; + } + case 18: { + message.recoveryConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.decode(reader, reader.uint32()); + break; + } + case 19: { + message.dataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.decode(reader, reader.uint32()); + break; + } + case 20: { + message.resilienceMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnvironmentConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} EnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnvironmentConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnvironmentConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnvironmentConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) + if (!$util.isString(message.gkeCluster)) + return "gkeCluster: string expected"; + if (message.dagGcsPrefix != null && message.hasOwnProperty("dagGcsPrefix")) + if (!$util.isString(message.dagGcsPrefix)) + return "dagGcsPrefix: string expected"; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + if (!$util.isInteger(message.nodeCount)) + return "nodeCount: integer expected"; + if (message.softwareConfig != null && message.hasOwnProperty("softwareConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.verify(message.softwareConfig); + if (error) + return "softwareConfig." + error; + } + if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.verify(message.nodeConfig); + if (error) + return "nodeConfig." + error; + } + if (message.privateEnvironmentConfig != null && message.hasOwnProperty("privateEnvironmentConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.verify(message.privateEnvironmentConfig); + if (error) + return "privateEnvironmentConfig." + error; + } + if (message.webServerNetworkAccessControl != null && message.hasOwnProperty("webServerNetworkAccessControl")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.verify(message.webServerNetworkAccessControl); + if (error) + return "webServerNetworkAccessControl." + error; + } + if (message.databaseConfig != null && message.hasOwnProperty("databaseConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.verify(message.databaseConfig); + if (error) + return "databaseConfig." + error; + } + if (message.webServerConfig != null && message.hasOwnProperty("webServerConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.verify(message.webServerConfig); + if (error) + return "webServerConfig." + error; + } + if (message.airflowUri != null && message.hasOwnProperty("airflowUri")) + if (!$util.isString(message.airflowUri)) + return "airflowUri: string expected"; + if (message.airflowByoidUri != null && message.hasOwnProperty("airflowByoidUri")) + if (!$util.isString(message.airflowByoidUri)) + return "airflowByoidUri: string expected"; + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.verify(message.encryptionConfig); + if (error) + return "encryptionConfig." + error; + } + if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.verify(message.maintenanceWindow); + if (error) + return "maintenanceWindow." + error; + } + if (message.workloadsConfig != null && message.hasOwnProperty("workloadsConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.verify(message.workloadsConfig); + if (error) + return "workloadsConfig." + error; + } + if (message.environmentSize != null && message.hasOwnProperty("environmentSize")) + switch (message.environmentSize) { + default: + return "environmentSize: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.verify(message.masterAuthorizedNetworksConfig); + if (error) + return "masterAuthorizedNetworksConfig." + error; + } + if (message.recoveryConfig != null && message.hasOwnProperty("recoveryConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.verify(message.recoveryConfig); + if (error) + return "recoveryConfig." + error; + } + if (message.dataRetentionConfig != null && message.hasOwnProperty("dataRetentionConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.verify(message.dataRetentionConfig); + if (error) + return "dataRetentionConfig." + error; + } + if (message.resilienceMode != null && message.hasOwnProperty("resilienceMode")) + switch (message.resilienceMode) { + default: + return "resilienceMode: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an EnvironmentConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} EnvironmentConfig + */ + EnvironmentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig(); + if (object.gkeCluster != null) + message.gkeCluster = String(object.gkeCluster); + if (object.dagGcsPrefix != null) + message.dagGcsPrefix = String(object.dagGcsPrefix); + if (object.nodeCount != null) + message.nodeCount = object.nodeCount | 0; + if (object.softwareConfig != null) { + if (typeof object.softwareConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.softwareConfig: object expected"); + message.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.fromObject(object.softwareConfig); + } + if (object.nodeConfig != null) { + if (typeof object.nodeConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.nodeConfig: object expected"); + message.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.fromObject(object.nodeConfig); + } + if (object.privateEnvironmentConfig != null) { + if (typeof object.privateEnvironmentConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.privateEnvironmentConfig: object expected"); + message.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.fromObject(object.privateEnvironmentConfig); + } + if (object.webServerNetworkAccessControl != null) { + if (typeof object.webServerNetworkAccessControl !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.webServerNetworkAccessControl: object expected"); + message.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.fromObject(object.webServerNetworkAccessControl); + } + if (object.databaseConfig != null) { + if (typeof object.databaseConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.databaseConfig: object expected"); + message.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.fromObject(object.databaseConfig); + } + if (object.webServerConfig != null) { + if (typeof object.webServerConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.webServerConfig: object expected"); + message.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.fromObject(object.webServerConfig); + } + if (object.airflowUri != null) + message.airflowUri = String(object.airflowUri); + if (object.airflowByoidUri != null) + message.airflowByoidUri = String(object.airflowByoidUri); + if (object.encryptionConfig != null) { + if (typeof object.encryptionConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.encryptionConfig: object expected"); + message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.fromObject(object.encryptionConfig); + } + if (object.maintenanceWindow != null) { + if (typeof object.maintenanceWindow !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.maintenanceWindow: object expected"); + message.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.fromObject(object.maintenanceWindow); + } + if (object.workloadsConfig != null) { + if (typeof object.workloadsConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.workloadsConfig: object expected"); + message.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.fromObject(object.workloadsConfig); + } + switch (object.environmentSize) { + default: + if (typeof object.environmentSize === "number") { + message.environmentSize = object.environmentSize; + break; + } + break; + case "ENVIRONMENT_SIZE_UNSPECIFIED": + case 0: + message.environmentSize = 0; + break; + case "ENVIRONMENT_SIZE_SMALL": + case 1: + message.environmentSize = 1; + break; + case "ENVIRONMENT_SIZE_MEDIUM": + case 2: + message.environmentSize = 2; + break; + case "ENVIRONMENT_SIZE_LARGE": + case 3: + message.environmentSize = 3; + break; + } + if (object.masterAuthorizedNetworksConfig != null) { + if (typeof object.masterAuthorizedNetworksConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.masterAuthorizedNetworksConfig: object expected"); + message.masterAuthorizedNetworksConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.fromObject(object.masterAuthorizedNetworksConfig); + } + if (object.recoveryConfig != null) { + if (typeof object.recoveryConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.recoveryConfig: object expected"); + message.recoveryConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.fromObject(object.recoveryConfig); + } + if (object.dataRetentionConfig != null) { + if (typeof object.dataRetentionConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.dataRetentionConfig: object expected"); + message.dataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.fromObject(object.dataRetentionConfig); + } + switch (object.resilienceMode) { + default: + if (typeof object.resilienceMode === "number") { + message.resilienceMode = object.resilienceMode; + break; + } + break; + case "RESILIENCE_MODE_UNSPECIFIED": + case 0: + message.resilienceMode = 0; + break; + case "HIGH_RESILIENCE": + case 1: + message.resilienceMode = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an EnvironmentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} message EnvironmentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnvironmentConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.gkeCluster = ""; + object.dagGcsPrefix = ""; + object.nodeCount = 0; + object.softwareConfig = null; + object.nodeConfig = null; + object.airflowUri = ""; + object.privateEnvironmentConfig = null; + object.webServerNetworkAccessControl = null; + object.databaseConfig = null; + object.webServerConfig = null; + object.encryptionConfig = null; + object.maintenanceWindow = null; + object.workloadsConfig = null; + object.environmentSize = options.enums === String ? "ENVIRONMENT_SIZE_UNSPECIFIED" : 0; + object.masterAuthorizedNetworksConfig = null; + object.recoveryConfig = null; + object.dataRetentionConfig = null; + object.resilienceMode = options.enums === String ? "RESILIENCE_MODE_UNSPECIFIED" : 0; + object.airflowByoidUri = ""; + } + if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) + object.gkeCluster = message.gkeCluster; + if (message.dagGcsPrefix != null && message.hasOwnProperty("dagGcsPrefix")) + object.dagGcsPrefix = message.dagGcsPrefix; + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) + object.nodeCount = message.nodeCount; + if (message.softwareConfig != null && message.hasOwnProperty("softwareConfig")) + object.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.toObject(message.softwareConfig, options); + if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) + object.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.toObject(message.nodeConfig, options); + if (message.airflowUri != null && message.hasOwnProperty("airflowUri")) + object.airflowUri = message.airflowUri; + if (message.privateEnvironmentConfig != null && message.hasOwnProperty("privateEnvironmentConfig")) + object.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.toObject(message.privateEnvironmentConfig, options); + if (message.webServerNetworkAccessControl != null && message.hasOwnProperty("webServerNetworkAccessControl")) + object.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.toObject(message.webServerNetworkAccessControl, options); + if (message.databaseConfig != null && message.hasOwnProperty("databaseConfig")) + object.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.toObject(message.databaseConfig, options); + if (message.webServerConfig != null && message.hasOwnProperty("webServerConfig")) + object.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.toObject(message.webServerConfig, options); + if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) + object.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.toObject(message.encryptionConfig, options); + if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) + object.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.toObject(message.maintenanceWindow, options); + if (message.workloadsConfig != null && message.hasOwnProperty("workloadsConfig")) + object.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.toObject(message.workloadsConfig, options); + if (message.environmentSize != null && message.hasOwnProperty("environmentSize")) + object.environmentSize = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize[message.environmentSize] === undefined ? message.environmentSize : $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize[message.environmentSize] : message.environmentSize; + if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) + object.masterAuthorizedNetworksConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.toObject(message.masterAuthorizedNetworksConfig, options); + if (message.recoveryConfig != null && message.hasOwnProperty("recoveryConfig")) + object.recoveryConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.toObject(message.recoveryConfig, options); + if (message.dataRetentionConfig != null && message.hasOwnProperty("dataRetentionConfig")) + object.dataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.toObject(message.dataRetentionConfig, options); + if (message.resilienceMode != null && message.hasOwnProperty("resilienceMode")) + object.resilienceMode = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode[message.resilienceMode] === undefined ? message.resilienceMode : $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode[message.resilienceMode] : message.resilienceMode; + if (message.airflowByoidUri != null && message.hasOwnProperty("airflowByoidUri")) + object.airflowByoidUri = message.airflowByoidUri; + return object; + }; + + /** + * Converts this EnvironmentConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @instance + * @returns {Object.} JSON object + */ + EnvironmentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnvironmentConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnvironmentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig"; + }; + + /** + * EnvironmentSize enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize + * @enum {number} + * @property {number} ENVIRONMENT_SIZE_UNSPECIFIED=0 ENVIRONMENT_SIZE_UNSPECIFIED value + * @property {number} ENVIRONMENT_SIZE_SMALL=1 ENVIRONMENT_SIZE_SMALL value + * @property {number} ENVIRONMENT_SIZE_MEDIUM=2 ENVIRONMENT_SIZE_MEDIUM value + * @property {number} ENVIRONMENT_SIZE_LARGE=3 ENVIRONMENT_SIZE_LARGE value + */ + EnvironmentConfig.EnvironmentSize = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENVIRONMENT_SIZE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ENVIRONMENT_SIZE_SMALL"] = 1; + values[valuesById[2] = "ENVIRONMENT_SIZE_MEDIUM"] = 2; + values[valuesById[3] = "ENVIRONMENT_SIZE_LARGE"] = 3; + return values; + })(); + + /** + * ResilienceMode enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode + * @enum {number} + * @property {number} RESILIENCE_MODE_UNSPECIFIED=0 RESILIENCE_MODE_UNSPECIFIED value + * @property {number} HIGH_RESILIENCE=1 HIGH_RESILIENCE value + */ + EnvironmentConfig.ResilienceMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RESILIENCE_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "HIGH_RESILIENCE"] = 1; + return values; + })(); + + return EnvironmentConfig; + })(); + + v1beta1.WebServerNetworkAccessControl = (function() { + + /** + * Properties of a WebServerNetworkAccessControl. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IWebServerNetworkAccessControl + * @property {Array.|null} [allowedIpRanges] WebServerNetworkAccessControl allowedIpRanges + */ + + /** + * Constructs a new WebServerNetworkAccessControl. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a WebServerNetworkAccessControl. + * @implements IWebServerNetworkAccessControl + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl=} [properties] Properties to set + */ + function WebServerNetworkAccessControl(properties) { + this.allowedIpRanges = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebServerNetworkAccessControl allowedIpRanges. + * @member {Array.} allowedIpRanges + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @instance + */ + WebServerNetworkAccessControl.prototype.allowedIpRanges = $util.emptyArray; + + /** + * Creates a new WebServerNetworkAccessControl instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} WebServerNetworkAccessControl instance + */ + WebServerNetworkAccessControl.create = function create(properties) { + return new WebServerNetworkAccessControl(properties); + }; + + /** + * Encodes the specified WebServerNetworkAccessControl message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl} message WebServerNetworkAccessControl message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerNetworkAccessControl.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowedIpRanges != null && message.allowedIpRanges.length) + for (var i = 0; i < message.allowedIpRanges.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.encode(message.allowedIpRanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WebServerNetworkAccessControl message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl} message WebServerNetworkAccessControl message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerNetworkAccessControl.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} WebServerNetworkAccessControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerNetworkAccessControl.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.allowedIpRanges && message.allowedIpRanges.length)) + message.allowedIpRanges = []; + message.allowedIpRanges.push($root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} WebServerNetworkAccessControl + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerNetworkAccessControl.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebServerNetworkAccessControl message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebServerNetworkAccessControl.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowedIpRanges != null && message.hasOwnProperty("allowedIpRanges")) { + if (!Array.isArray(message.allowedIpRanges)) + return "allowedIpRanges: array expected"; + for (var i = 0; i < message.allowedIpRanges.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.verify(message.allowedIpRanges[i]); + if (error) + return "allowedIpRanges." + error; + } + } + return null; + }; + + /** + * Creates a WebServerNetworkAccessControl message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} WebServerNetworkAccessControl + */ + WebServerNetworkAccessControl.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl(); + if (object.allowedIpRanges) { + if (!Array.isArray(object.allowedIpRanges)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.allowedIpRanges: array expected"); + message.allowedIpRanges = []; + for (var i = 0; i < object.allowedIpRanges.length; ++i) { + if (typeof object.allowedIpRanges[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.allowedIpRanges: object expected"); + message.allowedIpRanges[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.fromObject(object.allowedIpRanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a WebServerNetworkAccessControl message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} message WebServerNetworkAccessControl + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebServerNetworkAccessControl.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.allowedIpRanges = []; + if (message.allowedIpRanges && message.allowedIpRanges.length) { + object.allowedIpRanges = []; + for (var j = 0; j < message.allowedIpRanges.length; ++j) + object.allowedIpRanges[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.toObject(message.allowedIpRanges[j], options); + } + return object; + }; + + /** + * Converts this WebServerNetworkAccessControl to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @instance + * @returns {Object.} JSON object + */ + WebServerNetworkAccessControl.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WebServerNetworkAccessControl + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebServerNetworkAccessControl.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl"; + }; + + WebServerNetworkAccessControl.AllowedIpRange = (function() { + + /** + * Properties of an AllowedIpRange. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @interface IAllowedIpRange + * @property {string|null} [value] AllowedIpRange value + * @property {string|null} [description] AllowedIpRange description + */ + + /** + * Constructs a new AllowedIpRange. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl + * @classdesc Represents an AllowedIpRange. + * @implements IAllowedIpRange + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange=} [properties] Properties to set + */ + function AllowedIpRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AllowedIpRange value. + * @member {string} value + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @instance + */ + AllowedIpRange.prototype.value = ""; + + /** + * AllowedIpRange description. + * @member {string} description + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @instance + */ + AllowedIpRange.prototype.description = ""; + + /** + * Creates a new AllowedIpRange instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange instance + */ + AllowedIpRange.create = function create(properties) { + return new AllowedIpRange(properties); + }; + + /** + * Encodes the specified AllowedIpRange message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange} message AllowedIpRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedIpRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + return writer; + }; + + /** + * Encodes the specified AllowedIpRange message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange} message AllowedIpRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AllowedIpRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AllowedIpRange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedIpRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.value = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AllowedIpRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AllowedIpRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AllowedIpRange message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AllowedIpRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates an AllowedIpRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange + */ + AllowedIpRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange(); + if (object.value != null) + message.value = String(object.value); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from an AllowedIpRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} message AllowedIpRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AllowedIpRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.description = ""; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this AllowedIpRange to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @instance + * @returns {Object.} JSON object + */ + AllowedIpRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AllowedIpRange + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AllowedIpRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange"; + }; + + return AllowedIpRange; + })(); + + return WebServerNetworkAccessControl; + })(); + + v1beta1.SoftwareConfig = (function() { + + /** + * Properties of a SoftwareConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface ISoftwareConfig + * @property {string|null} [imageVersion] SoftwareConfig imageVersion + * @property {Object.|null} [airflowConfigOverrides] SoftwareConfig airflowConfigOverrides + * @property {Object.|null} [pypiPackages] SoftwareConfig pypiPackages + * @property {Object.|null} [envVariables] SoftwareConfig envVariables + * @property {string|null} [pythonVersion] SoftwareConfig pythonVersion + * @property {number|null} [schedulerCount] SoftwareConfig schedulerCount + * @property {google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration|null} [cloudDataLineageIntegration] SoftwareConfig cloudDataLineageIntegration + * @property {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode|null} [webServerPluginsMode] SoftwareConfig webServerPluginsMode + */ + + /** + * Constructs a new SoftwareConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a SoftwareConfig. + * @implements ISoftwareConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig=} [properties] Properties to set + */ + function SoftwareConfig(properties) { + this.airflowConfigOverrides = {}; + this.pypiPackages = {}; + this.envVariables = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SoftwareConfig imageVersion. + * @member {string} imageVersion + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.imageVersion = ""; + + /** + * SoftwareConfig airflowConfigOverrides. + * @member {Object.} airflowConfigOverrides + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.airflowConfigOverrides = $util.emptyObject; + + /** + * SoftwareConfig pypiPackages. + * @member {Object.} pypiPackages + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.pypiPackages = $util.emptyObject; + + /** + * SoftwareConfig envVariables. + * @member {Object.} envVariables + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.envVariables = $util.emptyObject; + + /** + * SoftwareConfig pythonVersion. + * @member {string} pythonVersion + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.pythonVersion = ""; + + /** + * SoftwareConfig schedulerCount. + * @member {number} schedulerCount + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.schedulerCount = 0; + + /** + * SoftwareConfig cloudDataLineageIntegration. + * @member {google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration|null|undefined} cloudDataLineageIntegration + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.cloudDataLineageIntegration = null; + + /** + * SoftwareConfig webServerPluginsMode. + * @member {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode} webServerPluginsMode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @instance + */ + SoftwareConfig.prototype.webServerPluginsMode = 0; + + /** + * Creates a new SoftwareConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} SoftwareConfig instance + */ + SoftwareConfig.create = function create(properties) { + return new SoftwareConfig(properties); + }; + + /** + * Encodes the specified SoftwareConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig} message SoftwareConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwareConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageVersion); + if (message.airflowConfigOverrides != null && Object.hasOwnProperty.call(message, "airflowConfigOverrides")) + for (var keys = Object.keys(message.airflowConfigOverrides), 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.airflowConfigOverrides[keys[i]]).ldelim(); + if (message.pypiPackages != null && Object.hasOwnProperty.call(message, "pypiPackages")) + for (var keys = Object.keys(message.pypiPackages), 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.pypiPackages[keys[i]]).ldelim(); + if (message.envVariables != null && Object.hasOwnProperty.call(message, "envVariables")) + for (var keys = Object.keys(message.envVariables), i = 0; i < keys.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.envVariables[keys[i]]).ldelim(); + if (message.pythonVersion != null && Object.hasOwnProperty.call(message, "pythonVersion")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.pythonVersion); + if (message.schedulerCount != null && Object.hasOwnProperty.call(message, "schedulerCount")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.schedulerCount); + if (message.cloudDataLineageIntegration != null && Object.hasOwnProperty.call(message, "cloudDataLineageIntegration")) + $root.google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.encode(message.cloudDataLineageIntegration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.webServerPluginsMode != null && Object.hasOwnProperty.call(message, "webServerPluginsMode")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.webServerPluginsMode); + return writer; + }; + + /** + * Encodes the specified SoftwareConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig} message SoftwareConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SoftwareConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SoftwareConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} SoftwareConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwareConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.imageVersion = reader.string(); + break; + } + case 2: { + if (message.airflowConfigOverrides === $util.emptyObject) + message.airflowConfigOverrides = {}; + 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.airflowConfigOverrides[key] = value; + break; + } + case 3: { + if (message.pypiPackages === $util.emptyObject) + message.pypiPackages = {}; + 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.pypiPackages[key] = value; + break; + } + case 4: { + if (message.envVariables === $util.emptyObject) + message.envVariables = {}; + 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.envVariables[key] = value; + break; + } + case 6: { + message.pythonVersion = reader.string(); + break; + } + case 7: { + message.schedulerCount = reader.int32(); + break; + } + case 8: { + message.cloudDataLineageIntegration = $root.google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.decode(reader, reader.uint32()); + break; + } + case 10: { + message.webServerPluginsMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SoftwareConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} SoftwareConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SoftwareConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SoftwareConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SoftwareConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + if (!$util.isString(message.imageVersion)) + return "imageVersion: string expected"; + if (message.airflowConfigOverrides != null && message.hasOwnProperty("airflowConfigOverrides")) { + if (!$util.isObject(message.airflowConfigOverrides)) + return "airflowConfigOverrides: object expected"; + var key = Object.keys(message.airflowConfigOverrides); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.airflowConfigOverrides[key[i]])) + return "airflowConfigOverrides: string{k:string} expected"; + } + if (message.pypiPackages != null && message.hasOwnProperty("pypiPackages")) { + if (!$util.isObject(message.pypiPackages)) + return "pypiPackages: object expected"; + var key = Object.keys(message.pypiPackages); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.pypiPackages[key[i]])) + return "pypiPackages: string{k:string} expected"; + } + if (message.envVariables != null && message.hasOwnProperty("envVariables")) { + if (!$util.isObject(message.envVariables)) + return "envVariables: object expected"; + var key = Object.keys(message.envVariables); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.envVariables[key[i]])) + return "envVariables: string{k:string} expected"; + } + if (message.pythonVersion != null && message.hasOwnProperty("pythonVersion")) + if (!$util.isString(message.pythonVersion)) + return "pythonVersion: string expected"; + if (message.schedulerCount != null && message.hasOwnProperty("schedulerCount")) + if (!$util.isInteger(message.schedulerCount)) + return "schedulerCount: integer expected"; + if (message.cloudDataLineageIntegration != null && message.hasOwnProperty("cloudDataLineageIntegration")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.verify(message.cloudDataLineageIntegration); + if (error) + return "cloudDataLineageIntegration." + error; + } + if (message.webServerPluginsMode != null && message.hasOwnProperty("webServerPluginsMode")) + switch (message.webServerPluginsMode) { + default: + return "webServerPluginsMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a SoftwareConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} SoftwareConfig + */ + SoftwareConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig(); + if (object.imageVersion != null) + message.imageVersion = String(object.imageVersion); + if (object.airflowConfigOverrides) { + if (typeof object.airflowConfigOverrides !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.airflowConfigOverrides: object expected"); + message.airflowConfigOverrides = {}; + for (var keys = Object.keys(object.airflowConfigOverrides), i = 0; i < keys.length; ++i) + message.airflowConfigOverrides[keys[i]] = String(object.airflowConfigOverrides[keys[i]]); + } + if (object.pypiPackages) { + if (typeof object.pypiPackages !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.pypiPackages: object expected"); + message.pypiPackages = {}; + for (var keys = Object.keys(object.pypiPackages), i = 0; i < keys.length; ++i) + message.pypiPackages[keys[i]] = String(object.pypiPackages[keys[i]]); + } + if (object.envVariables) { + if (typeof object.envVariables !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.envVariables: object expected"); + message.envVariables = {}; + for (var keys = Object.keys(object.envVariables), i = 0; i < keys.length; ++i) + message.envVariables[keys[i]] = String(object.envVariables[keys[i]]); + } + if (object.pythonVersion != null) + message.pythonVersion = String(object.pythonVersion); + if (object.schedulerCount != null) + message.schedulerCount = object.schedulerCount | 0; + if (object.cloudDataLineageIntegration != null) { + if (typeof object.cloudDataLineageIntegration !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.cloudDataLineageIntegration: object expected"); + message.cloudDataLineageIntegration = $root.google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.fromObject(object.cloudDataLineageIntegration); + } + switch (object.webServerPluginsMode) { + default: + if (typeof object.webServerPluginsMode === "number") { + message.webServerPluginsMode = object.webServerPluginsMode; + break; + } + break; + case "WEB_SERVER_PLUGINS_MODE_UNSPECIFIED": + case 0: + message.webServerPluginsMode = 0; + break; + case "PLUGINS_DISABLED": + case 1: + message.webServerPluginsMode = 1; + break; + case "PLUGINS_ENABLED": + case 2: + message.webServerPluginsMode = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a SoftwareConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} message SoftwareConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SoftwareConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) { + object.airflowConfigOverrides = {}; + object.pypiPackages = {}; + object.envVariables = {}; + } + if (options.defaults) { + object.imageVersion = ""; + object.pythonVersion = ""; + object.schedulerCount = 0; + object.cloudDataLineageIntegration = null; + object.webServerPluginsMode = options.enums === String ? "WEB_SERVER_PLUGINS_MODE_UNSPECIFIED" : 0; + } + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + object.imageVersion = message.imageVersion; + var keys2; + if (message.airflowConfigOverrides && (keys2 = Object.keys(message.airflowConfigOverrides)).length) { + object.airflowConfigOverrides = {}; + for (var j = 0; j < keys2.length; ++j) + object.airflowConfigOverrides[keys2[j]] = message.airflowConfigOverrides[keys2[j]]; + } + if (message.pypiPackages && (keys2 = Object.keys(message.pypiPackages)).length) { + object.pypiPackages = {}; + for (var j = 0; j < keys2.length; ++j) + object.pypiPackages[keys2[j]] = message.pypiPackages[keys2[j]]; + } + if (message.envVariables && (keys2 = Object.keys(message.envVariables)).length) { + object.envVariables = {}; + for (var j = 0; j < keys2.length; ++j) + object.envVariables[keys2[j]] = message.envVariables[keys2[j]]; + } + if (message.pythonVersion != null && message.hasOwnProperty("pythonVersion")) + object.pythonVersion = message.pythonVersion; + if (message.schedulerCount != null && message.hasOwnProperty("schedulerCount")) + object.schedulerCount = message.schedulerCount; + if (message.cloudDataLineageIntegration != null && message.hasOwnProperty("cloudDataLineageIntegration")) + object.cloudDataLineageIntegration = $root.google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.toObject(message.cloudDataLineageIntegration, options); + if (message.webServerPluginsMode != null && message.hasOwnProperty("webServerPluginsMode")) + object.webServerPluginsMode = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode[message.webServerPluginsMode] === undefined ? message.webServerPluginsMode : $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode[message.webServerPluginsMode] : message.webServerPluginsMode; + return object; + }; + + /** + * Converts this SoftwareConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @instance + * @returns {Object.} JSON object + */ + SoftwareConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SoftwareConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SoftwareConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig"; + }; + + /** + * WebServerPluginsMode enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode + * @enum {number} + * @property {number} WEB_SERVER_PLUGINS_MODE_UNSPECIFIED=0 WEB_SERVER_PLUGINS_MODE_UNSPECIFIED value + * @property {number} PLUGINS_DISABLED=1 PLUGINS_DISABLED value + * @property {number} PLUGINS_ENABLED=2 PLUGINS_ENABLED value + */ + SoftwareConfig.WebServerPluginsMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "WEB_SERVER_PLUGINS_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PLUGINS_DISABLED"] = 1; + values[valuesById[2] = "PLUGINS_ENABLED"] = 2; + return values; + })(); + + return SoftwareConfig; + })(); + + v1beta1.IPAllocationPolicy = (function() { + + /** + * Properties of a IPAllocationPolicy. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IIPAllocationPolicy + * @property {boolean|null} [useIpAliases] IPAllocationPolicy useIpAliases + * @property {string|null} [clusterSecondaryRangeName] IPAllocationPolicy clusterSecondaryRangeName + * @property {string|null} [servicesSecondaryRangeName] IPAllocationPolicy servicesSecondaryRangeName + * @property {string|null} [clusterIpv4CidrBlock] IPAllocationPolicy clusterIpv4CidrBlock + * @property {string|null} [servicesIpv4CidrBlock] IPAllocationPolicy servicesIpv4CidrBlock + */ + + /** + * Constructs a new IPAllocationPolicy. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a IPAllocationPolicy. + * @implements IIPAllocationPolicy + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy=} [properties] Properties to set + */ + function IPAllocationPolicy(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IPAllocationPolicy useIpAliases. + * @member {boolean} useIpAliases + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.useIpAliases = false; + + /** + * IPAllocationPolicy clusterSecondaryRangeName. + * @member {string} clusterSecondaryRangeName + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.clusterSecondaryRangeName = ""; + + /** + * IPAllocationPolicy servicesSecondaryRangeName. + * @member {string} servicesSecondaryRangeName + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.servicesSecondaryRangeName = ""; + + /** + * IPAllocationPolicy clusterIpv4CidrBlock. + * @member {string} clusterIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.clusterIpv4CidrBlock = ""; + + /** + * IPAllocationPolicy servicesIpv4CidrBlock. + * @member {string} servicesIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @instance + */ + IPAllocationPolicy.prototype.servicesIpv4CidrBlock = ""; + + /** + * Creates a new IPAllocationPolicy instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} IPAllocationPolicy instance + */ + IPAllocationPolicy.create = function create(properties) { + return new IPAllocationPolicy(properties); + }; + + /** + * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IPAllocationPolicy.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.useIpAliases != null && Object.hasOwnProperty.call(message, "useIpAliases")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useIpAliases); + if (message.clusterSecondaryRangeName != null && Object.hasOwnProperty.call(message, "clusterSecondaryRangeName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterSecondaryRangeName); + if (message.servicesSecondaryRangeName != null && Object.hasOwnProperty.call(message, "servicesSecondaryRangeName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.servicesSecondaryRangeName); + if (message.clusterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "clusterIpv4CidrBlock")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterIpv4CidrBlock); + if (message.servicesIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "servicesIpv4CidrBlock")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.servicesIpv4CidrBlock); + return writer; + }; + + /** + * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IPAllocationPolicy.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IPAllocationPolicy.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.useIpAliases = reader.bool(); + break; + } + case 2: { + message.clusterSecondaryRangeName = reader.string(); + break; + } + case 3: { + message.servicesSecondaryRangeName = reader.string(); + break; + } + case 4: { + message.clusterIpv4CidrBlock = reader.string(); + break; + } + case 5: { + message.servicesIpv4CidrBlock = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} IPAllocationPolicy + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IPAllocationPolicy.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a IPAllocationPolicy message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IPAllocationPolicy.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) + if (typeof message.useIpAliases !== "boolean") + return "useIpAliases: boolean expected"; + if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) + if (!$util.isString(message.clusterSecondaryRangeName)) + return "clusterSecondaryRangeName: string expected"; + if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) + if (!$util.isString(message.servicesSecondaryRangeName)) + return "servicesSecondaryRangeName: string expected"; + if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) + if (!$util.isString(message.clusterIpv4CidrBlock)) + return "clusterIpv4CidrBlock: string expected"; + if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) + if (!$util.isString(message.servicesIpv4CidrBlock)) + return "servicesIpv4CidrBlock: string expected"; + return null; + }; + + /** + * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} IPAllocationPolicy + */ + IPAllocationPolicy.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy(); + if (object.useIpAliases != null) + message.useIpAliases = Boolean(object.useIpAliases); + if (object.clusterSecondaryRangeName != null) + message.clusterSecondaryRangeName = String(object.clusterSecondaryRangeName); + if (object.servicesSecondaryRangeName != null) + message.servicesSecondaryRangeName = String(object.servicesSecondaryRangeName); + if (object.clusterIpv4CidrBlock != null) + message.clusterIpv4CidrBlock = String(object.clusterIpv4CidrBlock); + if (object.servicesIpv4CidrBlock != null) + message.servicesIpv4CidrBlock = String(object.servicesIpv4CidrBlock); + return message; + }; + + /** + * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} message IPAllocationPolicy + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IPAllocationPolicy.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.useIpAliases = false; + object.clusterSecondaryRangeName = ""; + object.servicesSecondaryRangeName = ""; + object.clusterIpv4CidrBlock = ""; + object.servicesIpv4CidrBlock = ""; + } + if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) + object.useIpAliases = message.useIpAliases; + if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) + object.clusterSecondaryRangeName = message.clusterSecondaryRangeName; + if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) + object.servicesSecondaryRangeName = message.servicesSecondaryRangeName; + if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) + object.clusterIpv4CidrBlock = message.clusterIpv4CidrBlock; + if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) + object.servicesIpv4CidrBlock = message.servicesIpv4CidrBlock; + return object; + }; + + /** + * Converts this IPAllocationPolicy to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @instance + * @returns {Object.} JSON object + */ + IPAllocationPolicy.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IPAllocationPolicy + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IPAllocationPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy"; + }; + + return IPAllocationPolicy; + })(); + + v1beta1.NodeConfig = (function() { + + /** + * Properties of a NodeConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface INodeConfig + * @property {string|null} [location] NodeConfig location + * @property {string|null} [machineType] NodeConfig machineType + * @property {string|null} [network] NodeConfig network + * @property {string|null} [subnetwork] NodeConfig subnetwork + * @property {number|null} [diskSizeGb] NodeConfig diskSizeGb + * @property {Array.|null} [oauthScopes] NodeConfig oauthScopes + * @property {string|null} [serviceAccount] NodeConfig serviceAccount + * @property {Array.|null} [tags] NodeConfig tags + * @property {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy|null} [ipAllocationPolicy] NodeConfig ipAllocationPolicy + * @property {number|null} [maxPodsPerNode] NodeConfig maxPodsPerNode + * @property {boolean|null} [enableIpMasqAgent] NodeConfig enableIpMasqAgent + * @property {string|null} [composerNetworkAttachment] NodeConfig composerNetworkAttachment + * @property {string|null} [composerInternalIpv4CidrBlock] NodeConfig composerInternalIpv4CidrBlock + */ + + /** + * Constructs a new NodeConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a NodeConfig. + * @implements INodeConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig=} [properties] Properties to set + */ + function NodeConfig(properties) { + this.oauthScopes = []; + this.tags = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeConfig location. + * @member {string} location + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.location = ""; + + /** + * NodeConfig machineType. + * @member {string} machineType + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.machineType = ""; + + /** + * NodeConfig network. + * @member {string} network + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.network = ""; + + /** + * NodeConfig subnetwork. + * @member {string} subnetwork + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.subnetwork = ""; + + /** + * NodeConfig diskSizeGb. + * @member {number} diskSizeGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.diskSizeGb = 0; + + /** + * NodeConfig oauthScopes. + * @member {Array.} oauthScopes + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.oauthScopes = $util.emptyArray; + + /** + * NodeConfig serviceAccount. + * @member {string} serviceAccount + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.serviceAccount = ""; + + /** + * NodeConfig tags. + * @member {Array.} tags + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.tags = $util.emptyArray; + + /** + * NodeConfig ipAllocationPolicy. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy|null|undefined} ipAllocationPolicy + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.ipAllocationPolicy = null; + + /** + * NodeConfig maxPodsPerNode. + * @member {number} maxPodsPerNode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.maxPodsPerNode = 0; + + /** + * NodeConfig enableIpMasqAgent. + * @member {boolean} enableIpMasqAgent + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.enableIpMasqAgent = false; + + /** + * NodeConfig composerNetworkAttachment. + * @member {string} composerNetworkAttachment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.composerNetworkAttachment = ""; + + /** + * NodeConfig composerInternalIpv4CidrBlock. + * @member {string} composerInternalIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + */ + NodeConfig.prototype.composerInternalIpv4CidrBlock = ""; + + /** + * Creates a new NodeConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} NodeConfig instance + */ + NodeConfig.create = function create(properties) { + return new NodeConfig(properties); + }; + + /** + * Encodes the specified NodeConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig} message NodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.machineType); + if (message.network != null && Object.hasOwnProperty.call(message, "network")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.network); + if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.subnetwork); + if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.diskSizeGb); + if (message.oauthScopes != null && message.oauthScopes.length) + for (var i = 0; i < message.oauthScopes.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.oauthScopes[i]); + if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.serviceAccount); + if (message.tags != null && message.tags.length) + for (var i = 0; i < message.tags.length; ++i) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.tags[i]); + if (message.ipAllocationPolicy != null && Object.hasOwnProperty.call(message, "ipAllocationPolicy")) + $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.encode(message.ipAllocationPolicy, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.maxPodsPerNode != null && Object.hasOwnProperty.call(message, "maxPodsPerNode")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.maxPodsPerNode); + if (message.enableIpMasqAgent != null && Object.hasOwnProperty.call(message, "enableIpMasqAgent")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enableIpMasqAgent); + if (message.composerNetworkAttachment != null && Object.hasOwnProperty.call(message, "composerNetworkAttachment")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.composerNetworkAttachment); + if (message.composerInternalIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "composerInternalIpv4CidrBlock")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.composerInternalIpv4CidrBlock); + return writer; + }; + + /** + * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig} message NodeConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.location = reader.string(); + break; + } + case 2: { + message.machineType = reader.string(); + break; + } + case 3: { + message.network = reader.string(); + break; + } + case 4: { + message.subnetwork = reader.string(); + break; + } + case 5: { + message.diskSizeGb = reader.int32(); + break; + } + case 6: { + if (!(message.oauthScopes && message.oauthScopes.length)) + message.oauthScopes = []; + message.oauthScopes.push(reader.string()); + break; + } + case 7: { + message.serviceAccount = reader.string(); + break; + } + case 8: { + if (!(message.tags && message.tags.length)) + message.tags = []; + message.tags.push(reader.string()); + break; + } + case 9: { + message.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.decode(reader, reader.uint32()); + break; + } + case 10: { + message.maxPodsPerNode = reader.int32(); + break; + } + case 11: { + message.enableIpMasqAgent = reader.bool(); + break; + } + case 12: { + message.composerNetworkAttachment = reader.string(); + break; + } + case 13: { + message.composerInternalIpv4CidrBlock = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} NodeConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.network != null && message.hasOwnProperty("network")) + if (!$util.isString(message.network)) + return "network: string expected"; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + if (!$util.isString(message.subnetwork)) + return "subnetwork: string expected"; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + if (!$util.isInteger(message.diskSizeGb)) + return "diskSizeGb: integer expected"; + if (message.oauthScopes != null && message.hasOwnProperty("oauthScopes")) { + if (!Array.isArray(message.oauthScopes)) + return "oauthScopes: array expected"; + for (var i = 0; i < message.oauthScopes.length; ++i) + if (!$util.isString(message.oauthScopes[i])) + return "oauthScopes: string[] expected"; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + if (!$util.isString(message.serviceAccount)) + return "serviceAccount: string expected"; + if (message.tags != null && message.hasOwnProperty("tags")) { + if (!Array.isArray(message.tags)) + return "tags: array expected"; + for (var i = 0; i < message.tags.length; ++i) + if (!$util.isString(message.tags[i])) + return "tags: string[] expected"; + } + if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.verify(message.ipAllocationPolicy); + if (error) + return "ipAllocationPolicy." + error; + } + if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) + if (!$util.isInteger(message.maxPodsPerNode)) + return "maxPodsPerNode: integer expected"; + if (message.enableIpMasqAgent != null && message.hasOwnProperty("enableIpMasqAgent")) + if (typeof message.enableIpMasqAgent !== "boolean") + return "enableIpMasqAgent: boolean expected"; + if (message.composerNetworkAttachment != null && message.hasOwnProperty("composerNetworkAttachment")) + if (!$util.isString(message.composerNetworkAttachment)) + return "composerNetworkAttachment: string expected"; + if (message.composerInternalIpv4CidrBlock != null && message.hasOwnProperty("composerInternalIpv4CidrBlock")) + if (!$util.isString(message.composerInternalIpv4CidrBlock)) + return "composerInternalIpv4CidrBlock: string expected"; + return null; + }; + + /** + * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} NodeConfig + */ + NodeConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig(); + if (object.location != null) + message.location = String(object.location); + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.network != null) + message.network = String(object.network); + if (object.subnetwork != null) + message.subnetwork = String(object.subnetwork); + if (object.diskSizeGb != null) + message.diskSizeGb = object.diskSizeGb | 0; + if (object.oauthScopes) { + if (!Array.isArray(object.oauthScopes)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.oauthScopes: array expected"); + message.oauthScopes = []; + for (var i = 0; i < object.oauthScopes.length; ++i) + message.oauthScopes[i] = String(object.oauthScopes[i]); + } + if (object.serviceAccount != null) + message.serviceAccount = String(object.serviceAccount); + if (object.tags) { + if (!Array.isArray(object.tags)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.tags: array expected"); + message.tags = []; + for (var i = 0; i < object.tags.length; ++i) + message.tags[i] = String(object.tags[i]); + } + if (object.ipAllocationPolicy != null) { + if (typeof object.ipAllocationPolicy !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.ipAllocationPolicy: object expected"); + message.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.fromObject(object.ipAllocationPolicy); + } + if (object.maxPodsPerNode != null) + message.maxPodsPerNode = object.maxPodsPerNode | 0; + if (object.enableIpMasqAgent != null) + message.enableIpMasqAgent = Boolean(object.enableIpMasqAgent); + if (object.composerNetworkAttachment != null) + message.composerNetworkAttachment = String(object.composerNetworkAttachment); + if (object.composerInternalIpv4CidrBlock != null) + message.composerInternalIpv4CidrBlock = String(object.composerInternalIpv4CidrBlock); + return message; + }; + + /** + * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} message NodeConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.oauthScopes = []; + object.tags = []; + } + if (options.defaults) { + object.location = ""; + object.machineType = ""; + object.network = ""; + object.subnetwork = ""; + object.diskSizeGb = 0; + object.serviceAccount = ""; + object.ipAllocationPolicy = null; + object.maxPodsPerNode = 0; + object.enableIpMasqAgent = false; + object.composerNetworkAttachment = ""; + object.composerInternalIpv4CidrBlock = ""; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.network != null && message.hasOwnProperty("network")) + object.network = message.network; + if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) + object.subnetwork = message.subnetwork; + if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) + object.diskSizeGb = message.diskSizeGb; + if (message.oauthScopes && message.oauthScopes.length) { + object.oauthScopes = []; + for (var j = 0; j < message.oauthScopes.length; ++j) + object.oauthScopes[j] = message.oauthScopes[j]; + } + if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) + object.serviceAccount = message.serviceAccount; + if (message.tags && message.tags.length) { + object.tags = []; + for (var j = 0; j < message.tags.length; ++j) + object.tags[j] = message.tags[j]; + } + if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) + object.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.toObject(message.ipAllocationPolicy, options); + if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) + object.maxPodsPerNode = message.maxPodsPerNode; + if (message.enableIpMasqAgent != null && message.hasOwnProperty("enableIpMasqAgent")) + object.enableIpMasqAgent = message.enableIpMasqAgent; + if (message.composerNetworkAttachment != null && message.hasOwnProperty("composerNetworkAttachment")) + object.composerNetworkAttachment = message.composerNetworkAttachment; + if (message.composerInternalIpv4CidrBlock != null && message.hasOwnProperty("composerInternalIpv4CidrBlock")) + object.composerInternalIpv4CidrBlock = message.composerInternalIpv4CidrBlock; + return object; + }; + + /** + * Converts this NodeConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @instance + * @returns {Object.} JSON object + */ + NodeConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.NodeConfig"; + }; + + return NodeConfig; + })(); + + v1beta1.PrivateClusterConfig = (function() { + + /** + * Properties of a PrivateClusterConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IPrivateClusterConfig + * @property {boolean|null} [enablePrivateEndpoint] PrivateClusterConfig enablePrivateEndpoint + * @property {string|null} [masterIpv4CidrBlock] PrivateClusterConfig masterIpv4CidrBlock + * @property {string|null} [masterIpv4ReservedRange] PrivateClusterConfig masterIpv4ReservedRange + */ + + /** + * Constructs a new PrivateClusterConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a PrivateClusterConfig. + * @implements IPrivateClusterConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig=} [properties] Properties to set + */ + function PrivateClusterConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateClusterConfig enablePrivateEndpoint. + * @member {boolean} enablePrivateEndpoint + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.enablePrivateEndpoint = false; + + /** + * PrivateClusterConfig masterIpv4CidrBlock. + * @member {string} masterIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.masterIpv4CidrBlock = ""; + + /** + * PrivateClusterConfig masterIpv4ReservedRange. + * @member {string} masterIpv4ReservedRange + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @instance + */ + PrivateClusterConfig.prototype.masterIpv4ReservedRange = ""; + + /** + * Creates a new PrivateClusterConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} PrivateClusterConfig instance + */ + PrivateClusterConfig.create = function create(properties) { + return new PrivateClusterConfig(properties); + }; + + /** + * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateClusterConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enablePrivateEndpoint != null && Object.hasOwnProperty.call(message, "enablePrivateEndpoint")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePrivateEndpoint); + if (message.masterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "masterIpv4CidrBlock")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.masterIpv4CidrBlock); + if (message.masterIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "masterIpv4ReservedRange")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.masterIpv4ReservedRange); + return writer; + }; + + /** + * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateClusterConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateClusterConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enablePrivateEndpoint = reader.bool(); + break; + } + case 2: { + message.masterIpv4CidrBlock = reader.string(); + break; + } + case 3: { + message.masterIpv4ReservedRange = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} PrivateClusterConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateClusterConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateClusterConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateClusterConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) + if (typeof message.enablePrivateEndpoint !== "boolean") + return "enablePrivateEndpoint: boolean expected"; + if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) + if (!$util.isString(message.masterIpv4CidrBlock)) + return "masterIpv4CidrBlock: string expected"; + if (message.masterIpv4ReservedRange != null && message.hasOwnProperty("masterIpv4ReservedRange")) + if (!$util.isString(message.masterIpv4ReservedRange)) + return "masterIpv4ReservedRange: string expected"; + return null; + }; + + /** + * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} PrivateClusterConfig + */ + PrivateClusterConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig(); + if (object.enablePrivateEndpoint != null) + message.enablePrivateEndpoint = Boolean(object.enablePrivateEndpoint); + if (object.masterIpv4CidrBlock != null) + message.masterIpv4CidrBlock = String(object.masterIpv4CidrBlock); + if (object.masterIpv4ReservedRange != null) + message.masterIpv4ReservedRange = String(object.masterIpv4ReservedRange); + return message; + }; + + /** + * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} message PrivateClusterConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateClusterConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enablePrivateEndpoint = false; + object.masterIpv4CidrBlock = ""; + object.masterIpv4ReservedRange = ""; + } + if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) + object.enablePrivateEndpoint = message.enablePrivateEndpoint; + if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) + object.masterIpv4CidrBlock = message.masterIpv4CidrBlock; + if (message.masterIpv4ReservedRange != null && message.hasOwnProperty("masterIpv4ReservedRange")) + object.masterIpv4ReservedRange = message.masterIpv4ReservedRange; + return object; + }; + + /** + * Converts this PrivateClusterConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @instance + * @returns {Object.} JSON object + */ + PrivateClusterConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateClusterConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateClusterConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig"; + }; + + return PrivateClusterConfig; + })(); + + v1beta1.NetworkingConfig = (function() { + + /** + * Properties of a NetworkingConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface INetworkingConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType|null} [connectionType] NetworkingConfig connectionType + */ + + /** + * Constructs a new NetworkingConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a NetworkingConfig. + * @implements INetworkingConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig=} [properties] Properties to set + */ + function NetworkingConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NetworkingConfig connectionType. + * @member {google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType} connectionType + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig + * @instance + */ + NetworkingConfig.prototype.connectionType = 0; + + /** + * Creates a new NetworkingConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig} NetworkingConfig instance + */ + NetworkingConfig.create = function create(properties) { + return new NetworkingConfig(properties); + }; + + /** + * Encodes the specified NetworkingConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig} message NetworkingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkingConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.connectionType != null && Object.hasOwnProperty.call(message, "connectionType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.connectionType); + return writer; + }; + + /** + * Encodes the specified NetworkingConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig} message NetworkingConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NetworkingConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NetworkingConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig} NetworkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkingConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.connectionType = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NetworkingConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig} NetworkingConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NetworkingConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NetworkingConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NetworkingConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.connectionType != null && message.hasOwnProperty("connectionType")) + switch (message.connectionType) { + default: + return "connectionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a NetworkingConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig} NetworkingConfig + */ + NetworkingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig(); + switch (object.connectionType) { + default: + if (typeof object.connectionType === "number") { + message.connectionType = object.connectionType; + break; + } + break; + case "CONNECTION_TYPE_UNSPECIFIED": + case 0: + message.connectionType = 0; + break; + case "VPC_PEERING": + case 1: + message.connectionType = 1; + break; + case "PRIVATE_SERVICE_CONNECT": + case 2: + message.connectionType = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a NetworkingConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig} message NetworkingConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NetworkingConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.connectionType = options.enums === String ? "CONNECTION_TYPE_UNSPECIFIED" : 0; + if (message.connectionType != null && message.hasOwnProperty("connectionType")) + object.connectionType = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType[message.connectionType] === undefined ? message.connectionType : $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType[message.connectionType] : message.connectionType; + return object; + }; + + /** + * Converts this NetworkingConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig + * @instance + * @returns {Object.} JSON object + */ + NetworkingConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NetworkingConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NetworkingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig"; + }; + + /** + * ConnectionType enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType + * @enum {number} + * @property {number} CONNECTION_TYPE_UNSPECIFIED=0 CONNECTION_TYPE_UNSPECIFIED value + * @property {number} VPC_PEERING=1 VPC_PEERING value + * @property {number} PRIVATE_SERVICE_CONNECT=2 PRIVATE_SERVICE_CONNECT value + */ + NetworkingConfig.ConnectionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONNECTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VPC_PEERING"] = 1; + values[valuesById[2] = "PRIVATE_SERVICE_CONNECT"] = 2; + return values; + })(); + + return NetworkingConfig; + })(); + + v1beta1.PrivateEnvironmentConfig = (function() { + + /** + * Properties of a PrivateEnvironmentConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IPrivateEnvironmentConfig + * @property {boolean|null} [enablePrivateEnvironment] PrivateEnvironmentConfig enablePrivateEnvironment + * @property {boolean|null} [enablePrivateBuildsOnly] PrivateEnvironmentConfig enablePrivateBuildsOnly + * @property {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig|null} [privateClusterConfig] PrivateEnvironmentConfig privateClusterConfig + * @property {string|null} [webServerIpv4CidrBlock] PrivateEnvironmentConfig webServerIpv4CidrBlock + * @property {string|null} [cloudSqlIpv4CidrBlock] PrivateEnvironmentConfig cloudSqlIpv4CidrBlock + * @property {string|null} [webServerIpv4ReservedRange] PrivateEnvironmentConfig webServerIpv4ReservedRange + * @property {string|null} [cloudComposerNetworkIpv4CidrBlock] PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock + * @property {string|null} [cloudComposerNetworkIpv4ReservedRange] PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange + * @property {boolean|null} [enablePrivatelyUsedPublicIps] PrivateEnvironmentConfig enablePrivatelyUsedPublicIps + * @property {string|null} [cloudComposerConnectionSubnetwork] PrivateEnvironmentConfig cloudComposerConnectionSubnetwork + * @property {google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig|null} [networkingConfig] PrivateEnvironmentConfig networkingConfig + */ + + /** + * Constructs a new PrivateEnvironmentConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a PrivateEnvironmentConfig. + * @implements IPrivateEnvironmentConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig=} [properties] Properties to set + */ + function PrivateEnvironmentConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PrivateEnvironmentConfig enablePrivateEnvironment. + * @member {boolean} enablePrivateEnvironment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.enablePrivateEnvironment = false; + + /** + * PrivateEnvironmentConfig enablePrivateBuildsOnly. + * @member {boolean} enablePrivateBuildsOnly + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.enablePrivateBuildsOnly = false; + + /** + * PrivateEnvironmentConfig privateClusterConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig|null|undefined} privateClusterConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.privateClusterConfig = null; + + /** + * PrivateEnvironmentConfig webServerIpv4CidrBlock. + * @member {string} webServerIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.webServerIpv4CidrBlock = ""; + + /** + * PrivateEnvironmentConfig cloudSqlIpv4CidrBlock. + * @member {string} cloudSqlIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.cloudSqlIpv4CidrBlock = ""; + + /** + * PrivateEnvironmentConfig webServerIpv4ReservedRange. + * @member {string} webServerIpv4ReservedRange + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.webServerIpv4ReservedRange = ""; + + /** + * PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock. + * @member {string} cloudComposerNetworkIpv4CidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.cloudComposerNetworkIpv4CidrBlock = ""; + + /** + * PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange. + * @member {string} cloudComposerNetworkIpv4ReservedRange + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.cloudComposerNetworkIpv4ReservedRange = ""; + + /** + * PrivateEnvironmentConfig enablePrivatelyUsedPublicIps. + * @member {boolean} enablePrivatelyUsedPublicIps + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.enablePrivatelyUsedPublicIps = false; + + /** + * PrivateEnvironmentConfig cloudComposerConnectionSubnetwork. + * @member {string} cloudComposerConnectionSubnetwork + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.cloudComposerConnectionSubnetwork = ""; + + /** + * PrivateEnvironmentConfig networkingConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig|null|undefined} networkingConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + */ + PrivateEnvironmentConfig.prototype.networkingConfig = null; + + /** + * Creates a new PrivateEnvironmentConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} PrivateEnvironmentConfig instance + */ + PrivateEnvironmentConfig.create = function create(properties) { + return new PrivateEnvironmentConfig(properties); + }; + + /** + * Encodes the specified PrivateEnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig} message PrivateEnvironmentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateEnvironmentConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enablePrivateEnvironment != null && Object.hasOwnProperty.call(message, "enablePrivateEnvironment")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePrivateEnvironment); + if (message.privateClusterConfig != null && Object.hasOwnProperty.call(message, "privateClusterConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.encode(message.privateClusterConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.webServerIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "webServerIpv4CidrBlock")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.webServerIpv4CidrBlock); + if (message.cloudSqlIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "cloudSqlIpv4CidrBlock")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.cloudSqlIpv4CidrBlock); + if (message.webServerIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "webServerIpv4ReservedRange")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.webServerIpv4ReservedRange); + if (message.enablePrivatelyUsedPublicIps != null && Object.hasOwnProperty.call(message, "enablePrivatelyUsedPublicIps")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.enablePrivatelyUsedPublicIps); + if (message.cloudComposerNetworkIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "cloudComposerNetworkIpv4CidrBlock")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.cloudComposerNetworkIpv4CidrBlock); + if (message.cloudComposerNetworkIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "cloudComposerNetworkIpv4ReservedRange")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.cloudComposerNetworkIpv4ReservedRange); + if (message.cloudComposerConnectionSubnetwork != null && Object.hasOwnProperty.call(message, "cloudComposerConnectionSubnetwork")) + writer.uint32(/* id 9, wireType 2 =*/74).string(message.cloudComposerConnectionSubnetwork); + if (message.networkingConfig != null && Object.hasOwnProperty.call(message, "networkingConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.encode(message.networkingConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.enablePrivateBuildsOnly != null && Object.hasOwnProperty.call(message, "enablePrivateBuildsOnly")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enablePrivateBuildsOnly); + return writer; + }; + + /** + * Encodes the specified PrivateEnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig} message PrivateEnvironmentConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PrivateEnvironmentConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} PrivateEnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateEnvironmentConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enablePrivateEnvironment = reader.bool(); + break; + } + case 11: { + message.enablePrivateBuildsOnly = reader.bool(); + break; + } + case 2: { + message.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.webServerIpv4CidrBlock = reader.string(); + break; + } + case 4: { + message.cloudSqlIpv4CidrBlock = reader.string(); + break; + } + case 5: { + message.webServerIpv4ReservedRange = reader.string(); + break; + } + case 7: { + message.cloudComposerNetworkIpv4CidrBlock = reader.string(); + break; + } + case 8: { + message.cloudComposerNetworkIpv4ReservedRange = reader.string(); + break; + } + case 6: { + message.enablePrivatelyUsedPublicIps = reader.bool(); + break; + } + case 9: { + message.cloudComposerConnectionSubnetwork = reader.string(); + break; + } + case 10: { + message.networkingConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} PrivateEnvironmentConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrivateEnvironmentConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrivateEnvironmentConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PrivateEnvironmentConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enablePrivateEnvironment != null && message.hasOwnProperty("enablePrivateEnvironment")) + if (typeof message.enablePrivateEnvironment !== "boolean") + return "enablePrivateEnvironment: boolean expected"; + if (message.enablePrivateBuildsOnly != null && message.hasOwnProperty("enablePrivateBuildsOnly")) + if (typeof message.enablePrivateBuildsOnly !== "boolean") + return "enablePrivateBuildsOnly: boolean expected"; + if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.verify(message.privateClusterConfig); + if (error) + return "privateClusterConfig." + error; + } + if (message.webServerIpv4CidrBlock != null && message.hasOwnProperty("webServerIpv4CidrBlock")) + if (!$util.isString(message.webServerIpv4CidrBlock)) + return "webServerIpv4CidrBlock: string expected"; + if (message.cloudSqlIpv4CidrBlock != null && message.hasOwnProperty("cloudSqlIpv4CidrBlock")) + if (!$util.isString(message.cloudSqlIpv4CidrBlock)) + return "cloudSqlIpv4CidrBlock: string expected"; + if (message.webServerIpv4ReservedRange != null && message.hasOwnProperty("webServerIpv4ReservedRange")) + if (!$util.isString(message.webServerIpv4ReservedRange)) + return "webServerIpv4ReservedRange: string expected"; + if (message.cloudComposerNetworkIpv4CidrBlock != null && message.hasOwnProperty("cloudComposerNetworkIpv4CidrBlock")) + if (!$util.isString(message.cloudComposerNetworkIpv4CidrBlock)) + return "cloudComposerNetworkIpv4CidrBlock: string expected"; + if (message.cloudComposerNetworkIpv4ReservedRange != null && message.hasOwnProperty("cloudComposerNetworkIpv4ReservedRange")) + if (!$util.isString(message.cloudComposerNetworkIpv4ReservedRange)) + return "cloudComposerNetworkIpv4ReservedRange: string expected"; + if (message.enablePrivatelyUsedPublicIps != null && message.hasOwnProperty("enablePrivatelyUsedPublicIps")) + if (typeof message.enablePrivatelyUsedPublicIps !== "boolean") + return "enablePrivatelyUsedPublicIps: boolean expected"; + if (message.cloudComposerConnectionSubnetwork != null && message.hasOwnProperty("cloudComposerConnectionSubnetwork")) + if (!$util.isString(message.cloudComposerConnectionSubnetwork)) + return "cloudComposerConnectionSubnetwork: string expected"; + if (message.networkingConfig != null && message.hasOwnProperty("networkingConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.verify(message.networkingConfig); + if (error) + return "networkingConfig." + error; + } + return null; + }; + + /** + * Creates a PrivateEnvironmentConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} PrivateEnvironmentConfig + */ + PrivateEnvironmentConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig(); + if (object.enablePrivateEnvironment != null) + message.enablePrivateEnvironment = Boolean(object.enablePrivateEnvironment); + if (object.enablePrivateBuildsOnly != null) + message.enablePrivateBuildsOnly = Boolean(object.enablePrivateBuildsOnly); + if (object.privateClusterConfig != null) { + if (typeof object.privateClusterConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.privateClusterConfig: object expected"); + message.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.fromObject(object.privateClusterConfig); + } + if (object.webServerIpv4CidrBlock != null) + message.webServerIpv4CidrBlock = String(object.webServerIpv4CidrBlock); + if (object.cloudSqlIpv4CidrBlock != null) + message.cloudSqlIpv4CidrBlock = String(object.cloudSqlIpv4CidrBlock); + if (object.webServerIpv4ReservedRange != null) + message.webServerIpv4ReservedRange = String(object.webServerIpv4ReservedRange); + if (object.cloudComposerNetworkIpv4CidrBlock != null) + message.cloudComposerNetworkIpv4CidrBlock = String(object.cloudComposerNetworkIpv4CidrBlock); + if (object.cloudComposerNetworkIpv4ReservedRange != null) + message.cloudComposerNetworkIpv4ReservedRange = String(object.cloudComposerNetworkIpv4ReservedRange); + if (object.enablePrivatelyUsedPublicIps != null) + message.enablePrivatelyUsedPublicIps = Boolean(object.enablePrivatelyUsedPublicIps); + if (object.cloudComposerConnectionSubnetwork != null) + message.cloudComposerConnectionSubnetwork = String(object.cloudComposerConnectionSubnetwork); + if (object.networkingConfig != null) { + if (typeof object.networkingConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.networkingConfig: object expected"); + message.networkingConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.fromObject(object.networkingConfig); + } + return message; + }; + + /** + * Creates a plain object from a PrivateEnvironmentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} message PrivateEnvironmentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrivateEnvironmentConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enablePrivateEnvironment = false; + object.privateClusterConfig = null; + object.webServerIpv4CidrBlock = ""; + object.cloudSqlIpv4CidrBlock = ""; + object.webServerIpv4ReservedRange = ""; + object.enablePrivatelyUsedPublicIps = false; + object.cloudComposerNetworkIpv4CidrBlock = ""; + object.cloudComposerNetworkIpv4ReservedRange = ""; + object.cloudComposerConnectionSubnetwork = ""; + object.networkingConfig = null; + object.enablePrivateBuildsOnly = false; + } + if (message.enablePrivateEnvironment != null && message.hasOwnProperty("enablePrivateEnvironment")) + object.enablePrivateEnvironment = message.enablePrivateEnvironment; + if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) + object.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.toObject(message.privateClusterConfig, options); + if (message.webServerIpv4CidrBlock != null && message.hasOwnProperty("webServerIpv4CidrBlock")) + object.webServerIpv4CidrBlock = message.webServerIpv4CidrBlock; + if (message.cloudSqlIpv4CidrBlock != null && message.hasOwnProperty("cloudSqlIpv4CidrBlock")) + object.cloudSqlIpv4CidrBlock = message.cloudSqlIpv4CidrBlock; + if (message.webServerIpv4ReservedRange != null && message.hasOwnProperty("webServerIpv4ReservedRange")) + object.webServerIpv4ReservedRange = message.webServerIpv4ReservedRange; + if (message.enablePrivatelyUsedPublicIps != null && message.hasOwnProperty("enablePrivatelyUsedPublicIps")) + object.enablePrivatelyUsedPublicIps = message.enablePrivatelyUsedPublicIps; + if (message.cloudComposerNetworkIpv4CidrBlock != null && message.hasOwnProperty("cloudComposerNetworkIpv4CidrBlock")) + object.cloudComposerNetworkIpv4CidrBlock = message.cloudComposerNetworkIpv4CidrBlock; + if (message.cloudComposerNetworkIpv4ReservedRange != null && message.hasOwnProperty("cloudComposerNetworkIpv4ReservedRange")) + object.cloudComposerNetworkIpv4ReservedRange = message.cloudComposerNetworkIpv4ReservedRange; + if (message.cloudComposerConnectionSubnetwork != null && message.hasOwnProperty("cloudComposerConnectionSubnetwork")) + object.cloudComposerConnectionSubnetwork = message.cloudComposerConnectionSubnetwork; + if (message.networkingConfig != null && message.hasOwnProperty("networkingConfig")) + object.networkingConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.toObject(message.networkingConfig, options); + if (message.enablePrivateBuildsOnly != null && message.hasOwnProperty("enablePrivateBuildsOnly")) + object.enablePrivateBuildsOnly = message.enablePrivateBuildsOnly; + return object; + }; + + /** + * Converts this PrivateEnvironmentConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @instance + * @returns {Object.} JSON object + */ + PrivateEnvironmentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrivateEnvironmentConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrivateEnvironmentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig"; + }; + + return PrivateEnvironmentConfig; + })(); + + v1beta1.DatabaseConfig = (function() { + + /** + * Properties of a DatabaseConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IDatabaseConfig + * @property {string|null} [machineType] DatabaseConfig machineType + * @property {string|null} [zone] DatabaseConfig zone + */ + + /** + * Constructs a new DatabaseConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a DatabaseConfig. + * @implements IDatabaseConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig=} [properties] Properties to set + */ + function DatabaseConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DatabaseConfig machineType. + * @member {string} machineType + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @instance + */ + DatabaseConfig.prototype.machineType = ""; + + /** + * DatabaseConfig zone. + * @member {string} zone + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @instance + */ + DatabaseConfig.prototype.zone = ""; + + /** + * Creates a new DatabaseConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} DatabaseConfig instance + */ + DatabaseConfig.create = function create(properties) { + return new DatabaseConfig(properties); + }; + + /** + * Encodes the specified DatabaseConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig} message DatabaseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); + if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); + return writer; + }; + + /** + * Encodes the specified DatabaseConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig} message DatabaseConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatabaseConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatabaseConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} DatabaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.machineType = reader.string(); + break; + } + case 2: { + message.zone = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatabaseConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} DatabaseConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatabaseConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatabaseConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatabaseConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + if (message.zone != null && message.hasOwnProperty("zone")) + if (!$util.isString(message.zone)) + return "zone: string expected"; + return null; + }; + + /** + * Creates a DatabaseConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} DatabaseConfig + */ + DatabaseConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig(); + if (object.machineType != null) + message.machineType = String(object.machineType); + if (object.zone != null) + message.zone = String(object.zone); + return message; + }; + + /** + * Creates a plain object from a DatabaseConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} message DatabaseConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatabaseConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.machineType = ""; + object.zone = ""; + } + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + if (message.zone != null && message.hasOwnProperty("zone")) + object.zone = message.zone; + return object; + }; + + /** + * Converts this DatabaseConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @instance + * @returns {Object.} JSON object + */ + DatabaseConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatabaseConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatabaseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig"; + }; + + return DatabaseConfig; + })(); + + v1beta1.WebServerConfig = (function() { + + /** + * Properties of a WebServerConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IWebServerConfig + * @property {string|null} [machineType] WebServerConfig machineType + */ + + /** + * Constructs a new WebServerConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a WebServerConfig. + * @implements IWebServerConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig=} [properties] Properties to set + */ + function WebServerConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebServerConfig machineType. + * @member {string} machineType + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @instance + */ + WebServerConfig.prototype.machineType = ""; + + /** + * Creates a new WebServerConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} WebServerConfig instance + */ + WebServerConfig.create = function create(properties) { + return new WebServerConfig(properties); + }; + + /** + * Encodes the specified WebServerConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig} message WebServerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); + return writer; + }; + + /** + * Encodes the specified WebServerConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig} message WebServerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebServerConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} WebServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.machineType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebServerConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} WebServerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebServerConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebServerConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.machineType != null && message.hasOwnProperty("machineType")) + if (!$util.isString(message.machineType)) + return "machineType: string expected"; + return null; + }; + + /** + * Creates a WebServerConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} WebServerConfig + */ + WebServerConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig(); + if (object.machineType != null) + message.machineType = String(object.machineType); + return message; + }; + + /** + * Creates a plain object from a WebServerConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} message WebServerConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebServerConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.machineType = ""; + if (message.machineType != null && message.hasOwnProperty("machineType")) + object.machineType = message.machineType; + return object; + }; + + /** + * Converts this WebServerConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @instance + * @returns {Object.} JSON object + */ + WebServerConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WebServerConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebServerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig"; + }; + + return WebServerConfig; + })(); + + v1beta1.EncryptionConfig = (function() { + + /** + * Properties of an EncryptionConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IEncryptionConfig + * @property {string|null} [kmsKeyName] EncryptionConfig kmsKeyName + */ + + /** + * Constructs a new EncryptionConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an EncryptionConfig. + * @implements IEncryptionConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig=} [properties] Properties to set + */ + function EncryptionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EncryptionConfig kmsKeyName. + * @member {string} kmsKeyName + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @instance + */ + EncryptionConfig.prototype.kmsKeyName = ""; + + /** + * Creates a new EncryptionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} EncryptionConfig instance + */ + EncryptionConfig.create = function create(properties) { + return new EncryptionConfig(properties); + }; + + /** + * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); + return writer; + }; + + /** + * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig} message EncryptionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kmsKeyName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} EncryptionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptionConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + if (!$util.isString(message.kmsKeyName)) + return "kmsKeyName: string expected"; + return null; + }; + + /** + * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} EncryptionConfig + */ + EncryptionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig(); + if (object.kmsKeyName != null) + message.kmsKeyName = String(object.kmsKeyName); + return message; + }; + + /** + * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} message EncryptionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.kmsKeyName = ""; + if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) + object.kmsKeyName = message.kmsKeyName; + return object; + }; + + /** + * Converts this EncryptionConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @instance + * @returns {Object.} JSON object + */ + EncryptionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EncryptionConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig"; + }; + + return EncryptionConfig; + })(); + + v1beta1.MaintenanceWindow = (function() { + + /** + * Properties of a MaintenanceWindow. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IMaintenanceWindow + * @property {google.protobuf.ITimestamp|null} [startTime] MaintenanceWindow startTime + * @property {google.protobuf.ITimestamp|null} [endTime] MaintenanceWindow endTime + * @property {string|null} [recurrence] MaintenanceWindow recurrence + */ + + /** + * Constructs a new MaintenanceWindow. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a MaintenanceWindow. + * @implements IMaintenanceWindow + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow=} [properties] Properties to set + */ + function MaintenanceWindow(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MaintenanceWindow startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.startTime = null; + + /** + * MaintenanceWindow endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.endTime = null; + + /** + * MaintenanceWindow recurrence. + * @member {string} recurrence + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @instance + */ + MaintenanceWindow.prototype.recurrence = ""; + + /** + * Creates a new MaintenanceWindow instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} MaintenanceWindow instance + */ + MaintenanceWindow.create = function create(properties) { + return new MaintenanceWindow(properties); + }; + + /** + * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenanceWindow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, 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.recurrence != null && Object.hasOwnProperty.call(message, "recurrence")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.recurrence); + return writer; + }; + + /** + * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenanceWindow.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.startTime = $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.recurrence = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} MaintenanceWindow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MaintenanceWindow message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MaintenanceWindow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.recurrence != null && message.hasOwnProperty("recurrence")) + if (!$util.isString(message.recurrence)) + return "recurrence: string expected"; + return null; + }; + + /** + * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} MaintenanceWindow + */ + MaintenanceWindow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.recurrence != null) + message.recurrence = String(object.recurrence); + return message; + }; + + /** + * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} message MaintenanceWindow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MaintenanceWindow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + object.recurrence = ""; + } + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.recurrence != null && message.hasOwnProperty("recurrence")) + object.recurrence = message.recurrence; + return object; + }; + + /** + * Converts this MaintenanceWindow to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @instance + * @returns {Object.} JSON object + */ + MaintenanceWindow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MaintenanceWindow + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow"; + }; + + return MaintenanceWindow; + })(); + + v1beta1.WorkloadsConfig = (function() { + + /** + * Properties of a WorkloadsConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IWorkloadsConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource|null} [scheduler] WorkloadsConfig scheduler + * @property {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource|null} [webServer] WorkloadsConfig webServer + * @property {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource|null} [worker] WorkloadsConfig worker + * @property {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource|null} [triggerer] WorkloadsConfig triggerer + * @property {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource|null} [dagProcessor] WorkloadsConfig dagProcessor + */ + + /** + * Constructs a new WorkloadsConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a WorkloadsConfig. + * @implements IWorkloadsConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig=} [properties] Properties to set + */ + function WorkloadsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkloadsConfig scheduler. + * @member {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource|null|undefined} scheduler + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @instance + */ + WorkloadsConfig.prototype.scheduler = null; + + /** + * WorkloadsConfig webServer. + * @member {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource|null|undefined} webServer + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @instance + */ + WorkloadsConfig.prototype.webServer = null; + + /** + * WorkloadsConfig worker. + * @member {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource|null|undefined} worker + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @instance + */ + WorkloadsConfig.prototype.worker = null; + + /** + * WorkloadsConfig triggerer. + * @member {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource|null|undefined} triggerer + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @instance + */ + WorkloadsConfig.prototype.triggerer = null; + + /** + * WorkloadsConfig dagProcessor. + * @member {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource|null|undefined} dagProcessor + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @instance + */ + WorkloadsConfig.prototype.dagProcessor = null; + + /** + * Creates a new WorkloadsConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} WorkloadsConfig instance + */ + WorkloadsConfig.create = function create(properties) { + return new WorkloadsConfig(properties); + }; + + /** + * Encodes the specified WorkloadsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig} message WorkloadsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scheduler != null && Object.hasOwnProperty.call(message, "scheduler")) + $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.encode(message.scheduler, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.webServer != null && Object.hasOwnProperty.call(message, "webServer")) + $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.encode(message.webServer, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.worker != null && Object.hasOwnProperty.call(message, "worker")) + $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.encode(message.worker, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.triggerer != null && Object.hasOwnProperty.call(message, "triggerer")) + $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.encode(message.triggerer, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.dagProcessor != null && Object.hasOwnProperty.call(message, "dagProcessor")) + $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.encode(message.dagProcessor, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified WorkloadsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig} message WorkloadsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkloadsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkloadsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} WorkloadsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scheduler = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.decode(reader, reader.uint32()); + break; + } + case 2: { + message.webServer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.worker = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.decode(reader, reader.uint32()); + break; + } + case 4: { + message.triggerer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.decode(reader, reader.uint32()); + break; + } + case 5: { + message.dagProcessor = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkloadsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} WorkloadsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkloadsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkloadsConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkloadsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scheduler != null && message.hasOwnProperty("scheduler")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.verify(message.scheduler); + if (error) + return "scheduler." + error; + } + if (message.webServer != null && message.hasOwnProperty("webServer")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.verify(message.webServer); + if (error) + return "webServer." + error; + } + if (message.worker != null && message.hasOwnProperty("worker")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.verify(message.worker); + if (error) + return "worker." + error; + } + if (message.triggerer != null && message.hasOwnProperty("triggerer")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.verify(message.triggerer); + if (error) + return "triggerer." + error; + } + if (message.dagProcessor != null && message.hasOwnProperty("dagProcessor")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.verify(message.dagProcessor); + if (error) + return "dagProcessor." + error; + } + return null; + }; + + /** + * Creates a WorkloadsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} WorkloadsConfig + */ + WorkloadsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig(); + if (object.scheduler != null) { + if (typeof object.scheduler !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.scheduler: object expected"); + message.scheduler = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.fromObject(object.scheduler); + } + if (object.webServer != null) { + if (typeof object.webServer !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.webServer: object expected"); + message.webServer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.fromObject(object.webServer); + } + if (object.worker != null) { + if (typeof object.worker !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.worker: object expected"); + message.worker = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.fromObject(object.worker); + } + if (object.triggerer != null) { + if (typeof object.triggerer !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.triggerer: object expected"); + message.triggerer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.fromObject(object.triggerer); + } + if (object.dagProcessor != null) { + if (typeof object.dagProcessor !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.dagProcessor: object expected"); + message.dagProcessor = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.fromObject(object.dagProcessor); + } + return message; + }; + + /** + * Creates a plain object from a WorkloadsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} message WorkloadsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkloadsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.scheduler = null; + object.webServer = null; + object.worker = null; + object.triggerer = null; + object.dagProcessor = null; + } + if (message.scheduler != null && message.hasOwnProperty("scheduler")) + object.scheduler = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.toObject(message.scheduler, options); + if (message.webServer != null && message.hasOwnProperty("webServer")) + object.webServer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.toObject(message.webServer, options); + if (message.worker != null && message.hasOwnProperty("worker")) + object.worker = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.toObject(message.worker, options); + if (message.triggerer != null && message.hasOwnProperty("triggerer")) + object.triggerer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.toObject(message.triggerer, options); + if (message.dagProcessor != null && message.hasOwnProperty("dagProcessor")) + object.dagProcessor = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.toObject(message.dagProcessor, options); + return object; + }; + + /** + * Converts this WorkloadsConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @instance + * @returns {Object.} JSON object + */ + WorkloadsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkloadsConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkloadsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig"; + }; + + WorkloadsConfig.SchedulerResource = (function() { + + /** + * Properties of a SchedulerResource. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @interface ISchedulerResource + * @property {number|null} [cpu] SchedulerResource cpu + * @property {number|null} [memoryGb] SchedulerResource memoryGb + * @property {number|null} [storageGb] SchedulerResource storageGb + * @property {number|null} [count] SchedulerResource count + */ + + /** + * Constructs a new SchedulerResource. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @classdesc Represents a SchedulerResource. + * @implements ISchedulerResource + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource=} [properties] Properties to set + */ + function SchedulerResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SchedulerResource cpu. + * @member {number} cpu + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @instance + */ + SchedulerResource.prototype.cpu = 0; + + /** + * SchedulerResource memoryGb. + * @member {number} memoryGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @instance + */ + SchedulerResource.prototype.memoryGb = 0; + + /** + * SchedulerResource storageGb. + * @member {number} storageGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @instance + */ + SchedulerResource.prototype.storageGb = 0; + + /** + * SchedulerResource count. + * @member {number} count + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @instance + */ + SchedulerResource.prototype.count = 0; + + /** + * Creates a new SchedulerResource instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} SchedulerResource instance + */ + SchedulerResource.create = function create(properties) { + return new SchedulerResource(properties); + }; + + /** + * Encodes the specified SchedulerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource} message SchedulerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchedulerResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); + if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); + if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.count); + return writer; + }; + + /** + * Encodes the specified SchedulerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource} message SchedulerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SchedulerResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SchedulerResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} SchedulerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchedulerResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cpu = reader.float(); + break; + } + case 2: { + message.memoryGb = reader.float(); + break; + } + case 3: { + message.storageGb = reader.float(); + break; + } + case 4: { + message.count = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SchedulerResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} SchedulerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SchedulerResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SchedulerResource message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SchedulerResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpu != null && message.hasOwnProperty("cpu")) + if (typeof message.cpu !== "number") + return "cpu: number expected"; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + if (typeof message.memoryGb !== "number") + return "memoryGb: number expected"; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + if (typeof message.storageGb !== "number") + return "storageGb: number expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count)) + return "count: integer expected"; + return null; + }; + + /** + * Creates a SchedulerResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} SchedulerResource + */ + SchedulerResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource(); + if (object.cpu != null) + message.cpu = Number(object.cpu); + if (object.memoryGb != null) + message.memoryGb = Number(object.memoryGb); + if (object.storageGb != null) + message.storageGb = Number(object.storageGb); + if (object.count != null) + message.count = object.count | 0; + return message; + }; + + /** + * Creates a plain object from a SchedulerResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} message SchedulerResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SchedulerResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cpu = 0; + object.memoryGb = 0; + object.storageGb = 0; + object.count = 0; + } + if (message.cpu != null && message.hasOwnProperty("cpu")) + object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; + if (message.count != null && message.hasOwnProperty("count")) + object.count = message.count; + return object; + }; + + /** + * Converts this SchedulerResource to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @instance + * @returns {Object.} JSON object + */ + SchedulerResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SchedulerResource + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SchedulerResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource"; + }; + + return SchedulerResource; + })(); + + WorkloadsConfig.WebServerResource = (function() { + + /** + * Properties of a WebServerResource. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @interface IWebServerResource + * @property {number|null} [cpu] WebServerResource cpu + * @property {number|null} [memoryGb] WebServerResource memoryGb + * @property {number|null} [storageGb] WebServerResource storageGb + */ + + /** + * Constructs a new WebServerResource. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @classdesc Represents a WebServerResource. + * @implements IWebServerResource + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource=} [properties] Properties to set + */ + function WebServerResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WebServerResource cpu. + * @member {number} cpu + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @instance + */ + WebServerResource.prototype.cpu = 0; + + /** + * WebServerResource memoryGb. + * @member {number} memoryGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @instance + */ + WebServerResource.prototype.memoryGb = 0; + + /** + * WebServerResource storageGb. + * @member {number} storageGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @instance + */ + WebServerResource.prototype.storageGb = 0; + + /** + * Creates a new WebServerResource instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} WebServerResource instance + */ + WebServerResource.create = function create(properties) { + return new WebServerResource(properties); + }; + + /** + * Encodes the specified WebServerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource} message WebServerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); + if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); + if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); + return writer; + }; + + /** + * Encodes the specified WebServerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource} message WebServerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WebServerResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WebServerResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} WebServerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cpu = reader.float(); + break; + } + case 2: { + message.memoryGb = reader.float(); + break; + } + case 3: { + message.storageGb = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WebServerResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} WebServerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WebServerResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WebServerResource message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WebServerResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpu != null && message.hasOwnProperty("cpu")) + if (typeof message.cpu !== "number") + return "cpu: number expected"; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + if (typeof message.memoryGb !== "number") + return "memoryGb: number expected"; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + if (typeof message.storageGb !== "number") + return "storageGb: number expected"; + return null; + }; + + /** + * Creates a WebServerResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} WebServerResource + */ + WebServerResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource(); + if (object.cpu != null) + message.cpu = Number(object.cpu); + if (object.memoryGb != null) + message.memoryGb = Number(object.memoryGb); + if (object.storageGb != null) + message.storageGb = Number(object.storageGb); + return message; + }; + + /** + * Creates a plain object from a WebServerResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} message WebServerResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WebServerResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cpu = 0; + object.memoryGb = 0; + object.storageGb = 0; + } + if (message.cpu != null && message.hasOwnProperty("cpu")) + object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; + return object; + }; + + /** + * Converts this WebServerResource to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @instance + * @returns {Object.} JSON object + */ + WebServerResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WebServerResource + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WebServerResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource"; + }; + + return WebServerResource; + })(); + + WorkloadsConfig.WorkerResource = (function() { + + /** + * Properties of a WorkerResource. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @interface IWorkerResource + * @property {number|null} [cpu] WorkerResource cpu + * @property {number|null} [memoryGb] WorkerResource memoryGb + * @property {number|null} [storageGb] WorkerResource storageGb + * @property {number|null} [minCount] WorkerResource minCount + * @property {number|null} [maxCount] WorkerResource maxCount + */ + + /** + * Constructs a new WorkerResource. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @classdesc Represents a WorkerResource. + * @implements IWorkerResource + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource=} [properties] Properties to set + */ + function WorkerResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * WorkerResource cpu. + * @member {number} cpu + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @instance + */ + WorkerResource.prototype.cpu = 0; + + /** + * WorkerResource memoryGb. + * @member {number} memoryGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @instance + */ + WorkerResource.prototype.memoryGb = 0; + + /** + * WorkerResource storageGb. + * @member {number} storageGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @instance + */ + WorkerResource.prototype.storageGb = 0; + + /** + * WorkerResource minCount. + * @member {number} minCount + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @instance + */ + WorkerResource.prototype.minCount = 0; + + /** + * WorkerResource maxCount. + * @member {number} maxCount + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @instance + */ + WorkerResource.prototype.maxCount = 0; + + /** + * Creates a new WorkerResource instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} WorkerResource instance + */ + WorkerResource.create = function create(properties) { + return new WorkerResource(properties); + }; + + /** + * Encodes the specified WorkerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource} message WorkerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkerResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); + if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); + if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); + if (message.minCount != null && Object.hasOwnProperty.call(message, "minCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minCount); + if (message.maxCount != null && Object.hasOwnProperty.call(message, "maxCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maxCount); + return writer; + }; + + /** + * Encodes the specified WorkerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource} message WorkerResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + WorkerResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a WorkerResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} WorkerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkerResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cpu = reader.float(); + break; + } + case 2: { + message.memoryGb = reader.float(); + break; + } + case 3: { + message.storageGb = reader.float(); + break; + } + case 4: { + message.minCount = reader.int32(); + break; + } + case 5: { + message.maxCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a WorkerResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} WorkerResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + WorkerResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a WorkerResource message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + WorkerResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpu != null && message.hasOwnProperty("cpu")) + if (typeof message.cpu !== "number") + return "cpu: number expected"; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + if (typeof message.memoryGb !== "number") + return "memoryGb: number expected"; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + if (typeof message.storageGb !== "number") + return "storageGb: number expected"; + if (message.minCount != null && message.hasOwnProperty("minCount")) + if (!$util.isInteger(message.minCount)) + return "minCount: integer expected"; + if (message.maxCount != null && message.hasOwnProperty("maxCount")) + if (!$util.isInteger(message.maxCount)) + return "maxCount: integer expected"; + return null; + }; + + /** + * Creates a WorkerResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} WorkerResource + */ + WorkerResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource(); + if (object.cpu != null) + message.cpu = Number(object.cpu); + if (object.memoryGb != null) + message.memoryGb = Number(object.memoryGb); + if (object.storageGb != null) + message.storageGb = Number(object.storageGb); + if (object.minCount != null) + message.minCount = object.minCount | 0; + if (object.maxCount != null) + message.maxCount = object.maxCount | 0; + return message; + }; + + /** + * Creates a plain object from a WorkerResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} message WorkerResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + WorkerResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cpu = 0; + object.memoryGb = 0; + object.storageGb = 0; + object.minCount = 0; + object.maxCount = 0; + } + if (message.cpu != null && message.hasOwnProperty("cpu")) + object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; + if (message.minCount != null && message.hasOwnProperty("minCount")) + object.minCount = message.minCount; + if (message.maxCount != null && message.hasOwnProperty("maxCount")) + object.maxCount = message.maxCount; + return object; + }; + + /** + * Converts this WorkerResource to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @instance + * @returns {Object.} JSON object + */ + WorkerResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for WorkerResource + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + WorkerResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource"; + }; + + return WorkerResource; + })(); + + WorkloadsConfig.TriggererResource = (function() { + + /** + * Properties of a TriggererResource. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @interface ITriggererResource + * @property {number|null} [count] TriggererResource count + * @property {number|null} [cpu] TriggererResource cpu + * @property {number|null} [memoryGb] TriggererResource memoryGb + */ + + /** + * Constructs a new TriggererResource. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @classdesc Represents a TriggererResource. + * @implements ITriggererResource + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource=} [properties] Properties to set + */ + function TriggererResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TriggererResource count. + * @member {number} count + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource + * @instance + */ + TriggererResource.prototype.count = 0; + + /** + * TriggererResource cpu. + * @member {number} cpu + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource + * @instance + */ + TriggererResource.prototype.cpu = 0; + + /** + * TriggererResource memoryGb. + * @member {number} memoryGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource + * @instance + */ + TriggererResource.prototype.memoryGb = 0; + + /** + * Creates a new TriggererResource instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource} TriggererResource instance + */ + TriggererResource.create = function create(properties) { + return new TriggererResource(properties); + }; + + /** + * Encodes the specified TriggererResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource} message TriggererResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggererResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.count); + if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.cpu); + if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.memoryGb); + return writer; + }; + + /** + * Encodes the specified TriggererResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource} message TriggererResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TriggererResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TriggererResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource} TriggererResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggererResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.count = reader.int32(); + break; + } + case 2: { + message.cpu = reader.float(); + break; + } + case 3: { + message.memoryGb = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TriggererResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource} TriggererResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TriggererResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TriggererResource message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TriggererResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count)) + return "count: integer expected"; + if (message.cpu != null && message.hasOwnProperty("cpu")) + if (typeof message.cpu !== "number") + return "cpu: number expected"; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + if (typeof message.memoryGb !== "number") + return "memoryGb: number expected"; + return null; + }; + + /** + * Creates a TriggererResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource} TriggererResource + */ + TriggererResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource(); + if (object.count != null) + message.count = object.count | 0; + if (object.cpu != null) + message.cpu = Number(object.cpu); + if (object.memoryGb != null) + message.memoryGb = Number(object.memoryGb); + return message; + }; + + /** + * Creates a plain object from a TriggererResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource} message TriggererResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TriggererResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.count = 0; + object.cpu = 0; + object.memoryGb = 0; + } + if (message.count != null && message.hasOwnProperty("count")) + object.count = message.count; + if (message.cpu != null && message.hasOwnProperty("cpu")) + object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; + return object; + }; + + /** + * Converts this TriggererResource to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource + * @instance + * @returns {Object.} JSON object + */ + TriggererResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TriggererResource + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TriggererResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource"; + }; + + return TriggererResource; + })(); + + WorkloadsConfig.DagProcessorResource = (function() { + + /** + * Properties of a DagProcessorResource. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @interface IDagProcessorResource + * @property {number|null} [cpu] DagProcessorResource cpu + * @property {number|null} [memoryGb] DagProcessorResource memoryGb + * @property {number|null} [storageGb] DagProcessorResource storageGb + * @property {number|null} [count] DagProcessorResource count + */ + + /** + * Constructs a new DagProcessorResource. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig + * @classdesc Represents a DagProcessorResource. + * @implements IDagProcessorResource + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource=} [properties] Properties to set + */ + function DagProcessorResource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DagProcessorResource cpu. + * @member {number} cpu + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource + * @instance + */ + DagProcessorResource.prototype.cpu = 0; + + /** + * DagProcessorResource memoryGb. + * @member {number} memoryGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource + * @instance + */ + DagProcessorResource.prototype.memoryGb = 0; + + /** + * DagProcessorResource storageGb. + * @member {number} storageGb + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource + * @instance + */ + DagProcessorResource.prototype.storageGb = 0; + + /** + * DagProcessorResource count. + * @member {number} count + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource + * @instance + */ + DagProcessorResource.prototype.count = 0; + + /** + * Creates a new DagProcessorResource instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource} DagProcessorResource instance + */ + DagProcessorResource.create = function create(properties) { + return new DagProcessorResource(properties); + }; + + /** + * Encodes the specified DagProcessorResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource} message DagProcessorResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DagProcessorResource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) + writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); + if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); + if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.count); + return writer; + }; + + /** + * Encodes the specified DagProcessorResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource} message DagProcessorResource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DagProcessorResource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DagProcessorResource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource} DagProcessorResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DagProcessorResource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.cpu = reader.float(); + break; + } + case 2: { + message.memoryGb = reader.float(); + break; + } + case 3: { + message.storageGb = reader.float(); + break; + } + case 4: { + message.count = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DagProcessorResource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource} DagProcessorResource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DagProcessorResource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DagProcessorResource message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DagProcessorResource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.cpu != null && message.hasOwnProperty("cpu")) + if (typeof message.cpu !== "number") + return "cpu: number expected"; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + if (typeof message.memoryGb !== "number") + return "memoryGb: number expected"; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + if (typeof message.storageGb !== "number") + return "storageGb: number expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count)) + return "count: integer expected"; + return null; + }; + + /** + * Creates a DagProcessorResource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource} DagProcessorResource + */ + DagProcessorResource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource(); + if (object.cpu != null) + message.cpu = Number(object.cpu); + if (object.memoryGb != null) + message.memoryGb = Number(object.memoryGb); + if (object.storageGb != null) + message.storageGb = Number(object.storageGb); + if (object.count != null) + message.count = object.count | 0; + return message; + }; + + /** + * Creates a plain object from a DagProcessorResource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource} message DagProcessorResource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DagProcessorResource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.cpu = 0; + object.memoryGb = 0; + object.storageGb = 0; + object.count = 0; + } + if (message.cpu != null && message.hasOwnProperty("cpu")) + object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; + if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) + object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; + if (message.storageGb != null && message.hasOwnProperty("storageGb")) + object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; + if (message.count != null && message.hasOwnProperty("count")) + object.count = message.count; + return object; + }; + + /** + * Converts this DagProcessorResource to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource + * @instance + * @returns {Object.} JSON object + */ + DagProcessorResource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DagProcessorResource + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DagProcessorResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource"; + }; + + return DagProcessorResource; + })(); + + return WorkloadsConfig; + })(); + + v1beta1.DataRetentionConfig = (function() { + + /** + * Properties of a DataRetentionConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IDataRetentionConfig + * @property {number|null} [airflowDatabaseRetentionDays] DataRetentionConfig airflowDatabaseRetentionDays + * @property {google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig|null} [taskLogsRetentionConfig] DataRetentionConfig taskLogsRetentionConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig|null} [airflowMetadataRetentionConfig] DataRetentionConfig airflowMetadataRetentionConfig + */ + + /** + * Constructs a new DataRetentionConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a DataRetentionConfig. + * @implements IDataRetentionConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig=} [properties] Properties to set + */ + function DataRetentionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DataRetentionConfig airflowDatabaseRetentionDays. + * @member {number} airflowDatabaseRetentionDays + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig + * @instance + */ + DataRetentionConfig.prototype.airflowDatabaseRetentionDays = 0; + + /** + * DataRetentionConfig taskLogsRetentionConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig|null|undefined} taskLogsRetentionConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig + * @instance + */ + DataRetentionConfig.prototype.taskLogsRetentionConfig = null; + + /** + * DataRetentionConfig airflowMetadataRetentionConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig|null|undefined} airflowMetadataRetentionConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig + * @instance + */ + DataRetentionConfig.prototype.airflowMetadataRetentionConfig = null; + + /** + * Creates a new DataRetentionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig} DataRetentionConfig instance + */ + DataRetentionConfig.create = function create(properties) { + return new DataRetentionConfig(properties); + }; + + /** + * Encodes the specified DataRetentionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig} message DataRetentionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataRetentionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.airflowDatabaseRetentionDays != null && Object.hasOwnProperty.call(message, "airflowDatabaseRetentionDays")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.airflowDatabaseRetentionDays); + if (message.taskLogsRetentionConfig != null && Object.hasOwnProperty.call(message, "taskLogsRetentionConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.encode(message.taskLogsRetentionConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.airflowMetadataRetentionConfig != null && Object.hasOwnProperty.call(message, "airflowMetadataRetentionConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.encode(message.airflowMetadataRetentionConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified DataRetentionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig} message DataRetentionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DataRetentionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DataRetentionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig} DataRetentionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataRetentionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.airflowDatabaseRetentionDays = reader.int32(); + break; + } + case 4: { + message.taskLogsRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.airflowMetadataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DataRetentionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig} DataRetentionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DataRetentionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DataRetentionConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DataRetentionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.airflowDatabaseRetentionDays != null && message.hasOwnProperty("airflowDatabaseRetentionDays")) + if (!$util.isInteger(message.airflowDatabaseRetentionDays)) + return "airflowDatabaseRetentionDays: integer expected"; + if (message.taskLogsRetentionConfig != null && message.hasOwnProperty("taskLogsRetentionConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.verify(message.taskLogsRetentionConfig); + if (error) + return "taskLogsRetentionConfig." + error; + } + if (message.airflowMetadataRetentionConfig != null && message.hasOwnProperty("airflowMetadataRetentionConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.verify(message.airflowMetadataRetentionConfig); + if (error) + return "airflowMetadataRetentionConfig." + error; + } + return null; + }; + + /** + * Creates a DataRetentionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig} DataRetentionConfig + */ + DataRetentionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig(); + if (object.airflowDatabaseRetentionDays != null) + message.airflowDatabaseRetentionDays = object.airflowDatabaseRetentionDays | 0; + if (object.taskLogsRetentionConfig != null) { + if (typeof object.taskLogsRetentionConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.taskLogsRetentionConfig: object expected"); + message.taskLogsRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.fromObject(object.taskLogsRetentionConfig); + } + if (object.airflowMetadataRetentionConfig != null) { + if (typeof object.airflowMetadataRetentionConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.airflowMetadataRetentionConfig: object expected"); + message.airflowMetadataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.fromObject(object.airflowMetadataRetentionConfig); + } + return message; + }; + + /** + * Creates a plain object from a DataRetentionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig} message DataRetentionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DataRetentionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.airflowDatabaseRetentionDays = 0; + object.taskLogsRetentionConfig = null; + object.airflowMetadataRetentionConfig = null; + } + if (message.airflowDatabaseRetentionDays != null && message.hasOwnProperty("airflowDatabaseRetentionDays")) + object.airflowDatabaseRetentionDays = message.airflowDatabaseRetentionDays; + if (message.taskLogsRetentionConfig != null && message.hasOwnProperty("taskLogsRetentionConfig")) + object.taskLogsRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.toObject(message.taskLogsRetentionConfig, options); + if (message.airflowMetadataRetentionConfig != null && message.hasOwnProperty("airflowMetadataRetentionConfig")) + object.airflowMetadataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.toObject(message.airflowMetadataRetentionConfig, options); + return object; + }; + + /** + * Converts this DataRetentionConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig + * @instance + * @returns {Object.} JSON object + */ + DataRetentionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DataRetentionConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DataRetentionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig"; + }; + + return DataRetentionConfig; + })(); + + v1beta1.TaskLogsRetentionConfig = (function() { + + /** + * Properties of a TaskLogsRetentionConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface ITaskLogsRetentionConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode|null} [storageMode] TaskLogsRetentionConfig storageMode + */ + + /** + * Constructs a new TaskLogsRetentionConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a TaskLogsRetentionConfig. + * @implements ITaskLogsRetentionConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig=} [properties] Properties to set + */ + function TaskLogsRetentionConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TaskLogsRetentionConfig storageMode. + * @member {google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode} storageMode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig + * @instance + */ + TaskLogsRetentionConfig.prototype.storageMode = 0; + + /** + * Creates a new TaskLogsRetentionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig} TaskLogsRetentionConfig instance + */ + TaskLogsRetentionConfig.create = function create(properties) { + return new TaskLogsRetentionConfig(properties); + }; + + /** + * Encodes the specified TaskLogsRetentionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig} message TaskLogsRetentionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TaskLogsRetentionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.storageMode != null && Object.hasOwnProperty.call(message, "storageMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.storageMode); + return writer; + }; + + /** + * Encodes the specified TaskLogsRetentionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig} message TaskLogsRetentionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TaskLogsRetentionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TaskLogsRetentionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig} TaskLogsRetentionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TaskLogsRetentionConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.storageMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TaskLogsRetentionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig} TaskLogsRetentionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TaskLogsRetentionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TaskLogsRetentionConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TaskLogsRetentionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.storageMode != null && message.hasOwnProperty("storageMode")) + switch (message.storageMode) { + default: + return "storageMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a TaskLogsRetentionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig} TaskLogsRetentionConfig + */ + TaskLogsRetentionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig(); + switch (object.storageMode) { + default: + if (typeof object.storageMode === "number") { + message.storageMode = object.storageMode; + break; + } + break; + case "TASK_LOGS_STORAGE_MODE_UNSPECIFIED": + case 0: + message.storageMode = 0; + break; + case "CLOUD_LOGGING_AND_CLOUD_STORAGE": + case 1: + message.storageMode = 1; + break; + case "CLOUD_LOGGING_ONLY": + case 2: + message.storageMode = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a TaskLogsRetentionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig} message TaskLogsRetentionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TaskLogsRetentionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.storageMode = options.enums === String ? "TASK_LOGS_STORAGE_MODE_UNSPECIFIED" : 0; + if (message.storageMode != null && message.hasOwnProperty("storageMode")) + object.storageMode = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode[message.storageMode] === undefined ? message.storageMode : $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode[message.storageMode] : message.storageMode; + return object; + }; + + /** + * Converts this TaskLogsRetentionConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig + * @instance + * @returns {Object.} JSON object + */ + TaskLogsRetentionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TaskLogsRetentionConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TaskLogsRetentionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig"; + }; + + /** + * TaskLogsStorageMode enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode + * @enum {number} + * @property {number} TASK_LOGS_STORAGE_MODE_UNSPECIFIED=0 TASK_LOGS_STORAGE_MODE_UNSPECIFIED value + * @property {number} CLOUD_LOGGING_AND_CLOUD_STORAGE=1 CLOUD_LOGGING_AND_CLOUD_STORAGE value + * @property {number} CLOUD_LOGGING_ONLY=2 CLOUD_LOGGING_ONLY value + */ + TaskLogsRetentionConfig.TaskLogsStorageMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TASK_LOGS_STORAGE_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD_LOGGING_AND_CLOUD_STORAGE"] = 1; + values[valuesById[2] = "CLOUD_LOGGING_ONLY"] = 2; + return values; + })(); + + return TaskLogsRetentionConfig; + })(); + + v1beta1.AirflowMetadataRetentionPolicyConfig = (function() { + + /** + * Properties of an AirflowMetadataRetentionPolicyConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IAirflowMetadataRetentionPolicyConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode|null} [retentionMode] AirflowMetadataRetentionPolicyConfig retentionMode + * @property {number|null} [retentionDays] AirflowMetadataRetentionPolicyConfig retentionDays + */ + + /** + * Constructs a new AirflowMetadataRetentionPolicyConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an AirflowMetadataRetentionPolicyConfig. + * @implements IAirflowMetadataRetentionPolicyConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig=} [properties] Properties to set + */ + function AirflowMetadataRetentionPolicyConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AirflowMetadataRetentionPolicyConfig retentionMode. + * @member {google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode} retentionMode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig + * @instance + */ + AirflowMetadataRetentionPolicyConfig.prototype.retentionMode = 0; + + /** + * AirflowMetadataRetentionPolicyConfig retentionDays. + * @member {number} retentionDays + * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig + * @instance + */ + AirflowMetadataRetentionPolicyConfig.prototype.retentionDays = 0; + + /** + * Creates a new AirflowMetadataRetentionPolicyConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig} AirflowMetadataRetentionPolicyConfig instance + */ + AirflowMetadataRetentionPolicyConfig.create = function create(properties) { + return new AirflowMetadataRetentionPolicyConfig(properties); + }; + + /** + * Encodes the specified AirflowMetadataRetentionPolicyConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig} message AirflowMetadataRetentionPolicyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AirflowMetadataRetentionPolicyConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.retentionMode != null && Object.hasOwnProperty.call(message, "retentionMode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.retentionMode); + if (message.retentionDays != null && Object.hasOwnProperty.call(message, "retentionDays")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.retentionDays); + return writer; + }; + + /** + * Encodes the specified AirflowMetadataRetentionPolicyConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig} message AirflowMetadataRetentionPolicyConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AirflowMetadataRetentionPolicyConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AirflowMetadataRetentionPolicyConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig} AirflowMetadataRetentionPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AirflowMetadataRetentionPolicyConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.retentionMode = reader.int32(); + break; + } + case 2: { + message.retentionDays = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AirflowMetadataRetentionPolicyConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig} AirflowMetadataRetentionPolicyConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AirflowMetadataRetentionPolicyConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AirflowMetadataRetentionPolicyConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AirflowMetadataRetentionPolicyConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.retentionMode != null && message.hasOwnProperty("retentionMode")) + switch (message.retentionMode) { + default: + return "retentionMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) + if (!$util.isInteger(message.retentionDays)) + return "retentionDays: integer expected"; + return null; + }; + + /** + * Creates an AirflowMetadataRetentionPolicyConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig} AirflowMetadataRetentionPolicyConfig + */ + AirflowMetadataRetentionPolicyConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig(); + switch (object.retentionMode) { + default: + if (typeof object.retentionMode === "number") { + message.retentionMode = object.retentionMode; + break; + } + break; + case "RETENTION_MODE_UNSPECIFIED": + case 0: + message.retentionMode = 0; + break; + case "RETENTION_MODE_ENABLED": + case 1: + message.retentionMode = 1; + break; + case "RETENTION_MODE_DISABLED": + case 2: + message.retentionMode = 2; + break; + } + if (object.retentionDays != null) + message.retentionDays = object.retentionDays | 0; + return message; + }; + + /** + * Creates a plain object from an AirflowMetadataRetentionPolicyConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig} message AirflowMetadataRetentionPolicyConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AirflowMetadataRetentionPolicyConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.retentionMode = options.enums === String ? "RETENTION_MODE_UNSPECIFIED" : 0; + object.retentionDays = 0; + } + if (message.retentionMode != null && message.hasOwnProperty("retentionMode")) + object.retentionMode = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode[message.retentionMode] === undefined ? message.retentionMode : $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode[message.retentionMode] : message.retentionMode; + if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) + object.retentionDays = message.retentionDays; + return object; + }; + + /** + * Converts this AirflowMetadataRetentionPolicyConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig + * @instance + * @returns {Object.} JSON object + */ + AirflowMetadataRetentionPolicyConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AirflowMetadataRetentionPolicyConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AirflowMetadataRetentionPolicyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig"; + }; + + /** + * RetentionMode enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode + * @enum {number} + * @property {number} RETENTION_MODE_UNSPECIFIED=0 RETENTION_MODE_UNSPECIFIED value + * @property {number} RETENTION_MODE_ENABLED=1 RETENTION_MODE_ENABLED value + * @property {number} RETENTION_MODE_DISABLED=2 RETENTION_MODE_DISABLED value + */ + AirflowMetadataRetentionPolicyConfig.RetentionMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "RETENTION_MODE_ENABLED"] = 1; + values[valuesById[2] = "RETENTION_MODE_DISABLED"] = 2; + return values; + })(); + + return AirflowMetadataRetentionPolicyConfig; + })(); + + v1beta1.StorageConfig = (function() { + + /** + * Properties of a StorageConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IStorageConfig + * @property {string|null} [bucket] StorageConfig bucket + */ + + /** + * Constructs a new StorageConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a StorageConfig. + * @implements IStorageConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig=} [properties] Properties to set + */ + function StorageConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * StorageConfig bucket. + * @member {string} bucket + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig + * @instance + */ + StorageConfig.prototype.bucket = ""; + + /** + * Creates a new StorageConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.StorageConfig} StorageConfig instance + */ + StorageConfig.create = function create(properties) { + return new StorageConfig(properties); + }; + + /** + * Encodes the specified StorageConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig} message StorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); + return writer; + }; + + /** + * Encodes the specified StorageConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig} message StorageConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StorageConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StorageConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.StorageConfig} StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bucket = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StorageConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.StorageConfig} StorageConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StorageConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StorageConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StorageConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucket != null && message.hasOwnProperty("bucket")) + if (!$util.isString(message.bucket)) + return "bucket: string expected"; + return null; + }; + + /** + * Creates a StorageConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.StorageConfig} StorageConfig + */ + StorageConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig(); + if (object.bucket != null) + message.bucket = String(object.bucket); + return message; + }; + + /** + * Creates a plain object from a StorageConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.StorageConfig} message StorageConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StorageConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bucket = ""; + if (message.bucket != null && message.hasOwnProperty("bucket")) + object.bucket = message.bucket; + return object; + }; + + /** + * Converts this StorageConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig + * @instance + * @returns {Object.} JSON object + */ + StorageConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StorageConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StorageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.StorageConfig"; + }; + + return StorageConfig; + })(); + + v1beta1.RecoveryConfig = (function() { + + /** + * Properties of a RecoveryConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IRecoveryConfig + * @property {google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig|null} [scheduledSnapshotsConfig] RecoveryConfig scheduledSnapshotsConfig + */ + + /** + * Constructs a new RecoveryConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a RecoveryConfig. + * @implements IRecoveryConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig=} [properties] Properties to set + */ + function RecoveryConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * RecoveryConfig scheduledSnapshotsConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig|null|undefined} scheduledSnapshotsConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig + * @instance + */ + RecoveryConfig.prototype.scheduledSnapshotsConfig = null; + + /** + * Creates a new RecoveryConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig} RecoveryConfig instance + */ + RecoveryConfig.create = function create(properties) { + return new RecoveryConfig(properties); + }; + + /** + * Encodes the specified RecoveryConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig} message RecoveryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecoveryConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.scheduledSnapshotsConfig != null && Object.hasOwnProperty.call(message, "scheduledSnapshotsConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.encode(message.scheduledSnapshotsConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RecoveryConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig} message RecoveryConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RecoveryConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RecoveryConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig} RecoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecoveryConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.scheduledSnapshotsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RecoveryConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig} RecoveryConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RecoveryConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RecoveryConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RecoveryConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.scheduledSnapshotsConfig != null && message.hasOwnProperty("scheduledSnapshotsConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.verify(message.scheduledSnapshotsConfig); + if (error) + return "scheduledSnapshotsConfig." + error; + } + return null; + }; + + /** + * Creates a RecoveryConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig} RecoveryConfig + */ + RecoveryConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig(); + if (object.scheduledSnapshotsConfig != null) { + if (typeof object.scheduledSnapshotsConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.scheduledSnapshotsConfig: object expected"); + message.scheduledSnapshotsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.fromObject(object.scheduledSnapshotsConfig); + } + return message; + }; + + /** + * Creates a plain object from a RecoveryConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig} message RecoveryConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RecoveryConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.scheduledSnapshotsConfig = null; + if (message.scheduledSnapshotsConfig != null && message.hasOwnProperty("scheduledSnapshotsConfig")) + object.scheduledSnapshotsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.toObject(message.scheduledSnapshotsConfig, options); + return object; + }; + + /** + * Converts this RecoveryConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig + * @instance + * @returns {Object.} JSON object + */ + RecoveryConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RecoveryConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RecoveryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig"; + }; + + return RecoveryConfig; + })(); + + v1beta1.ScheduledSnapshotsConfig = (function() { + + /** + * Properties of a ScheduledSnapshotsConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IScheduledSnapshotsConfig + * @property {boolean|null} [enabled] ScheduledSnapshotsConfig enabled + * @property {string|null} [snapshotLocation] ScheduledSnapshotsConfig snapshotLocation + * @property {string|null} [snapshotCreationSchedule] ScheduledSnapshotsConfig snapshotCreationSchedule + * @property {string|null} [timeZone] ScheduledSnapshotsConfig timeZone + */ + + /** + * Constructs a new ScheduledSnapshotsConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a ScheduledSnapshotsConfig. + * @implements IScheduledSnapshotsConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig=} [properties] Properties to set + */ + function ScheduledSnapshotsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ScheduledSnapshotsConfig enabled. + * @member {boolean} enabled + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig + * @instance + */ + ScheduledSnapshotsConfig.prototype.enabled = false; + + /** + * ScheduledSnapshotsConfig snapshotLocation. + * @member {string} snapshotLocation + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig + * @instance + */ + ScheduledSnapshotsConfig.prototype.snapshotLocation = ""; + + /** + * ScheduledSnapshotsConfig snapshotCreationSchedule. + * @member {string} snapshotCreationSchedule + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig + * @instance + */ + ScheduledSnapshotsConfig.prototype.snapshotCreationSchedule = ""; + + /** + * ScheduledSnapshotsConfig timeZone. + * @member {string} timeZone + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig + * @instance + */ + ScheduledSnapshotsConfig.prototype.timeZone = ""; + + /** + * Creates a new ScheduledSnapshotsConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig} ScheduledSnapshotsConfig instance + */ + ScheduledSnapshotsConfig.create = function create(properties) { + return new ScheduledSnapshotsConfig(properties); + }; + + /** + * Encodes the specified ScheduledSnapshotsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig} message ScheduledSnapshotsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScheduledSnapshotsConfig.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.snapshotCreationSchedule != null && Object.hasOwnProperty.call(message, "snapshotCreationSchedule")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.snapshotCreationSchedule); + if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.timeZone); + if (message.snapshotLocation != null && Object.hasOwnProperty.call(message, "snapshotLocation")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.snapshotLocation); + return writer; + }; + + /** + * Encodes the specified ScheduledSnapshotsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig} message ScheduledSnapshotsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ScheduledSnapshotsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ScheduledSnapshotsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig} ScheduledSnapshotsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScheduledSnapshotsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 6: { + message.snapshotLocation = reader.string(); + break; + } + case 3: { + message.snapshotCreationSchedule = reader.string(); + break; + } + case 5: { + message.timeZone = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ScheduledSnapshotsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig} ScheduledSnapshotsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ScheduledSnapshotsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ScheduledSnapshotsConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ScheduledSnapshotsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.snapshotLocation != null && message.hasOwnProperty("snapshotLocation")) + if (!$util.isString(message.snapshotLocation)) + return "snapshotLocation: string expected"; + if (message.snapshotCreationSchedule != null && message.hasOwnProperty("snapshotCreationSchedule")) + if (!$util.isString(message.snapshotCreationSchedule)) + return "snapshotCreationSchedule: string expected"; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + if (!$util.isString(message.timeZone)) + return "timeZone: string expected"; + return null; + }; + + /** + * Creates a ScheduledSnapshotsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig} ScheduledSnapshotsConfig + */ + ScheduledSnapshotsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.snapshotLocation != null) + message.snapshotLocation = String(object.snapshotLocation); + if (object.snapshotCreationSchedule != null) + message.snapshotCreationSchedule = String(object.snapshotCreationSchedule); + if (object.timeZone != null) + message.timeZone = String(object.timeZone); + return message; + }; + + /** + * Creates a plain object from a ScheduledSnapshotsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig} message ScheduledSnapshotsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ScheduledSnapshotsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.enabled = false; + object.snapshotCreationSchedule = ""; + object.timeZone = ""; + object.snapshotLocation = ""; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.snapshotCreationSchedule != null && message.hasOwnProperty("snapshotCreationSchedule")) + object.snapshotCreationSchedule = message.snapshotCreationSchedule; + if (message.timeZone != null && message.hasOwnProperty("timeZone")) + object.timeZone = message.timeZone; + if (message.snapshotLocation != null && message.hasOwnProperty("snapshotLocation")) + object.snapshotLocation = message.snapshotLocation; + return object; + }; + + /** + * Converts this ScheduledSnapshotsConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig + * @instance + * @returns {Object.} JSON object + */ + ScheduledSnapshotsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ScheduledSnapshotsConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ScheduledSnapshotsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig"; + }; + + return ScheduledSnapshotsConfig; + })(); + + v1beta1.MasterAuthorizedNetworksConfig = (function() { + + /** + * Properties of a MasterAuthorizedNetworksConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IMasterAuthorizedNetworksConfig + * @property {boolean|null} [enabled] MasterAuthorizedNetworksConfig enabled + * @property {Array.|null} [cidrBlocks] MasterAuthorizedNetworksConfig cidrBlocks + */ + + /** + * Constructs a new MasterAuthorizedNetworksConfig. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a MasterAuthorizedNetworksConfig. + * @implements IMasterAuthorizedNetworksConfig + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig=} [properties] Properties to set + */ + function MasterAuthorizedNetworksConfig(properties) { + this.cidrBlocks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MasterAuthorizedNetworksConfig enabled. + * @member {boolean} enabled + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig + * @instance + */ + MasterAuthorizedNetworksConfig.prototype.enabled = false; + + /** + * MasterAuthorizedNetworksConfig cidrBlocks. + * @member {Array.} cidrBlocks + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig + * @instance + */ + MasterAuthorizedNetworksConfig.prototype.cidrBlocks = $util.emptyArray; + + /** + * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig instance + */ + MasterAuthorizedNetworksConfig.create = function create(properties) { + return new MasterAuthorizedNetworksConfig(properties); + }; + + /** + * Encodes the specified MasterAuthorizedNetworksConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MasterAuthorizedNetworksConfig.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.cidrBlocks != null && message.cidrBlocks.length) + for (var i = 0; i < message.cidrBlocks.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.encode(message.cidrBlocks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MasterAuthorizedNetworksConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MasterAuthorizedNetworksConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MasterAuthorizedNetworksConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + if (!(message.cidrBlocks && message.cidrBlocks.length)) + message.cidrBlocks = []; + message.cidrBlocks.push($root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MasterAuthorizedNetworksConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MasterAuthorizedNetworksConfig message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MasterAuthorizedNetworksConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + if (message.cidrBlocks != null && message.hasOwnProperty("cidrBlocks")) { + if (!Array.isArray(message.cidrBlocks)) + return "cidrBlocks: array expected"; + for (var i = 0; i < message.cidrBlocks.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify(message.cidrBlocks[i]); + if (error) + return "cidrBlocks." + error; + } + } + return null; + }; + + /** + * Creates a MasterAuthorizedNetworksConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig + */ + MasterAuthorizedNetworksConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.cidrBlocks) { + if (!Array.isArray(object.cidrBlocks)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.cidrBlocks: array expected"); + message.cidrBlocks = []; + for (var i = 0; i < object.cidrBlocks.length; ++i) { + if (typeof object.cidrBlocks[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.cidrBlocks: object expected"); + message.cidrBlocks[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.fromObject(object.cidrBlocks[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MasterAuthorizedNetworksConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MasterAuthorizedNetworksConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.cidrBlocks = []; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + if (message.cidrBlocks && message.cidrBlocks.length) { + object.cidrBlocks = []; + for (var j = 0; j < message.cidrBlocks.length; ++j) + object.cidrBlocks[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.toObject(message.cidrBlocks[j], options); + } + return object; + }; + + /** + * Converts this MasterAuthorizedNetworksConfig to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig + * @instance + * @returns {Object.} JSON object + */ + MasterAuthorizedNetworksConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MasterAuthorizedNetworksConfig + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MasterAuthorizedNetworksConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig"; + }; + + MasterAuthorizedNetworksConfig.CidrBlock = (function() { + + /** + * Properties of a CidrBlock. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig + * @interface ICidrBlock + * @property {string|null} [displayName] CidrBlock displayName + * @property {string|null} [cidrBlock] CidrBlock cidrBlock + */ + + /** + * Constructs a new CidrBlock. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig + * @classdesc Represents a CidrBlock. + * @implements ICidrBlock + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock=} [properties] Properties to set + */ + function CidrBlock(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CidrBlock displayName. + * @member {string} displayName + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @instance + */ + CidrBlock.prototype.displayName = ""; + + /** + * CidrBlock cidrBlock. + * @member {string} cidrBlock + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @instance + */ + CidrBlock.prototype.cidrBlock = ""; + + /** + * Creates a new CidrBlock instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock instance + */ + CidrBlock.create = function create(properties) { + return new CidrBlock(properties); + }; + + /** + * Encodes the specified CidrBlock message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock} message CidrBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CidrBlock.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); + if (message.cidrBlock != null && Object.hasOwnProperty.call(message, "cidrBlock")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.cidrBlock); + return writer; + }; + + /** + * Encodes the specified CidrBlock message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock} message CidrBlock message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CidrBlock.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CidrBlock message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CidrBlock.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.displayName = reader.string(); + break; + } + case 2: { + message.cidrBlock = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CidrBlock message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CidrBlock.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CidrBlock message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CidrBlock.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.cidrBlock != null && message.hasOwnProperty("cidrBlock")) + if (!$util.isString(message.cidrBlock)) + return "cidrBlock: string expected"; + return null; + }; + + /** + * Creates a CidrBlock message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock + */ + CidrBlock.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock(); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.cidrBlock != null) + message.cidrBlock = String(object.cidrBlock); + return message; + }; + + /** + * Creates a plain object from a CidrBlock message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} message CidrBlock + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CidrBlock.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.displayName = ""; + object.cidrBlock = ""; + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.cidrBlock != null && message.hasOwnProperty("cidrBlock")) + object.cidrBlock = message.cidrBlock; + return object; + }; + + /** + * Converts this CidrBlock to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @instance + * @returns {Object.} JSON object + */ + CidrBlock.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CidrBlock + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CidrBlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock"; + }; + + return CidrBlock; + })(); + + return MasterAuthorizedNetworksConfig; + })(); + + v1beta1.CloudDataLineageIntegration = (function() { + + /** + * Properties of a CloudDataLineageIntegration. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface ICloudDataLineageIntegration + * @property {boolean|null} [enabled] CloudDataLineageIntegration enabled + */ + + /** + * Constructs a new CloudDataLineageIntegration. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a CloudDataLineageIntegration. + * @implements ICloudDataLineageIntegration + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration=} [properties] Properties to set + */ + function CloudDataLineageIntegration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CloudDataLineageIntegration enabled. + * @member {boolean} enabled + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration + * @instance + */ + CloudDataLineageIntegration.prototype.enabled = false; + + /** + * Creates a new CloudDataLineageIntegration instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration} CloudDataLineageIntegration instance + */ + CloudDataLineageIntegration.create = function create(properties) { + return new CloudDataLineageIntegration(properties); + }; + + /** + * Encodes the specified CloudDataLineageIntegration message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration} message CloudDataLineageIntegration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudDataLineageIntegration.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); + return writer; + }; + + /** + * Encodes the specified CloudDataLineageIntegration message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration} message CloudDataLineageIntegration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CloudDataLineageIntegration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CloudDataLineageIntegration message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration} CloudDataLineageIntegration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudDataLineageIntegration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CloudDataLineageIntegration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration} CloudDataLineageIntegration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CloudDataLineageIntegration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CloudDataLineageIntegration message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CloudDataLineageIntegration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a CloudDataLineageIntegration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration} CloudDataLineageIntegration + */ + CloudDataLineageIntegration.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a CloudDataLineageIntegration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration} message CloudDataLineageIntegration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CloudDataLineageIntegration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this CloudDataLineageIntegration to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration + * @instance + * @returns {Object.} JSON object + */ + CloudDataLineageIntegration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CloudDataLineageIntegration + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CloudDataLineageIntegration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration"; + }; + + return CloudDataLineageIntegration; + })(); + + v1beta1.Environment = (function() { + + /** + * Properties of an Environment. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IEnvironment + * @property {string|null} [name] Environment name + * @property {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig|null} [config] Environment config + * @property {string|null} [uuid] Environment uuid + * @property {google.cloud.orchestration.airflow.service.v1beta1.Environment.State|null} [state] Environment state + * @property {google.protobuf.ITimestamp|null} [createTime] Environment createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime + * @property {Object.|null} [labels] Environment labels + * @property {boolean|null} [satisfiesPzs] Environment satisfiesPzs + * @property {boolean|null} [satisfiesPzi] Environment satisfiesPzi + * @property {google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig|null} [storageConfig] Environment storageConfig + */ + + /** + * Constructs a new Environment. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an Environment. + * @implements IEnvironment + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment=} [properties] Properties to set + */ + function Environment(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]]; + } + + /** + * Environment name. + * @member {string} name + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.name = ""; + + /** + * Environment config. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig|null|undefined} config + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.config = null; + + /** + * Environment uuid. + * @member {string} uuid + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.uuid = ""; + + /** + * Environment state. + * @member {google.cloud.orchestration.airflow.service.v1beta1.Environment.State} state + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.state = 0; + + /** + * Environment createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.createTime = null; + + /** + * Environment updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.updateTime = null; + + /** + * Environment labels. + * @member {Object.} labels + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.labels = $util.emptyObject; + + /** + * Environment satisfiesPzs. + * @member {boolean} satisfiesPzs + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.satisfiesPzs = false; + + /** + * Environment satisfiesPzi. + * @member {boolean} satisfiesPzi + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.satisfiesPzi = false; + + /** + * Environment storageConfig. + * @member {google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig|null|undefined} storageConfig + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.storageConfig = null; + + /** + * Creates a new Environment instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.Environment} Environment instance + */ + Environment.create = function create(properties) { + return new Environment(properties); + }; + + /** + * Encodes the specified Environment message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.Environment.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment} message Environment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Environment.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.config != null && Object.hasOwnProperty.call(message, "config")) + $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.uuid); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.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.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.satisfiesPzs); + if (message.storageConfig != null && Object.hasOwnProperty.call(message, "storageConfig")) + $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.encode(message.storageConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.satisfiesPzi); + return writer; + }; + + /** + * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.Environment.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment} message Environment message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Environment.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Environment message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.Environment} Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Environment.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.Environment(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.config = $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.uuid = reader.string(); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.updateTime = $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; + } + case 8: { + message.satisfiesPzs = reader.bool(); + break; + } + case 10: { + message.satisfiesPzi = reader.bool(); + break; + } + case 9: { + message.storageConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Environment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.Environment} Environment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Environment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Environment message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Environment.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.config != null && message.hasOwnProperty("config")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.verify(message.config); + if (error) + return "config." + error; + } + if (message.uuid != null && message.hasOwnProperty("uuid")) + if (!$util.isString(message.uuid)) + return "uuid: 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.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + if (message.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.storageConfig != null && message.hasOwnProperty("storageConfig")) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.verify(message.storageConfig); + if (error) + return "storageConfig." + error; + } + return null; + }; + + /** + * Creates an Environment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.Environment} Environment + */ + Environment.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.Environment) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.Environment(); + if (object.name != null) + message.name = String(object.name); + if (object.config != null) { + if (typeof object.config !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.Environment.config: object expected"); + message.config = $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.fromObject(object.config); + } + if (object.uuid != null) + message.uuid = String(object.uuid); + 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 "RUNNING": + case 2: + message.state = 2; + break; + case "UPDATING": + case 3: + message.state = 3; + break; + case "DELETING": + case 4: + message.state = 4; + break; + case "ERROR": + case 5: + message.state = 5; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.Environment.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.Environment.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.Environment.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.satisfiesPzs != null) + message.satisfiesPzs = Boolean(object.satisfiesPzs); + if (object.satisfiesPzi != null) + message.satisfiesPzi = Boolean(object.satisfiesPzi); + if (object.storageConfig != null) { + if (typeof object.storageConfig !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.Environment.storageConfig: object expected"); + message.storageConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.fromObject(object.storageConfig); + } + return message; + }; + + /** + * Creates a plain object from an Environment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environment} message Environment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Environment.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) { + object.name = ""; + object.config = null; + object.uuid = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.updateTime = null; + object.satisfiesPzs = false; + object.storageConfig = null; + object.satisfiesPzi = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.config != null && message.hasOwnProperty("config")) + object.config = $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.toObject(message.config, options); + if (message.uuid != null && message.hasOwnProperty("uuid")) + object.uuid = message.uuid; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.State[message.state] === undefined ? message.state : $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.State[message.state] : message.state; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + 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.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) + object.satisfiesPzs = message.satisfiesPzs; + if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) + object.storageConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.toObject(message.storageConfig, options); + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + object.satisfiesPzi = message.satisfiesPzi; + return object; + }; + + /** + * Converts this Environment to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + * @returns {Object.} JSON object + */ + Environment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Environment + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Environment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.Environment"; + }; + + /** + * State enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.Environment.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} CREATING=1 CREATING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} UPDATING=3 UPDATING value + * @property {number} DELETING=4 DELETING value + * @property {number} ERROR=5 ERROR value + */ + Environment.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "UPDATING"] = 3; + values[valuesById[4] = "DELETING"] = 4; + values[valuesById[5] = "ERROR"] = 5; + return values; + })(); + + return Environment; + })(); + + v1beta1.CheckUpgradeRequest = (function() { + + /** + * Properties of a CheckUpgradeRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface ICheckUpgradeRequest + * @property {string|null} [environment] CheckUpgradeRequest environment + * @property {string|null} [imageVersion] CheckUpgradeRequest imageVersion + */ + + /** + * Constructs a new CheckUpgradeRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a CheckUpgradeRequest. + * @implements ICheckUpgradeRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest=} [properties] Properties to set + */ + function CheckUpgradeRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckUpgradeRequest environment. + * @member {string} environment + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @instance + */ + CheckUpgradeRequest.prototype.environment = ""; + + /** + * CheckUpgradeRequest imageVersion. + * @member {string} imageVersion + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @instance + */ + CheckUpgradeRequest.prototype.imageVersion = ""; + + /** + * Creates a new CheckUpgradeRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} CheckUpgradeRequest instance + */ + CheckUpgradeRequest.create = function create(properties) { + return new CheckUpgradeRequest(properties); + }; + + /** + * Encodes the specified CheckUpgradeRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest} message CheckUpgradeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckUpgradeRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); + if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageVersion); + return writer; + }; + + /** + * Encodes the specified CheckUpgradeRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest} message CheckUpgradeRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckUpgradeRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckUpgradeRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} CheckUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckUpgradeRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.environment = reader.string(); + break; + } + case 2: { + message.imageVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckUpgradeRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} CheckUpgradeRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckUpgradeRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckUpgradeRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckUpgradeRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.environment != null && message.hasOwnProperty("environment")) + if (!$util.isString(message.environment)) + return "environment: string expected"; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + if (!$util.isString(message.imageVersion)) + return "imageVersion: string expected"; + return null; + }; + + /** + * Creates a CheckUpgradeRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} CheckUpgradeRequest + */ + CheckUpgradeRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest(); + if (object.environment != null) + message.environment = String(object.environment); + if (object.imageVersion != null) + message.imageVersion = String(object.imageVersion); + return message; + }; + + /** + * Creates a plain object from a CheckUpgradeRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} message CheckUpgradeRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckUpgradeRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.environment = ""; + object.imageVersion = ""; + } + if (message.environment != null && message.hasOwnProperty("environment")) + object.environment = message.environment; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + object.imageVersion = message.imageVersion; + return object; + }; + + /** + * Converts this CheckUpgradeRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @instance + * @returns {Object.} JSON object + */ + CheckUpgradeRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckUpgradeRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckUpgradeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest"; + }; + + return CheckUpgradeRequest; + })(); + + v1beta1.CheckUpgradeResponse = (function() { + + /** + * Properties of a CheckUpgradeResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface ICheckUpgradeResponse + * @property {string|null} [buildLogUri] CheckUpgradeResponse buildLogUri + * @property {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult|null} [containsPypiModulesConflict] CheckUpgradeResponse containsPypiModulesConflict + * @property {string|null} [pypiConflictBuildLogExtract] CheckUpgradeResponse pypiConflictBuildLogExtract + * @property {string|null} [imageVersion] CheckUpgradeResponse imageVersion + * @property {Object.|null} [pypiDependencies] CheckUpgradeResponse pypiDependencies + */ + + /** + * Constructs a new CheckUpgradeResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a CheckUpgradeResponse. + * @implements ICheckUpgradeResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse=} [properties] Properties to set + */ + function CheckUpgradeResponse(properties) { + this.pypiDependencies = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CheckUpgradeResponse buildLogUri. + * @member {string} buildLogUri + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.buildLogUri = ""; + + /** + * CheckUpgradeResponse containsPypiModulesConflict. + * @member {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult} containsPypiModulesConflict + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.containsPypiModulesConflict = 0; + + /** + * CheckUpgradeResponse pypiConflictBuildLogExtract. + * @member {string} pypiConflictBuildLogExtract + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.pypiConflictBuildLogExtract = ""; + + /** + * CheckUpgradeResponse imageVersion. + * @member {string} imageVersion + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.imageVersion = ""; + + /** + * CheckUpgradeResponse pypiDependencies. + * @member {Object.} pypiDependencies + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @instance + */ + CheckUpgradeResponse.prototype.pypiDependencies = $util.emptyObject; + + /** + * Creates a new CheckUpgradeResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} CheckUpgradeResponse instance + */ + CheckUpgradeResponse.create = function create(properties) { + return new CheckUpgradeResponse(properties); + }; + + /** + * Encodes the specified CheckUpgradeResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse} message CheckUpgradeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckUpgradeResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.buildLogUri != null && Object.hasOwnProperty.call(message, "buildLogUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.buildLogUri); + if (message.pypiConflictBuildLogExtract != null && Object.hasOwnProperty.call(message, "pypiConflictBuildLogExtract")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pypiConflictBuildLogExtract); + if (message.containsPypiModulesConflict != null && Object.hasOwnProperty.call(message, "containsPypiModulesConflict")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.containsPypiModulesConflict); + if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.imageVersion); + if (message.pypiDependencies != null && Object.hasOwnProperty.call(message, "pypiDependencies")) + for (var keys = Object.keys(message.pypiDependencies), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.pypiDependencies[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified CheckUpgradeResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse} message CheckUpgradeResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CheckUpgradeResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CheckUpgradeResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} CheckUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckUpgradeResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.buildLogUri = reader.string(); + break; + } + case 4: { + message.containsPypiModulesConflict = reader.int32(); + break; + } + case 3: { + message.pypiConflictBuildLogExtract = reader.string(); + break; + } + case 5: { + message.imageVersion = reader.string(); + break; + } + case 6: { + if (message.pypiDependencies === $util.emptyObject) + message.pypiDependencies = {}; + 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.pypiDependencies[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CheckUpgradeResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} CheckUpgradeResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CheckUpgradeResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CheckUpgradeResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CheckUpgradeResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.buildLogUri != null && message.hasOwnProperty("buildLogUri")) + if (!$util.isString(message.buildLogUri)) + return "buildLogUri: string expected"; + if (message.containsPypiModulesConflict != null && message.hasOwnProperty("containsPypiModulesConflict")) + switch (message.containsPypiModulesConflict) { + default: + return "containsPypiModulesConflict: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.pypiConflictBuildLogExtract != null && message.hasOwnProperty("pypiConflictBuildLogExtract")) + if (!$util.isString(message.pypiConflictBuildLogExtract)) + return "pypiConflictBuildLogExtract: string expected"; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + if (!$util.isString(message.imageVersion)) + return "imageVersion: string expected"; + if (message.pypiDependencies != null && message.hasOwnProperty("pypiDependencies")) { + if (!$util.isObject(message.pypiDependencies)) + return "pypiDependencies: object expected"; + var key = Object.keys(message.pypiDependencies); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.pypiDependencies[key[i]])) + return "pypiDependencies: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a CheckUpgradeResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} CheckUpgradeResponse + */ + CheckUpgradeResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse(); + if (object.buildLogUri != null) + message.buildLogUri = String(object.buildLogUri); + switch (object.containsPypiModulesConflict) { + default: + if (typeof object.containsPypiModulesConflict === "number") { + message.containsPypiModulesConflict = object.containsPypiModulesConflict; + break; + } + break; + case "CONFLICT_RESULT_UNSPECIFIED": + case 0: + message.containsPypiModulesConflict = 0; + break; + case "CONFLICT": + case 1: + message.containsPypiModulesConflict = 1; + break; + case "NO_CONFLICT": + case 2: + message.containsPypiModulesConflict = 2; + break; + } + if (object.pypiConflictBuildLogExtract != null) + message.pypiConflictBuildLogExtract = String(object.pypiConflictBuildLogExtract); + if (object.imageVersion != null) + message.imageVersion = String(object.imageVersion); + if (object.pypiDependencies) { + if (typeof object.pypiDependencies !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.pypiDependencies: object expected"); + message.pypiDependencies = {}; + for (var keys = Object.keys(object.pypiDependencies), i = 0; i < keys.length; ++i) + message.pypiDependencies[keys[i]] = String(object.pypiDependencies[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a CheckUpgradeResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} message CheckUpgradeResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CheckUpgradeResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.pypiDependencies = {}; + if (options.defaults) { + object.buildLogUri = ""; + object.pypiConflictBuildLogExtract = ""; + object.containsPypiModulesConflict = options.enums === String ? "CONFLICT_RESULT_UNSPECIFIED" : 0; + object.imageVersion = ""; + } + if (message.buildLogUri != null && message.hasOwnProperty("buildLogUri")) + object.buildLogUri = message.buildLogUri; + if (message.pypiConflictBuildLogExtract != null && message.hasOwnProperty("pypiConflictBuildLogExtract")) + object.pypiConflictBuildLogExtract = message.pypiConflictBuildLogExtract; + if (message.containsPypiModulesConflict != null && message.hasOwnProperty("containsPypiModulesConflict")) + object.containsPypiModulesConflict = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult[message.containsPypiModulesConflict] === undefined ? message.containsPypiModulesConflict : $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult[message.containsPypiModulesConflict] : message.containsPypiModulesConflict; + if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) + object.imageVersion = message.imageVersion; + var keys2; + if (message.pypiDependencies && (keys2 = Object.keys(message.pypiDependencies)).length) { + object.pypiDependencies = {}; + for (var j = 0; j < keys2.length; ++j) + object.pypiDependencies[keys2[j]] = message.pypiDependencies[keys2[j]]; + } + return object; + }; + + /** + * Converts this CheckUpgradeResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @instance + * @returns {Object.} JSON object + */ + CheckUpgradeResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CheckUpgradeResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CheckUpgradeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse"; + }; + + /** + * ConflictResult enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult + * @enum {number} + * @property {number} CONFLICT_RESULT_UNSPECIFIED=0 CONFLICT_RESULT_UNSPECIFIED value + * @property {number} CONFLICT=1 CONFLICT value + * @property {number} NO_CONFLICT=2 NO_CONFLICT value + */ + CheckUpgradeResponse.ConflictResult = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CONFLICT_RESULT_UNSPECIFIED"] = 0; + values[valuesById[1] = "CONFLICT"] = 1; + values[valuesById[2] = "NO_CONFLICT"] = 2; + return values; + })(); + + return CheckUpgradeResponse; + })(); + + v1beta1.OperationMetadata = (function() { + + /** + * Properties of an OperationMetadata. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IOperationMetadata + * @property {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State|null} [state] OperationMetadata state + * @property {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type|null} [operationType] OperationMetadata operationType + * @property {string|null} [resource] OperationMetadata resource + * @property {string|null} [resourceUuid] OperationMetadata resourceUuid + * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime + */ + + /** + * Constructs a new OperationMetadata. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an OperationMetadata. + * @implements IOperationMetadata + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.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 state. + * @member {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State} state + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.state = 0; + + /** + * OperationMetadata operationType. + * @member {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type} operationType + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.operationType = 0; + + /** + * OperationMetadata resource. + * @member {string} resource + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.resource = ""; + + /** + * OperationMetadata resourceUuid. + * @member {string} resourceUuid + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.resourceUuid = ""; + + /** + * OperationMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.createTime = null; + + /** + * OperationMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @instance + */ + OperationMetadata.prototype.endTime = null; + + /** + * Creates a new OperationMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata} OperationMetadata instance + */ + OperationMetadata.create = function create(properties) { + return new OperationMetadata(properties); + }; + + /** + * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.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.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); + if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operationType); + if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); + if (message.resourceUuid != null && Object.hasOwnProperty.call(message, "resourceUuid")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceUuid); + 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.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.state = reader.int32(); + break; + } + case 2: { + message.operationType = reader.int32(); + break; + } + case 3: { + message.resource = reader.string(); + break; + } + case 4: { + message.resourceUuid = reader.string(); + break; + } + case 5: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 6: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + 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.orchestration.airflow.service.v1beta1.OperationMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.operationType != null && message.hasOwnProperty("operationType")) + switch (message.operationType) { + default: + return "operationType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.resource != null && message.hasOwnProperty("resource")) + if (!$util.isString(message.resource)) + return "resource: string expected"; + if (message.resourceUuid != null && message.hasOwnProperty("resourceUuid")) + if (!$util.isString(message.resourceUuid)) + return "resourceUuid: 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.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + return null; + }; + + /** + * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata} OperationMetadata + */ + OperationMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata(); + 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 "PENDING": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "SUCCESSFUL": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + } + switch (object.operationType) { + default: + if (typeof object.operationType === "number") { + message.operationType = object.operationType; + break; + } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.operationType = 0; + break; + case "CREATE": + case 1: + message.operationType = 1; + break; + case "DELETE": + case 2: + message.operationType = 2; + break; + case "UPDATE": + case 3: + message.operationType = 3; + break; + case "CHECK": + case 4: + message.operationType = 4; + break; + case "SAVE_SNAPSHOT": + case 5: + message.operationType = 5; + break; + case "LOAD_SNAPSHOT": + case 6: + message.operationType = 6; + break; + case "DATABASE_FAILOVER": + case 7: + message.operationType = 7; + break; + } + if (object.resource != null) + message.resource = String(object.resource); + if (object.resourceUuid != null) + message.resourceUuid = String(object.resourceUuid); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.OperationMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.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.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.operationType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.resource = ""; + object.resourceUuid = ""; + object.createTime = null; + object.endTime = null; + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State[message.state] : message.state; + if (message.operationType != null && message.hasOwnProperty("operationType")) + object.operationType = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type[message.operationType] === undefined ? message.operationType : $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type[message.operationType] : message.operationType; + if (message.resource != null && message.hasOwnProperty("resource")) + object.resource = message.resource; + if (message.resourceUuid != null && message.hasOwnProperty("resourceUuid")) + object.resourceUuid = message.resourceUuid; + 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); + return object; + }; + + /** + * Converts this OperationMetadata to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.OperationMetadata"; + }; + + /** + * State enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} RUNNING=2 RUNNING value + * @property {number} SUCCESSFUL=3 SUCCESSFUL value + * @property {number} FAILED=4 FAILED value + */ + OperationMetadata.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "SUCCESSFUL"] = 3; + values[valuesById[4] = "FAILED"] = 4; + return values; + })(); + + /** + * Type enum. + * @name google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} CREATE=1 CREATE value + * @property {number} DELETE=2 DELETE value + * @property {number} UPDATE=3 UPDATE value + * @property {number} CHECK=4 CHECK value + * @property {number} SAVE_SNAPSHOT=5 SAVE_SNAPSHOT value + * @property {number} LOAD_SNAPSHOT=6 LOAD_SNAPSHOT value + * @property {number} DATABASE_FAILOVER=7 DATABASE_FAILOVER value + */ + OperationMetadata.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "CREATE"] = 1; + values[valuesById[2] = "DELETE"] = 2; + values[valuesById[3] = "UPDATE"] = 3; + values[valuesById[4] = "CHECK"] = 4; + values[valuesById[5] = "SAVE_SNAPSHOT"] = 5; + values[valuesById[6] = "LOAD_SNAPSHOT"] = 6; + values[valuesById[7] = "DATABASE_FAILOVER"] = 7; + return values; + })(); + + return OperationMetadata; + })(); + + v1beta1.ImageVersions = (function() { + + /** + * Constructs a new ImageVersions service. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an ImageVersions + * @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 ImageVersions(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ImageVersions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ImageVersions; + + /** + * Creates new ImageVersions service using the specified rpc implementation. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersions + * @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 {ImageVersions} RPC service. Useful where requests and/or responses are streamed. + */ + ImageVersions.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersions|listImageVersions}. + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersions + * @typedef ListImageVersionsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} [response] ListImageVersionsResponse + */ + + /** + * Calls ListImageVersions. + * @function listImageVersions + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersions + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest} request ListImageVersionsRequest message or plain object + * @param {google.cloud.orchestration.airflow.service.v1beta1.ImageVersions.ListImageVersionsCallback} callback Node-style callback called with the error, if any, and ListImageVersionsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ImageVersions.prototype.listImageVersions = function listImageVersions(request, callback) { + return this.rpcCall(listImageVersions, $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse, request, callback); + }, "name", { value: "ListImageVersions" }); + + /** + * Calls ListImageVersions. + * @function listImageVersions + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersions + * @instance + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest} request ListImageVersionsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ImageVersions; + })(); + + v1beta1.ListImageVersionsRequest = (function() { + + /** + * Properties of a ListImageVersionsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IListImageVersionsRequest + * @property {string|null} [parent] ListImageVersionsRequest parent + * @property {number|null} [pageSize] ListImageVersionsRequest pageSize + * @property {string|null} [pageToken] ListImageVersionsRequest pageToken + * @property {boolean|null} [includePastReleases] ListImageVersionsRequest includePastReleases + */ + + /** + * Constructs a new ListImageVersionsRequest. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a ListImageVersionsRequest. + * @implements IListImageVersionsRequest + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest=} [properties] Properties to set + */ + function ListImageVersionsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListImageVersionsRequest parent. + * @member {string} parent + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @instance + */ + ListImageVersionsRequest.prototype.parent = ""; + + /** + * ListImageVersionsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @instance + */ + ListImageVersionsRequest.prototype.pageSize = 0; + + /** + * ListImageVersionsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @instance + */ + ListImageVersionsRequest.prototype.pageToken = ""; + + /** + * ListImageVersionsRequest includePastReleases. + * @member {boolean} includePastReleases + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @instance + */ + ListImageVersionsRequest.prototype.includePastReleases = false; + + /** + * Creates a new ListImageVersionsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} ListImageVersionsRequest instance + */ + ListImageVersionsRequest.create = function create(properties) { + return new ListImageVersionsRequest(properties); + }; + + /** + * Encodes the specified ListImageVersionsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest} message ListImageVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImageVersionsRequest.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.includePastReleases != null && Object.hasOwnProperty.call(message, "includePastReleases")) + writer.uint32(/* id 4, wireType 0 =*/32).bool(message.includePastReleases); + return writer; + }; + + /** + * Encodes the specified ListImageVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest} message ListImageVersionsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImageVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListImageVersionsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} ListImageVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImageVersionsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + 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.includePastReleases = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListImageVersionsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} ListImageVersionsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImageVersionsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListImageVersionsRequest message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListImageVersionsRequest.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.includePastReleases != null && message.hasOwnProperty("includePastReleases")) + if (typeof message.includePastReleases !== "boolean") + return "includePastReleases: boolean expected"; + return null; + }; + + /** + * Creates a ListImageVersionsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} ListImageVersionsRequest + */ + ListImageVersionsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest(); + 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.includePastReleases != null) + message.includePastReleases = Boolean(object.includePastReleases); + return message; + }; + + /** + * Creates a plain object from a ListImageVersionsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} message ListImageVersionsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListImageVersionsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.includePastReleases = false; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.includePastReleases != null && message.hasOwnProperty("includePastReleases")) + object.includePastReleases = message.includePastReleases; + return object; + }; + + /** + * Converts this ListImageVersionsRequest to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @instance + * @returns {Object.} JSON object + */ + ListImageVersionsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListImageVersionsRequest + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListImageVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest"; + }; + + return ListImageVersionsRequest; + })(); + + v1beta1.ListImageVersionsResponse = (function() { + + /** + * Properties of a ListImageVersionsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IListImageVersionsResponse + * @property {Array.|null} [imageVersions] ListImageVersionsResponse imageVersions + * @property {string|null} [nextPageToken] ListImageVersionsResponse nextPageToken + */ + + /** + * Constructs a new ListImageVersionsResponse. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents a ListImageVersionsResponse. + * @implements IListImageVersionsResponse + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse=} [properties] Properties to set + */ + function ListImageVersionsResponse(properties) { + this.imageVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListImageVersionsResponse imageVersions. + * @member {Array.} imageVersions + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @instance + */ + ListImageVersionsResponse.prototype.imageVersions = $util.emptyArray; + + /** + * ListImageVersionsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @instance + */ + ListImageVersionsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListImageVersionsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} ListImageVersionsResponse instance + */ + ListImageVersionsResponse.create = function create(properties) { + return new ListImageVersionsResponse(properties); + }; + + /** + * Encodes the specified ListImageVersionsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse} message ListImageVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImageVersionsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageVersions != null && message.imageVersions.length) + for (var i = 0; i < message.imageVersions.length; ++i) + $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.encode(message.imageVersions[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 ListImageVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse} message ListImageVersionsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListImageVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListImageVersionsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} ListImageVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImageVersionsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.imageVersions && message.imageVersions.length)) + message.imageVersions = []; + message.imageVersions.push($root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListImageVersionsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} ListImageVersionsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListImageVersionsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListImageVersionsResponse message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListImageVersionsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageVersions != null && message.hasOwnProperty("imageVersions")) { + if (!Array.isArray(message.imageVersions)) + return "imageVersions: array expected"; + for (var i = 0; i < message.imageVersions.length; ++i) { + var error = $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.verify(message.imageVersions[i]); + if (error) + return "imageVersions." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListImageVersionsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} ListImageVersionsResponse + */ + ListImageVersionsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse(); + if (object.imageVersions) { + if (!Array.isArray(object.imageVersions)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.imageVersions: array expected"); + message.imageVersions = []; + for (var i = 0; i < object.imageVersions.length; ++i) { + if (typeof object.imageVersions[i] !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.imageVersions: object expected"); + message.imageVersions[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.fromObject(object.imageVersions[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListImageVersionsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} message ListImageVersionsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListImageVersionsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.imageVersions = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.imageVersions && message.imageVersions.length) { + object.imageVersions = []; + for (var j = 0; j < message.imageVersions.length; ++j) + object.imageVersions[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.toObject(message.imageVersions[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListImageVersionsResponse to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @instance + * @returns {Object.} JSON object + */ + ListImageVersionsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListImageVersionsResponse + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListImageVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse"; + }; + + return ListImageVersionsResponse; + })(); + + v1beta1.ImageVersion = (function() { + + /** + * Properties of an ImageVersion. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @interface IImageVersion + * @property {string|null} [imageVersionId] ImageVersion imageVersionId + * @property {boolean|null} [isDefault] ImageVersion isDefault + * @property {Array.|null} [supportedPythonVersions] ImageVersion supportedPythonVersions + * @property {google.type.IDate|null} [releaseDate] ImageVersion releaseDate + * @property {boolean|null} [creationDisabled] ImageVersion creationDisabled + * @property {boolean|null} [upgradeDisabled] ImageVersion upgradeDisabled + */ + + /** + * Constructs a new ImageVersion. + * @memberof google.cloud.orchestration.airflow.service.v1beta1 + * @classdesc Represents an ImageVersion. + * @implements IImageVersion + * @constructor + * @param {google.cloud.orchestration.airflow.service.v1beta1.IImageVersion=} [properties] Properties to set + */ + function ImageVersion(properties) { + this.supportedPythonVersions = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ImageVersion imageVersionId. + * @member {string} imageVersionId + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @instance + */ + ImageVersion.prototype.imageVersionId = ""; + + /** + * ImageVersion isDefault. + * @member {boolean} isDefault + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @instance + */ + ImageVersion.prototype.isDefault = false; + + /** + * ImageVersion supportedPythonVersions. + * @member {Array.} supportedPythonVersions + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @instance + */ + ImageVersion.prototype.supportedPythonVersions = $util.emptyArray; + + /** + * ImageVersion releaseDate. + * @member {google.type.IDate|null|undefined} releaseDate + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @instance + */ + ImageVersion.prototype.releaseDate = null; + + /** + * ImageVersion creationDisabled. + * @member {boolean} creationDisabled + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @instance + */ + ImageVersion.prototype.creationDisabled = false; + + /** + * ImageVersion upgradeDisabled. + * @member {boolean} upgradeDisabled + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @instance + */ + ImageVersion.prototype.upgradeDisabled = false; + + /** + * Creates a new ImageVersion instance using the specified properties. + * @function create + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IImageVersion=} [properties] Properties to set + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} ImageVersion instance + */ + ImageVersion.create = function create(properties) { + return new ImageVersion(properties); + }; + + /** + * Encodes the specified ImageVersion message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.verify|verify} messages. + * @function encode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IImageVersion} message ImageVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageVersion.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.imageVersionId != null && Object.hasOwnProperty.call(message, "imageVersionId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageVersionId); + if (message.isDefault != null && Object.hasOwnProperty.call(message, "isDefault")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDefault); + if (message.supportedPythonVersions != null && message.supportedPythonVersions.length) + for (var i = 0; i < message.supportedPythonVersions.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.supportedPythonVersions[i]); + if (message.releaseDate != null && Object.hasOwnProperty.call(message, "releaseDate")) + $root.google.type.Date.encode(message.releaseDate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.creationDisabled != null && Object.hasOwnProperty.call(message, "creationDisabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.creationDisabled); + if (message.upgradeDisabled != null && Object.hasOwnProperty.call(message, "upgradeDisabled")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.upgradeDisabled); + return writer; + }; + + /** + * Encodes the specified ImageVersion message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.IImageVersion} message ImageVersion message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ImageVersion.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ImageVersion message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} ImageVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageVersion.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.imageVersionId = reader.string(); + break; + } + case 2: { + message.isDefault = reader.bool(); + break; + } + case 3: { + if (!(message.supportedPythonVersions && message.supportedPythonVersions.length)) + message.supportedPythonVersions = []; + message.supportedPythonVersions.push(reader.string()); + break; + } + case 4: { + message.releaseDate = $root.google.type.Date.decode(reader, reader.uint32()); + break; + } + case 5: { + message.creationDisabled = reader.bool(); + break; + } + case 6: { + message.upgradeDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ImageVersion message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} ImageVersion + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ImageVersion.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ImageVersion message. + * @function verify + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ImageVersion.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.imageVersionId != null && message.hasOwnProperty("imageVersionId")) + if (!$util.isString(message.imageVersionId)) + return "imageVersionId: string expected"; + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + if (typeof message.isDefault !== "boolean") + return "isDefault: boolean expected"; + if (message.supportedPythonVersions != null && message.hasOwnProperty("supportedPythonVersions")) { + if (!Array.isArray(message.supportedPythonVersions)) + return "supportedPythonVersions: array expected"; + for (var i = 0; i < message.supportedPythonVersions.length; ++i) + if (!$util.isString(message.supportedPythonVersions[i])) + return "supportedPythonVersions: string[] expected"; + } + if (message.releaseDate != null && message.hasOwnProperty("releaseDate")) { + var error = $root.google.type.Date.verify(message.releaseDate); + if (error) + return "releaseDate." + error; + } + if (message.creationDisabled != null && message.hasOwnProperty("creationDisabled")) + if (typeof message.creationDisabled !== "boolean") + return "creationDisabled: boolean expected"; + if (message.upgradeDisabled != null && message.hasOwnProperty("upgradeDisabled")) + if (typeof message.upgradeDisabled !== "boolean") + return "upgradeDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ImageVersion message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} ImageVersion + */ + ImageVersion.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion) + return object; + var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion(); + if (object.imageVersionId != null) + message.imageVersionId = String(object.imageVersionId); + if (object.isDefault != null) + message.isDefault = Boolean(object.isDefault); + if (object.supportedPythonVersions) { + if (!Array.isArray(object.supportedPythonVersions)) + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.supportedPythonVersions: array expected"); + message.supportedPythonVersions = []; + for (var i = 0; i < object.supportedPythonVersions.length; ++i) + message.supportedPythonVersions[i] = String(object.supportedPythonVersions[i]); + } + if (object.releaseDate != null) { + if (typeof object.releaseDate !== "object") + throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.releaseDate: object expected"); + message.releaseDate = $root.google.type.Date.fromObject(object.releaseDate); + } + if (object.creationDisabled != null) + message.creationDisabled = Boolean(object.creationDisabled); + if (object.upgradeDisabled != null) + message.upgradeDisabled = Boolean(object.upgradeDisabled); + return message; + }; + + /** + * Creates a plain object from an ImageVersion message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} message ImageVersion + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImageVersion.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.supportedPythonVersions = []; + if (options.defaults) { + object.imageVersionId = ""; + object.isDefault = false; + object.releaseDate = null; + object.creationDisabled = false; + object.upgradeDisabled = false; + } + if (message.imageVersionId != null && message.hasOwnProperty("imageVersionId")) + object.imageVersionId = message.imageVersionId; + if (message.isDefault != null && message.hasOwnProperty("isDefault")) + object.isDefault = message.isDefault; + if (message.supportedPythonVersions && message.supportedPythonVersions.length) { + object.supportedPythonVersions = []; + for (var j = 0; j < message.supportedPythonVersions.length; ++j) + object.supportedPythonVersions[j] = message.supportedPythonVersions[j]; + } + if (message.releaseDate != null && message.hasOwnProperty("releaseDate")) + object.releaseDate = $root.google.type.Date.toObject(message.releaseDate, options); + if (message.creationDisabled != null && message.hasOwnProperty("creationDisabled")) + object.creationDisabled = message.creationDisabled; + if (message.upgradeDisabled != null && message.hasOwnProperty("upgradeDisabled")) + object.upgradeDisabled = message.upgradeDisabled; + return object; + }; + + /** + * Converts this ImageVersion to JSON. + * @function toJSON + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @instance + * @returns {Object.} JSON object + */ + ImageVersion.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImageVersion + * @function getTypeUrl + * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImageVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ImageVersion"; + }; + + return ImageVersion; + })(); + + return v1beta1; + })(); + + return service; + })(); + + return airflow; + })(); + + return orchestration; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @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) { + 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(); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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; + })(); + + /** + * 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) { + 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(); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a 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; + })(); + + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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 + */ + + /** + * 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; + + /** + * 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(); + 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) { + 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(); + 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; + } + 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; + } + 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"]); + } + 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; + } + 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); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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.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) { + 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(); + 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.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) { + 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(); + 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.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) { + 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(); + 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) { + 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(); + 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; + })(); + + 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) { + 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(); + 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; + })(); + + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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; + })(); + + google.type = (function() { + + /** + * Namespace type. + * @memberof google + * @namespace + */ + var type = {}; + + type.Date = (function() { + + /** + * Properties of a Date. + * @memberof google.type + * @interface IDate + * @property {number|null} [year] Date year + * @property {number|null} [month] Date month + * @property {number|null} [day] Date day + */ + + /** + * Constructs a new Date. + * @memberof google.type + * @classdesc Represents a Date. + * @implements IDate + * @constructor + * @param {google.type.IDate=} [properties] Properties to set + */ + function Date(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Date year. + * @member {number} year + * @memberof google.type.Date + * @instance + */ + Date.prototype.year = 0; + + /** + * Date month. + * @member {number} month + * @memberof google.type.Date + * @instance + */ + Date.prototype.month = 0; + + /** + * Date day. + * @member {number} day + * @memberof google.type.Date + * @instance + */ + Date.prototype.day = 0; + + /** + * Creates a new Date instance using the specified properties. + * @function create + * @memberof google.type.Date + * @static + * @param {google.type.IDate=} [properties] Properties to set + * @returns {google.type.Date} Date instance + */ + Date.create = function create(properties) { + return new Date(properties); + }; + + /** + * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encode + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.year != null && Object.hasOwnProperty.call(message, "year")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); + if (message.month != null && Object.hasOwnProperty.call(message, "month")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); + if (message.day != null && Object.hasOwnProperty.call(message, "day")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); + return writer; + }; + + /** + * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. + * @function encodeDelimited + * @memberof google.type.Date + * @static + * @param {google.type.IDate} message Date message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Date.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Date message from the specified reader or buffer. + * @function decode + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.year = reader.int32(); + break; + } + case 2: { + message.month = reader.int32(); + break; + } + case 3: { + message.day = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Date message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.type.Date + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.type.Date} Date + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Date.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Date message. + * @function verify + * @memberof google.type.Date + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Date.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.year != null && message.hasOwnProperty("year")) + if (!$util.isInteger(message.year)) + return "year: integer expected"; + if (message.month != null && message.hasOwnProperty("month")) + if (!$util.isInteger(message.month)) + return "month: integer expected"; + if (message.day != null && message.hasOwnProperty("day")) + if (!$util.isInteger(message.day)) + return "day: integer expected"; + return null; + }; + + /** + * Creates a Date message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.type.Date + * @static + * @param {Object.} object Plain object + * @returns {google.type.Date} Date + */ + Date.fromObject = function fromObject(object) { + if (object instanceof $root.google.type.Date) + return object; + var message = new $root.google.type.Date(); + if (object.year != null) + message.year = object.year | 0; + if (object.month != null) + message.month = object.month | 0; + if (object.day != null) + message.day = object.day | 0; + return message; + }; + + /** + * Creates a plain object from a Date message. Also converts values to other types if specified. + * @function toObject + * @memberof google.type.Date + * @static + * @param {google.type.Date} message Date + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Date.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.year = 0; + object.month = 0; + object.day = 0; + } + if (message.year != null && message.hasOwnProperty("year")) + object.year = message.year; + if (message.month != null && message.hasOwnProperty("month")) + object.month = message.month; + if (message.day != null && message.hasOwnProperty("day")) + object.day = message.day; + return object; + }; + + /** + * Converts this Date to JSON. + * @function toJSON + * @memberof google.type.Date + * @instance + * @returns {Object.} JSON object + */ + Date.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Date + * @function getTypeUrl + * @memberof google.type.Date + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.type.Date"; + }; + + return Date; + })(); + + return type; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.json new file mode 100644 index 00000000000..0a670d6725a --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.json @@ -0,0 +1,4529 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "orchestration": { + "nested": { + "airflow": { + "nested": { + "service": { + "nested": { + "v1beta1": { + "options": { + "go_package": "cloud.google.com/go/orchestration/airflow/service/apiv1beta1/servicepb;servicepb", + "java_multiple_files": true, + "java_package": "com.google.cloud.orchestration.airflow.service.v1beta1", + "java_outer_classname": "OperationsProto" + }, + "nested": { + "Environments": { + "options": { + "(google.api.default_host)": "composer.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateEnvironment": { + "requestType": "CreateEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/environments", + "(google.api.http).body": "environment", + "(google.api.method_signature)": "parent,environment", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*}/environments", + "body": "environment" + } + }, + { + "(google.api.method_signature)": "parent,environment" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Environment", + "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + } + } + ] + }, + "GetEnvironment": { + "requestType": "GetEnvironmentRequest", + "responseType": "Environment", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/environments/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/environments/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListEnvironments": { + "requestType": "ListEnvironmentsRequest", + "responseType": "ListEnvironmentsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/environments", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/environments" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateEnvironment": { + "requestType": "UpdateEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1beta1/{name=projects/*/locations/*/environments/*}", + "(google.api.http).body": "environment", + "(google.api.method_signature)": "name,environment,update_mask", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1beta1/{name=projects/*/locations/*/environments/*}", + "body": "environment" + } + }, + { + "(google.api.method_signature)": "name,environment,update_mask" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Environment", + "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + } + } + ] + }, + "DeleteEnvironment": { + "requestType": "DeleteEnvironmentRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/environments/*}", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/environments/*}" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.protobuf.Empty", + "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + } + } + ] + }, + "RestartWebServer": { + "requestType": "RestartWebServerRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/environments/*}:restartWebServer", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Environment", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{name=projects/*/locations/*/environments/*}:restartWebServer", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Environment", + "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + } + } + ] + }, + "CheckUpgrade": { + "requestType": "CheckUpgradeRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:checkUpgrade", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:checkUpgrade", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse", + "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + } + } + ] + }, + "ExecuteAirflowCommand": { + "requestType": "ExecuteAirflowCommandRequest", + "responseType": "ExecuteAirflowCommandResponse", + "options": { + "(google.api.http).post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand", + "body": "*" + } + } + ] + }, + "StopAirflowCommand": { + "requestType": "StopAirflowCommandRequest", + "responseType": "StopAirflowCommandResponse", + "options": { + "(google.api.http).post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand", + "body": "*" + } + } + ] + }, + "PollAirflowCommand": { + "requestType": "PollAirflowCommandRequest", + "responseType": "PollAirflowCommandResponse", + "options": { + "(google.api.http).post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand", + "(google.api.http).body": "*" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand", + "body": "*" + } + } + ] + }, + "ListWorkloads": { + "requestType": "ListWorkloadsRequest", + "responseType": "ListWorkloadsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/environments/*}/workloads", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/environments/*}/workloads" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateUserWorkloadsSecret": { + "requestType": "CreateUserWorkloadsSecretRequest", + "responseType": "UserWorkloadsSecret", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets", + "(google.api.http).body": "user_workloads_secret", + "(google.api.method_signature)": "parent,user_workloads_secret" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets", + "body": "user_workloads_secret" + } + }, + { + "(google.api.method_signature)": "parent,user_workloads_secret" + } + ] + }, + "GetUserWorkloadsSecret": { + "requestType": "GetUserWorkloadsSecretRequest", + "responseType": "UserWorkloadsSecret", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListUserWorkloadsSecrets": { + "requestType": "ListUserWorkloadsSecretsRequest", + "responseType": "ListUserWorkloadsSecretsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateUserWorkloadsSecret": { + "requestType": "UpdateUserWorkloadsSecretRequest", + "responseType": "UserWorkloadsSecret", + "options": { + "(google.api.http).put": "/v1beta1/{user_workloads_secret.name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}", + "(google.api.http).body": "user_workloads_secret", + "(google.api.method_signature)": "user_workloads_secret" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v1beta1/{user_workloads_secret.name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}", + "body": "user_workloads_secret" + } + }, + { + "(google.api.method_signature)": "user_workloads_secret" + } + ] + }, + "DeleteUserWorkloadsSecret": { + "requestType": "DeleteUserWorkloadsSecretRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "CreateUserWorkloadsConfigMap": { + "requestType": "CreateUserWorkloadsConfigMapRequest", + "responseType": "UserWorkloadsConfigMap", + "options": { + "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps", + "(google.api.http).body": "user_workloads_config_map", + "(google.api.method_signature)": "parent,user_workloads_config_map" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps", + "body": "user_workloads_config_map" + } + }, + { + "(google.api.method_signature)": "parent,user_workloads_config_map" + } + ] + }, + "GetUserWorkloadsConfigMap": { + "requestType": "GetUserWorkloadsConfigMapRequest", + "responseType": "UserWorkloadsConfigMap", + "options": { + "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListUserWorkloadsConfigMaps": { + "requestType": "ListUserWorkloadsConfigMapsRequest", + "responseType": "ListUserWorkloadsConfigMapsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "UpdateUserWorkloadsConfigMap": { + "requestType": "UpdateUserWorkloadsConfigMapRequest", + "responseType": "UserWorkloadsConfigMap", + "options": { + "(google.api.http).put": "/v1beta1/{user_workloads_config_map.name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}", + "(google.api.http).body": "user_workloads_config_map", + "(google.api.method_signature)": "user_workloads_config_map" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "put": "/v1beta1/{user_workloads_config_map.name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}", + "body": "user_workloads_config_map" + } + }, + { + "(google.api.method_signature)": "user_workloads_config_map" + } + ] + }, + "DeleteUserWorkloadsConfigMap": { + "requestType": "DeleteUserWorkloadsConfigMapRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "SaveSnapshot": { + "requestType": "SaveSnapshotRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:saveSnapshot", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:saveSnapshot", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse", + "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + } + } + ] + }, + "LoadSnapshot": { + "requestType": "LoadSnapshotRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:loadSnapshot", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:loadSnapshot", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse", + "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + } + } + ] + }, + "DatabaseFailover": { + "requestType": "DatabaseFailoverRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:databaseFailover", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse", + "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:databaseFailover", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse", + "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" + } + } + ] + }, + "FetchDatabaseProperties": { + "requestType": "FetchDatabasePropertiesRequest", + "responseType": "FetchDatabasePropertiesResponse", + "options": { + "(google.api.http).get": "/v1beta1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties" + } + } + ] + } + } + }, + "CreateEnvironmentRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "environment": { + "type": "Environment", + "id": 2 + } + } + }, + "GetEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ListEnvironmentsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListEnvironmentsResponse": { + "fields": { + "environments": { + "rule": "repeated", + "type": "Environment", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "UpdateEnvironmentRequest": { + "fields": { + "name": { + "type": "string", + "id": 2 + }, + "environment": { + "type": "Environment", + "id": 1 + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "RestartWebServerRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "ExecuteAirflowCommandRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1 + }, + "command": { + "type": "string", + "id": 2 + }, + "subcommand": { + "type": "string", + "id": 3 + }, + "parameters": { + "rule": "repeated", + "type": "string", + "id": 4 + } + } + }, + "ExecuteAirflowCommandResponse": { + "fields": { + "executionId": { + "type": "string", + "id": 1 + }, + "pod": { + "type": "string", + "id": 2 + }, + "podNamespace": { + "type": "string", + "id": 3 + }, + "error": { + "type": "string", + "id": 4 + } + } + }, + "StopAirflowCommandRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1 + }, + "executionId": { + "type": "string", + "id": 2 + }, + "pod": { + "type": "string", + "id": 3 + }, + "podNamespace": { + "type": "string", + "id": 4 + }, + "force": { + "type": "bool", + "id": 5 + } + } + }, + "StopAirflowCommandResponse": { + "fields": { + "isDone": { + "type": "bool", + "id": 1 + }, + "output": { + "rule": "repeated", + "type": "string", + "id": 2 + } + } + }, + "PollAirflowCommandRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1 + }, + "executionId": { + "type": "string", + "id": 2 + }, + "pod": { + "type": "string", + "id": 3 + }, + "podNamespace": { + "type": "string", + "id": 4 + }, + "nextLineNumber": { + "type": "int32", + "id": 5 + } + } + }, + "PollAirflowCommandResponse": { + "fields": { + "output": { + "rule": "repeated", + "type": "Line", + "id": 1 + }, + "outputEnd": { + "type": "bool", + "id": 2 + }, + "exitInfo": { + "type": "ExitInfo", + "id": 3 + } + }, + "nested": { + "Line": { + "fields": { + "lineNumber": { + "type": "int32", + "id": 1 + }, + "content": { + "type": "string", + "id": 2 + } + } + }, + "ExitInfo": { + "fields": { + "exitCode": { + "type": "int32", + "id": 1 + }, + "error": { + "type": "string", + "id": 2 + } + } + } + } + }, + "CreateUserWorkloadsSecretRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/Environment" + } + }, + "userWorkloadsSecret": { + "type": "UserWorkloadsSecret", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetUserWorkloadsSecretRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/UserWorkloadsSecret" + } + } + } + }, + "ListUserWorkloadsSecretsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/Environment" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateUserWorkloadsSecretRequest": { + "fields": { + "userWorkloadsSecret": { + "type": "UserWorkloadsSecret", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteUserWorkloadsSecretRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/UserWorkloadsSecret" + } + } + } + }, + "CreateUserWorkloadsConfigMapRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/Environment" + } + }, + "userWorkloadsConfigMap": { + "type": "UserWorkloadsConfigMap", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetUserWorkloadsConfigMapRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/UserWorkloadsConfigMap" + } + } + } + }, + "ListUserWorkloadsConfigMapsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/Environment" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "UpdateUserWorkloadsConfigMapRequest": { + "fields": { + "userWorkloadsConfigMap": { + "type": "UserWorkloadsConfigMap", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DeleteUserWorkloadsConfigMapRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/UserWorkloadsConfigMap" + } + } + } + }, + "UserWorkloadsSecret": { + "options": { + "(google.api.resource).type": "composer.googleapis.com/UserWorkloadsSecret", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}", + "(google.api.resource).plural": "userWorkloadsSecrets", + "(google.api.resource).singular": "userWorkloadsSecret" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "data": { + "keyType": "string", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListUserWorkloadsSecretsResponse": { + "fields": { + "userWorkloadsSecrets": { + "rule": "repeated", + "type": "UserWorkloadsSecret", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "UserWorkloadsConfigMap": { + "options": { + "(google.api.resource).type": "composer.googleapis.com/UserWorkloadsConfigMap", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}", + "(google.api.resource).plural": "userWorkloadsConfigMaps", + "(google.api.resource).singular": "userWorkloadsConfigMap" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "data": { + "keyType": "string", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListUserWorkloadsConfigMapsResponse": { + "fields": { + "userWorkloadsConfigMaps": { + "rule": "repeated", + "type": "UserWorkloadsConfigMap", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ListWorkloadsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/Environment" + } + }, + "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" + } + } + } + }, + "ListWorkloadsResponse": { + "fields": { + "workloads": { + "rule": "repeated", + "type": "ComposerWorkload", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + }, + "nested": { + "ComposerWorkload": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "ComposerWorkloadType", + "id": 2 + }, + "status": { + "type": "ComposerWorkloadStatus", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ComposerWorkloadType": { + "values": { + "COMPOSER_WORKLOAD_TYPE_UNSPECIFIED": 0, + "CELERY_WORKER": 1, + "KUBERNETES_WORKER": 2, + "KUBERNETES_OPERATOR_POD": 3, + "SCHEDULER": 4, + "DAG_PROCESSOR": 5, + "TRIGGERER": 6, + "WEB_SERVER": 7, + "REDIS": 8 + } + }, + "ComposerWorkloadStatus": { + "fields": { + "state": { + "type": "ComposerWorkloadState", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "statusMessage": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "detailedStatusMessage": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "ComposerWorkloadState": { + "values": { + "COMPOSER_WORKLOAD_STATE_UNSPECIFIED": 0, + "PENDING": 1, + "OK": 2, + "WARNING": 3, + "ERROR": 4, + "SUCCEEDED": 5, + "FAILED": 6 + } + } + } + }, + "SaveSnapshotRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1 + }, + "snapshotLocation": { + "type": "string", + "id": 2 + } + } + }, + "SaveSnapshotResponse": { + "fields": { + "snapshotPath": { + "type": "string", + "id": 1 + } + } + }, + "LoadSnapshotRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1 + }, + "snapshotPath": { + "type": "string", + "id": 2 + }, + "skipPypiPackagesInstallation": { + "type": "bool", + "id": 3 + }, + "skipEnvironmentVariablesSetting": { + "type": "bool", + "id": 4 + }, + "skipAirflowOverridesSetting": { + "type": "bool", + "id": 5 + }, + "skipGcsDataCopying": { + "type": "bool", + "id": 6 + } + } + }, + "LoadSnapshotResponse": { + "fields": {} + }, + "DatabaseFailoverRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1 + } + } + }, + "DatabaseFailoverResponse": { + "fields": {} + }, + "FetchDatabasePropertiesRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "composer.googleapis.com/Environment" + } + } + } + }, + "FetchDatabasePropertiesResponse": { + "fields": { + "primaryGceZone": { + "type": "string", + "id": 1 + }, + "secondaryGceZone": { + "type": "string", + "id": 2 + }, + "isFailoverReplicaAvailable": { + "type": "bool", + "id": 3 + } + } + }, + "EnvironmentConfig": { + "fields": { + "gkeCluster": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "dagGcsPrefix": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "nodeCount": { + "type": "int32", + "id": 3 + }, + "softwareConfig": { + "type": "SoftwareConfig", + "id": 4 + }, + "nodeConfig": { + "type": "NodeConfig", + "id": 5 + }, + "privateEnvironmentConfig": { + "type": "PrivateEnvironmentConfig", + "id": 7 + }, + "webServerNetworkAccessControl": { + "type": "WebServerNetworkAccessControl", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "databaseConfig": { + "type": "DatabaseConfig", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServerConfig": { + "type": "WebServerConfig", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "airflowUri": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "airflowByoidUri": { + "type": "string", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "encryptionConfig": { + "type": "EncryptionConfig", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maintenanceWindow": { + "type": "MaintenanceWindow", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "workloadsConfig": { + "type": "WorkloadsConfig", + "id": 15, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "environmentSize": { + "type": "EnvironmentSize", + "id": 16, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "masterAuthorizedNetworksConfig": { + "type": "MasterAuthorizedNetworksConfig", + "id": 17, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "recoveryConfig": { + "type": "RecoveryConfig", + "id": 18, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataRetentionConfig": { + "type": "DataRetentionConfig", + "id": 19, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "resilienceMode": { + "type": "ResilienceMode", + "id": 20, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "EnvironmentSize": { + "values": { + "ENVIRONMENT_SIZE_UNSPECIFIED": 0, + "ENVIRONMENT_SIZE_SMALL": 1, + "ENVIRONMENT_SIZE_MEDIUM": 2, + "ENVIRONMENT_SIZE_LARGE": 3 + } + }, + "ResilienceMode": { + "values": { + "RESILIENCE_MODE_UNSPECIFIED": 0, + "HIGH_RESILIENCE": 1 + } + } + } + }, + "WebServerNetworkAccessControl": { + "fields": { + "allowedIpRanges": { + "rule": "repeated", + "type": "AllowedIpRange", + "id": 1 + } + }, + "nested": { + "AllowedIpRange": { + "fields": { + "value": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "SoftwareConfig": { + "fields": { + "imageVersion": { + "type": "string", + "id": 1 + }, + "airflowConfigOverrides": { + "keyType": "string", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pypiPackages": { + "keyType": "string", + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "envVariables": { + "keyType": "string", + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pythonVersion": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "schedulerCount": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloudDataLineageIntegration": { + "type": "CloudDataLineageIntegration", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServerPluginsMode": { + "type": "WebServerPluginsMode", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "WebServerPluginsMode": { + "values": { + "WEB_SERVER_PLUGINS_MODE_UNSPECIFIED": 0, + "PLUGINS_DISABLED": 1, + "PLUGINS_ENABLED": 2 + } + } + } + }, + "IPAllocationPolicy": { + "fields": { + "useIpAliases": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clusterSecondaryRangeName": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "servicesSecondaryRangeName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "clusterIpv4CidrBlock": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "servicesIpv4CidrBlock": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "NodeConfig": { + "fields": { + "location": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "machineType": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "network": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "subnetwork": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "diskSizeGb": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "oauthScopes": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "serviceAccount": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "tags": { + "rule": "repeated", + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "ipAllocationPolicy": { + "type": "IPAllocationPolicy", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxPodsPerNode": { + "type": "int32", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "enableIpMasqAgent": { + "type": "bool", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "composerNetworkAttachment": { + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "composerInternalIpv4CidrBlock": { + "type": "string", + "id": 13, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "PrivateClusterConfig": { + "fields": { + "enablePrivateEndpoint": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "masterIpv4CidrBlock": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "masterIpv4ReservedRange": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "NetworkingConfig": { + "fields": { + "connectionType": { + "type": "ConnectionType", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ConnectionType": { + "values": { + "CONNECTION_TYPE_UNSPECIFIED": 0, + "VPC_PEERING": 1, + "PRIVATE_SERVICE_CONNECT": 2 + } + } + } + }, + "PrivateEnvironmentConfig": { + "fields": { + "enablePrivateEnvironment": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "enablePrivateBuildsOnly": { + "type": "bool", + "id": 11, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "privateClusterConfig": { + "type": "PrivateClusterConfig", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServerIpv4CidrBlock": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloudSqlIpv4CidrBlock": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServerIpv4ReservedRange": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "cloudComposerNetworkIpv4CidrBlock": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloudComposerNetworkIpv4ReservedRange": { + "type": "string", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "enablePrivatelyUsedPublicIps": { + "type": "bool", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cloudComposerConnectionSubnetwork": { + "type": "string", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "networkingConfig": { + "type": "NetworkingConfig", + "id": 10, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DatabaseConfig": { + "fields": { + "machineType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "zone": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "WebServerConfig": { + "fields": { + "machineType": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "EncryptionConfig": { + "fields": { + "kmsKeyName": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "MaintenanceWindow": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "recurrence": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "WorkloadsConfig": { + "fields": { + "scheduler": { + "type": "SchedulerResource", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "webServer": { + "type": "WebServerResource", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "worker": { + "type": "WorkerResource", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "triggerer": { + "type": "TriggererResource", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dagProcessor": { + "type": "DagProcessorResource", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "SchedulerResource": { + "fields": { + "cpu": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "memoryGb": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "storageGb": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "count": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "WebServerResource": { + "fields": { + "cpu": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "memoryGb": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "storageGb": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "WorkerResource": { + "fields": { + "cpu": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "memoryGb": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "storageGb": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "minCount": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "maxCount": { + "type": "int32", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TriggererResource": { + "fields": { + "count": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "cpu": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "memoryGb": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "DagProcessorResource": { + "fields": { + "cpu": { + "type": "float", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "memoryGb": { + "type": "float", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "storageGb": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "count": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "DataRetentionConfig": { + "fields": { + "airflowDatabaseRetentionDays": { + "type": "int32", + "id": 1, + "options": { + "deprecated": true, + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "taskLogsRetentionConfig": { + "type": "TaskLogsRetentionConfig", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "airflowMetadataRetentionConfig": { + "type": "AirflowMetadataRetentionPolicyConfig", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TaskLogsRetentionConfig": { + "fields": { + "storageMode": { + "type": "TaskLogsStorageMode", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "TaskLogsStorageMode": { + "values": { + "TASK_LOGS_STORAGE_MODE_UNSPECIFIED": 0, + "CLOUD_LOGGING_AND_CLOUD_STORAGE": 1, + "CLOUD_LOGGING_ONLY": 2 + } + } + } + }, + "AirflowMetadataRetentionPolicyConfig": { + "fields": { + "retentionMode": { + "type": "RetentionMode", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "retentionDays": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "RetentionMode": { + "values": { + "RETENTION_MODE_UNSPECIFIED": 0, + "RETENTION_MODE_ENABLED": 1, + "RETENTION_MODE_DISABLED": 2 + } + } + } + }, + "StorageConfig": { + "fields": { + "bucket": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "RecoveryConfig": { + "fields": { + "scheduledSnapshotsConfig": { + "type": "ScheduledSnapshotsConfig", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ScheduledSnapshotsConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "snapshotLocation": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "snapshotCreationSchedule": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "timeZone": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "MasterAuthorizedNetworksConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + }, + "cidrBlocks": { + "rule": "repeated", + "type": "CidrBlock", + "id": 2 + } + }, + "nested": { + "CidrBlock": { + "fields": { + "displayName": { + "type": "string", + "id": 1 + }, + "cidrBlock": { + "type": "string", + "id": 2 + } + } + } + } + }, + "CloudDataLineageIntegration": { + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "Environment": { + "options": { + "(google.api.resource).type": "composer.googleapis.com/Environment", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/environments/{environment}" + }, + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "config": { + "type": "EnvironmentConfig", + "id": 2 + }, + "uuid": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "state": { + "type": "State", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "updateTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "satisfiesPzs": { + "type": "bool", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "satisfiesPzi": { + "type": "bool", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "storageConfig": { + "type": "StorageConfig", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "RUNNING": 2, + "UPDATING": 3, + "DELETING": 4, + "ERROR": 5 + } + } + } + }, + "CheckUpgradeRequest": { + "fields": { + "environment": { + "type": "string", + "id": 1 + }, + "imageVersion": { + "type": "string", + "id": 2 + } + } + }, + "CheckUpgradeResponse": { + "fields": { + "buildLogUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "containsPypiModulesConflict": { + "type": "ConflictResult", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "pypiConflictBuildLogExtract": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "imageVersion": { + "type": "string", + "id": 5 + }, + "pypiDependencies": { + "keyType": "string", + "type": "string", + "id": 6 + } + }, + "nested": { + "ConflictResult": { + "values": { + "CONFLICT_RESULT_UNSPECIFIED": 0, + "CONFLICT": 1, + "NO_CONFLICT": 2 + } + } + } + }, + "OperationMetadata": { + "fields": { + "state": { + "type": "State", + "id": 1 + }, + "operationType": { + "type": "Type", + "id": 2 + }, + "resource": { + "type": "string", + "id": 3 + }, + "resourceUuid": { + "type": "string", + "id": 4 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "PENDING": 1, + "RUNNING": 2, + "SUCCESSFUL": 3, + "FAILED": 4 + } + }, + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "CREATE": 1, + "DELETE": 2, + "UPDATE": 3, + "CHECK": 4, + "SAVE_SNAPSHOT": 5, + "LOAD_SNAPSHOT": 6, + "DATABASE_FAILOVER": 7 + } + } + } + }, + "ImageVersions": { + "options": { + "(google.api.default_host)": "composer.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "ListImageVersions": { + "requestType": "ListImageVersionsRequest", + "responseType": "ListImageVersionsResponse", + "options": { + "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/imageVersions", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1beta1/{parent=projects/*/locations/*}/imageVersions" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "ListImageVersionsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "includePastReleases": { + "type": "bool", + "id": 4 + } + } + }, + "ListImageVersionsResponse": { + "fields": { + "imageVersions": { + "rule": "repeated", + "type": "ImageVersion", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ImageVersion": { + "fields": { + "imageVersionId": { + "type": "string", + "id": 1 + }, + "isDefault": { + "type": "bool", + "id": 2 + }, + "supportedPythonVersions": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "releaseDate": { + "type": "google.type.Date", + "id": 4 + }, + "creationDisabled": { + "type": "bool", + "id": 5 + }, + "upgradeDisabled": { + "type": "bool", + "id": 6 + } + } + } + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ResourceProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "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 + } + }, + "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 + } + } + } + } + }, + "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": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "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": { + "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, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "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": { + "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": { + "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": { + "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": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "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": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "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": { + "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": { + "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": { + "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, + "options": { + "packed": false + } + }, + "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": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "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": { + "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": { + "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": { + "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": { + "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": { + "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": { + "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": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "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 + } + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "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 + } + } + } + } + }, + "type": { + "options": { + "cc_enable_arenas": true, + "go_package": "google.golang.org/genproto/googleapis/type/date;date", + "java_multiple_files": true, + "java_outer_classname": "DateProto", + "java_package": "com.google.type", + "objc_class_prefix": "GTP" + }, + "nested": { + "Date": { + "fields": { + "year": { + "type": "int32", + "id": 1 + }, + "month": { + "type": "int32", + "id": 2 + }, + "day": { + "type": "int32", + "id": 3 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.check_upgrade.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.check_upgrade.js new file mode 100644 index 00000000000..afb1cce4f87 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.check_upgrade.js @@ -0,0 +1,86 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1beta1_generated_Environments_CheckUpgrade_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. + */ + /** + * The resource name of the environment to check upgrade for, in the + * form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const environment = 'abc123' + /** + * The version of the software running in the environment. + * This encapsulates both the version of Cloud Composer functionality and the + * version of Apache Airflow. It must match the regular expression + * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. + * When used as input, the server also checks if the provided version is + * supported and denies the request for an unsupported version. + * The Cloud Composer portion of the image version is a full + * semantic version (https://semver.org), or an alias in the form of major + * version number or `latest`. When an alias is provided, the server replaces + * it with the current Cloud Composer version that satisfies the alias. + * The Apache Airflow portion of the image version is a full semantic version + * that points to one of the supported Apache Airflow versions, or an alias in + * the form of only major or major.minor versions specified. When an alias is + * provided, the server replaces it with the latest Apache Airflow version + * that satisfies the alias and is supported in the given Cloud Composer + * version. + * In all cases, the resolved image version is stored in the same field. + * See also version + * list (/composer/docs/concepts/versioning/composer-versions) and versioning + * overview (/composer/docs/concepts/versioning/composer-versioning-overview). + */ + // const imageVersion = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callCheckUpgrade() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await serviceClient.checkUpgrade(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCheckUpgrade(); + // [END composer_v1beta1_generated_Environments_CheckUpgrade_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_environment.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_environment.js new file mode 100644 index 00000000000..dc854c42371 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_environment.js @@ -0,0 +1,66 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1beta1_generated_Environments_CreateEnvironment_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. + */ + /** + * The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + */ + // const parent = 'abc123' + /** + * The environment to create. + */ + // const environment = {} + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callCreateEnvironment() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await serviceClient.createEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCreateEnvironment(); + // [END composer_v1beta1_generated_Environments_CreateEnvironment_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_user_workloads_config_map.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_user_workloads_config_map.js new file mode 100644 index 00000000000..b2475252bcc --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_user_workloads_config_map.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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, userWorkloadsConfigMap) { + // [START composer_v1beta1_generated_Environments_CreateUserWorkloadsConfigMap_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 environment name to create a ConfigMap for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const parent = 'abc123' + /** + * Required. User workloads ConfigMap to create. + */ + // const userWorkloadsConfigMap = {} + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callCreateUserWorkloadsConfigMap() { + // Construct request + const request = { + parent, + userWorkloadsConfigMap, + }; + + // Run request + const response = await serviceClient.createUserWorkloadsConfigMap(request); + console.log(response); + } + + callCreateUserWorkloadsConfigMap(); + // [END composer_v1beta1_generated_Environments_CreateUserWorkloadsConfigMap_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_user_workloads_secret.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_user_workloads_secret.js new file mode 100644 index 00000000000..6ad9272ff55 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_user_workloads_secret.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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, userWorkloadsSecret) { + // [START composer_v1beta1_generated_Environments_CreateUserWorkloadsSecret_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 environment name to create a Secret for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const parent = 'abc123' + /** + * Required. User workloads Secret to create. + */ + // const userWorkloadsSecret = {} + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callCreateUserWorkloadsSecret() { + // Construct request + const request = { + parent, + userWorkloadsSecret, + }; + + // Run request + const response = await serviceClient.createUserWorkloadsSecret(request); + console.log(response); + } + + callCreateUserWorkloadsSecret(); + // [END composer_v1beta1_generated_Environments_CreateUserWorkloadsSecret_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.database_failover.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.database_failover.js new file mode 100644 index 00000000000..3ee61e21343 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.database_failover.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1beta1_generated_Environments_DatabaseFailover_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. + */ + /** + * Target environment: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const environment = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callDatabaseFailover() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await serviceClient.databaseFailover(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDatabaseFailover(); + // [END composer_v1beta1_generated_Environments_DatabaseFailover_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_environment.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_environment.js new file mode 100644 index 00000000000..a94574ab5f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_environment.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1beta1_generated_Environments_DeleteEnvironment_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. + */ + /** + * The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callDeleteEnvironment() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await serviceClient.deleteEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callDeleteEnvironment(); + // [END composer_v1beta1_generated_Environments_DeleteEnvironment_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_user_workloads_config_map.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_user_workloads_config_map.js new file mode 100644 index 00000000000..947aeb36d32 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_user_workloads_config_map.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 composer_v1beta1_generated_Environments_DeleteUserWorkloadsConfigMap_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 ConfigMap to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callDeleteUserWorkloadsConfigMap() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await serviceClient.deleteUserWorkloadsConfigMap(request); + console.log(response); + } + + callDeleteUserWorkloadsConfigMap(); + // [END composer_v1beta1_generated_Environments_DeleteUserWorkloadsConfigMap_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_user_workloads_secret.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_user_workloads_secret.js new file mode 100644 index 00000000000..fa74d4dc74d --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_user_workloads_secret.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 composer_v1beta1_generated_Environments_DeleteUserWorkloadsSecret_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 Secret to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callDeleteUserWorkloadsSecret() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await serviceClient.deleteUserWorkloadsSecret(request); + console.log(response); + } + + callDeleteUserWorkloadsSecret(); + // [END composer_v1beta1_generated_Environments_DeleteUserWorkloadsSecret_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.execute_airflow_command.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.execute_airflow_command.js new file mode 100644 index 00000000000..ee4434e045c --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.execute_airflow_command.js @@ -0,0 +1,76 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1beta1_generated_Environments_ExecuteAirflowCommand_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. + */ + /** + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + */ + // const environment = 'abc123' + /** + * Airflow command. + */ + // const command = 'abc123' + /** + * Airflow subcommand. + */ + // const subcommand = 'abc123' + /** + * Parameters for the Airflow command/subcommand as an array of arguments. + * It may contain positional arguments like `["my-dag-id"]`, key-value + * parameters like `["--foo=bar"]` or `["--foo","bar"]`, + * or other flags like `["-f"]`. + */ + // const parameters = ['abc','def'] + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callExecuteAirflowCommand() { + // Construct request + const request = { + }; + + // Run request + const response = await serviceClient.executeAirflowCommand(request); + console.log(response); + } + + callExecuteAirflowCommand(); + // [END composer_v1beta1_generated_Environments_ExecuteAirflowCommand_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.fetch_database_properties.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.fetch_database_properties.js new file mode 100644 index 00000000000..08245bfb343 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.fetch_database_properties.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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(environment) { + // [START composer_v1beta1_generated_Environments_FetchDatabaseProperties_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 environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const environment = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callFetchDatabaseProperties() { + // Construct request + const request = { + environment, + }; + + // Run request + const response = await serviceClient.fetchDatabaseProperties(request); + console.log(response); + } + + callFetchDatabaseProperties(); + // [END composer_v1beta1_generated_Environments_FetchDatabaseProperties_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_environment.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_environment.js new file mode 100644 index 00000000000..cfc665a1c66 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_environment.js @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1beta1_generated_Environments_GetEnvironment_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. + */ + /** + * The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callGetEnvironment() { + // Construct request + const request = { + }; + + // Run request + const response = await serviceClient.getEnvironment(request); + console.log(response); + } + + callGetEnvironment(); + // [END composer_v1beta1_generated_Environments_GetEnvironment_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_user_workloads_config_map.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_user_workloads_config_map.js new file mode 100644 index 00000000000..45fe12cea1a --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_user_workloads_config_map.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 composer_v1beta1_generated_Environments_GetUserWorkloadsConfigMap_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 ConfigMap to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callGetUserWorkloadsConfigMap() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await serviceClient.getUserWorkloadsConfigMap(request); + console.log(response); + } + + callGetUserWorkloadsConfigMap(); + // [END composer_v1beta1_generated_Environments_GetUserWorkloadsConfigMap_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_user_workloads_secret.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_user_workloads_secret.js new file mode 100644 index 00000000000..8fb5b46d6db --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_user_workloads_secret.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 composer_v1beta1_generated_Environments_GetUserWorkloadsSecret_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 Secret to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callGetUserWorkloadsSecret() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await serviceClient.getUserWorkloadsSecret(request); + console.log(response); + } + + callGetUserWorkloadsSecret(); + // [END composer_v1beta1_generated_Environments_GetUserWorkloadsSecret_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_environments.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_environments.js new file mode 100644 index 00000000000..86654938f4d --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_environments.js @@ -0,0 +1,71 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1beta1_generated_Environments_ListEnvironments_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. + */ + /** + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + */ + // const parent = 'abc123' + /** + * The maximum number of environments to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous List request, if any. + */ + // const pageToken = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callListEnvironments() { + // Construct request + const request = { + }; + + // Run request + const iterable = serviceClient.listEnvironmentsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListEnvironments(); + // [END composer_v1beta1_generated_Environments_ListEnvironments_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_user_workloads_config_maps.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_user_workloads_config_maps.js new file mode 100644 index 00000000000..82d1c180107 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_user_workloads_config_maps.js @@ -0,0 +1,73 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 composer_v1beta1_generated_Environments_ListUserWorkloadsConfigMaps_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. List ConfigMaps in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of ConfigMaps to return. + */ + // const pageSize = 1234 + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + */ + // const pageToken = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callListUserWorkloadsConfigMaps() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = serviceClient.listUserWorkloadsConfigMapsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListUserWorkloadsConfigMaps(); + // [END composer_v1beta1_generated_Environments_ListUserWorkloadsConfigMaps_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_user_workloads_secrets.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_user_workloads_secrets.js new file mode 100644 index 00000000000..f29069976e5 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_user_workloads_secrets.js @@ -0,0 +1,73 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 composer_v1beta1_generated_Environments_ListUserWorkloadsSecrets_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. List Secrets in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of Secrets to return. + */ + // const pageSize = 1234 + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + */ + // const pageToken = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callListUserWorkloadsSecrets() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = serviceClient.listUserWorkloadsSecretsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListUserWorkloadsSecrets(); + // [END composer_v1beta1_generated_Environments_ListUserWorkloadsSecrets_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_workloads.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_workloads.js new file mode 100644 index 00000000000..d6c5f0f91f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_workloads.js @@ -0,0 +1,82 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 composer_v1beta1_generated_Environments_ListWorkloads_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 environment name to get workloads for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of environments to return. + */ + // const pageSize = 1234 + /** + * Optional. The next_page_token value returned from a previous List request, + * if any. + */ + // const pageToken = 'abc123' + /** + * Optional. The list filter. + * Currently only supports equality on the type field. The value of a field + * specified in the filter expression must be one ComposerWorkloadType enum + * option. It's possible to get multiple types using "OR" operator, e.g.: + * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are + * returned. + */ + // const filter = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callListWorkloads() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = serviceClient.listWorkloadsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListWorkloads(); + // [END composer_v1beta1_generated_Environments_ListWorkloads_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.load_snapshot.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.load_snapshot.js new file mode 100644 index 00000000000..d1dab64d11b --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.load_snapshot.js @@ -0,0 +1,87 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1beta1_generated_Environments_LoadSnapshot_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. + */ + /** + * The resource name of the target environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const environment = 'abc123' + /** + * A Cloud Storage path to a snapshot to load, e.g.: + * "gs://my-bucket/snapshots/project_location_environment_timestamp". + */ + // const snapshotPath = 'abc123' + /** + * Whether or not to skip installing Pypi packages when loading the + * environment's state. + */ + // const skipPypiPackagesInstallation = true + /** + * Whether or not to skip setting environment variables when loading the + * environment's state. + */ + // const skipEnvironmentVariablesSetting = true + /** + * Whether or not to skip setting Airflow overrides when loading the + * environment's state. + */ + // const skipAirflowOverridesSetting = true + /** + * Whether or not to skip copying Cloud Storage data when loading the + * environment's state. + */ + // const skipGcsDataCopying = true + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callLoadSnapshot() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await serviceClient.loadSnapshot(request); + const [response] = await operation.promise(); + console.log(response); + } + + callLoadSnapshot(); + // [END composer_v1beta1_generated_Environments_LoadSnapshot_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.poll_airflow_command.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.poll_airflow_command.js new file mode 100644 index 00000000000..d6cc0cfb3d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.poll_airflow_command.js @@ -0,0 +1,77 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1beta1_generated_Environments_PollAirflowCommand_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. + */ + /** + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const environment = 'abc123' + /** + * The unique ID of the command execution. + */ + // const executionId = 'abc123' + /** + * The name of the pod where the command is executed. + */ + // const pod = 'abc123' + /** + * The namespace of the pod where the command is executed. + */ + // const podNamespace = 'abc123' + /** + * Line number from which new logs should be fetched. + */ + // const nextLineNumber = 1234 + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callPollAirflowCommand() { + // Construct request + const request = { + }; + + // Run request + const response = await serviceClient.pollAirflowCommand(request); + console.log(response); + } + + callPollAirflowCommand(); + // [END composer_v1beta1_generated_Environments_PollAirflowCommand_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.restart_web_server.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.restart_web_server.js new file mode 100644 index 00000000000..e1b2a0b6262 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.restart_web_server.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1beta1_generated_Environments_RestartWebServer_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. + */ + /** + * The resource name of the environment to restart the web server for, in the + * form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const name = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callRestartWebServer() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await serviceClient.restartWebServer(request); + const [response] = await operation.promise(); + console.log(response); + } + + callRestartWebServer(); + // [END composer_v1beta1_generated_Environments_RestartWebServer_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.save_snapshot.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.save_snapshot.js new file mode 100644 index 00000000000..a02b7fcda21 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.save_snapshot.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1beta1_generated_Environments_SaveSnapshot_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. + */ + /** + * The resource name of the source environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const environment = 'abc123' + /** + * Location in a Cloud Storage where the snapshot is going to be stored, e.g.: + * "gs://my-bucket/snapshots". + */ + // const snapshotLocation = 'abc123' + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callSaveSnapshot() { + // Construct request + const request = { + }; + + // Run request + const [operation] = await serviceClient.saveSnapshot(request); + const [response] = await operation.promise(); + console.log(response); + } + + callSaveSnapshot(); + // [END composer_v1beta1_generated_Environments_SaveSnapshot_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.stop_airflow_command.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.stop_airflow_command.js new file mode 100644 index 00000000000..2829a3e2950 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.stop_airflow_command.js @@ -0,0 +1,78 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1beta1_generated_Environments_StopAirflowCommand_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. + */ + /** + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + */ + // const environment = 'abc123' + /** + * The unique ID of the command execution. + */ + // const executionId = 'abc123' + /** + * The name of the pod where the command is executed. + */ + // const pod = 'abc123' + /** + * The namespace of the pod where the command is executed. + */ + // const podNamespace = 'abc123' + /** + * If true, the execution is terminated forcefully (SIGKILL). If false, the + * execution is stopped gracefully, giving it time for cleanup. + */ + // const force = true + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callStopAirflowCommand() { + // Construct request + const request = { + }; + + // Run request + const response = await serviceClient.stopAirflowCommand(request); + console.log(response); + } + + callStopAirflowCommand(); + // [END composer_v1beta1_generated_Environments_StopAirflowCommand_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_environment.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_environment.js new file mode 100644 index 00000000000..cdac55e6be4 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_environment.js @@ -0,0 +1,206 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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) { + // [START composer_v1beta1_generated_Environments_UpdateEnvironment_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. + */ + /** + * The relative resource name of the environment to update, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + */ + // const name = 'abc123' + /** + * A patch environment. Fields specified by the `updateMask` will be copied + * from the patch environment into the environment under update. + */ + // const environment = {} + /** + * Required. A comma-separated list of paths, relative to `Environment`, of + * fields to update. + * For example, to set the version of scikit-learn to install in the + * environment to 0.19.0 and to remove an existing installation of + * argparse, the `updateMask` parameter would include the following two + * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + * "config.softwareConfig.pypiPackages.argparse". The included patch + * environment would specify the scikit-learn version as follows: + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "scikit-learn":"==0.19.0" + * } + * } + * } + * } + * Note that in the above example, any existing PyPI packages + * other than scikit-learn and argparse will be unaffected. + * Only one update type may be included in a single request's `updateMask`. + * For example, one cannot update both the PyPI packages and + * labels in the same request. However, it is possible to update multiple + * members of a map field simultaneously in the same request. For example, + * to set the labels "label1" and "label2" while clearing "label3" (assuming + * it already exists), one can + * provide the paths "labels.label1", "labels.label2", and "labels.label3" + * and populate the patch environment as follows: + * { + * "labels":{ + * "label1":"new-label1-value" + * "label2":"new-label2-value" + * } + * } + * Note that in the above example, any existing labels that are not + * included in the `updateMask` will be unaffected. + * It is also possible to replace an entire map field by providing the + * map field's path in the `updateMask`. The new value of the field will + * be that which is provided in the patch environment. For example, to + * delete all pre-existing user-specified PyPI packages and + * install botocore at version 1.7.14, the `updateMask` would contain + * the path "config.softwareConfig.pypiPackages", and + * the patch environment would be the following: + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "botocore":"==1.7.14" + * } + * } + * } + * } + * **Note:** Only the following fields can be updated: + * * `config.softwareConfig.pypiPackages` + * * Replace all custom custom PyPI packages. If a replacement + * package map is not included in `environment`, all custom + * PyPI packages are cleared. It is an error to provide both + * this mask and a mask specifying an individual package. + * * `config.softwareConfig.pypiPackages.`packagename + * * Update the custom PyPI package *packagename*, + * preserving other packages. To delete the package, include it in + * `updateMask`, and omit the mapping for it in + * `environment.config.softwareConfig.pypiPackages`. It is an error + * to provide both a mask of this form and the + * `config.softwareConfig.pypiPackages` mask. + * * `labels` + * * Replace all environment labels. If a replacement labels map is not + * included in `environment`, all labels are cleared. It is an error to + * provide both this mask and a mask specifying one or more individual + * labels. + * * `labels.`labelName + * * Set the label named *labelName*, while preserving other + * labels. To delete the label, include it in `updateMask` and omit its + * mapping in `environment.labels`. It is an error to provide both a + * mask of this form and the `labels` mask. + * * `config.nodeCount` + * * Horizontally scale the number of nodes in the environment. An integer + * greater than or equal to 3 must be provided in the `config.nodeCount` + * field. Supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * * `config.webServerNetworkAccessControl` + * * Replace the environment's current WebServerNetworkAccessControl. + * * `config.softwareConfig.airflowConfigOverrides` + * * Replace all Apache Airflow config overrides. If a replacement config + * overrides map is not included in `environment`, all config overrides + * are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual config overrides. + * * `config.softwareConfig.airflowConfigOverrides.`section-name + * * Override the Apache Airflow config property *name* in the + * section named *section*, preserving other properties. To + * delete the property override, include it in `updateMask` and omit its + * mapping in + * `environment.config.softwareConfig.airflowConfigOverrides`. + * It is an error to provide both a mask of this form and the + * `config.softwareConfig.airflowConfigOverrides` mask. + * * `config.softwareConfig.envVariables` + * * Replace all environment variables. If a replacement environment + * variable map is not included in `environment`, all custom environment + * variables are cleared. + * * `config.softwareConfig.imageVersion` + * * Upgrade the version of the environment in-place. Refer to + * `SoftwareConfig.image_version` for information on how to format the + * new image version. Additionally, the new image version cannot effect + * a version downgrade, and must match the current image version's + * Composer and Airflow major versions. Consult the Cloud Composer + * version list (/composer/docs/concepts/versioning/composer-versions) + * for valid values. + * * `config.softwareConfig.schedulerCount` + * * Horizontally scale the number of schedulers in Airflow. A positive + * integer not greater than the number of nodes must be provided in the + * `config.softwareConfig.schedulerCount` field. Supported for Cloud + * Composer environments in versions composer-1.*.*-airflow-2.*.*. + * * `config.softwareConfig.cloudDataLineageIntegration` + * * Configuration for Cloud Data Lineage integration. + * * `config.databaseConfig.machineType` + * * Cloud SQL machine type used by Airflow database. + * It has to be one of: db-n1-standard-2, db-n1-standard-4, + * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer + * environments in versions composer-1.*.*-airflow-*.*.*. + * * `config.webServerConfig.machineType` + * * Machine type on which Airflow web server is running. + * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 + * or composer-n1-webserver-8. Supported for Cloud Composer environments + * in versions composer-1.*.*-airflow-*.*.*. + * * `config.maintenanceWindow` + * * Maintenance window during which Cloud Composer components may be + * under maintenance. + * * `config.workloadsConfig` + * * The workloads configuration settings for the GKE cluster associated + * with the Cloud Composer environment. Supported for Cloud Composer + * environments in versions composer-2.*.*-airflow-*.*.* and newer. + * * `config.environmentSize` + * * The size of the Cloud Composer environment. Supported for Cloud + * Composer environments in versions composer-2.*.*-airflow-*.*.* and + * newer. + */ + // const updateMask = {} + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callUpdateEnvironment() { + // Construct request + const request = { + updateMask, + }; + + // Run request + const [operation] = await serviceClient.updateEnvironment(request); + const [response] = await operation.promise(); + console.log(response); + } + + callUpdateEnvironment(); + // [END composer_v1beta1_generated_Environments_UpdateEnvironment_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_user_workloads_config_map.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_user_workloads_config_map.js new file mode 100644 index 00000000000..b5968329a05 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_user_workloads_config_map.js @@ -0,0 +1,60 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1beta1_generated_Environments_UpdateUserWorkloadsConfigMap_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. User workloads ConfigMap to override. + */ + // const userWorkloadsConfigMap = {} + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callUpdateUserWorkloadsConfigMap() { + // Construct request + const request = { + }; + + // Run request + const response = await serviceClient.updateUserWorkloadsConfigMap(request); + console.log(response); + } + + callUpdateUserWorkloadsConfigMap(); + // [END composer_v1beta1_generated_Environments_UpdateUserWorkloadsConfigMap_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_user_workloads_secret.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_user_workloads_secret.js new file mode 100644 index 00000000000..f63bdabba13 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_user_workloads_secret.js @@ -0,0 +1,60 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1beta1_generated_Environments_UpdateUserWorkloadsSecret_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. User workloads Secret to override. + */ + // const userWorkloadsSecret = {} + + // Imports the Service library + const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new EnvironmentsClient(); + + async function callUpdateUserWorkloadsSecret() { + // Construct request + const request = { + }; + + // Run request + const response = await serviceClient.updateUserWorkloadsSecret(request); + console.log(response); + } + + callUpdateUserWorkloadsSecret(); + // [END composer_v1beta1_generated_Environments_UpdateUserWorkloadsSecret_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/image_versions.list_image_versions.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/image_versions.list_image_versions.js new file mode 100644 index 00000000000..8a9d5aa745a --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/image_versions.list_image_versions.js @@ -0,0 +1,75 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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() { + // [START composer_v1beta1_generated_ImageVersions_ListImageVersions_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. + */ + /** + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + */ + // const parent = 'abc123' + /** + * The maximum number of image_versions to return. + */ + // const pageSize = 1234 + /** + * The next_page_token value returned from a previous List request, if any. + */ + // const pageToken = 'abc123' + /** + * Whether or not image versions from old releases should be included. + */ + // const includePastReleases = true + + // Imports the Service library + const {ImageVersionsClient} = require('@google-cloud/orchestration-airflow').v1beta1; + + // Instantiates a client + const serviceClient = new ImageVersionsClient(); + + async function callListImageVersions() { + // Construct request + const request = { + }; + + // Run request + const iterable = serviceClient.listImageVersionsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListImageVersions(); + // [END composer_v1beta1_generated_ImageVersions_ListImageVersions_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json new file mode 100644 index 00000000000..d44f4eb6465 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json @@ -0,0 +1,1195 @@ +{ + "clientLibrary": { + "name": "nodejs-service", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.orchestration.airflow.service.v1beta1", + "version": "v1beta1" + } + ] + }, + "snippets": [ + { + "regionTag": "composer_v1beta1_generated_Environments_CreateEnvironment_async", + "title": "Environments createEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Create a new environment.", + "canonical": true, + "file": "environments.create_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateEnvironment", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "environment", + "type": ".google.cloud.orchestration.airflow.service.v1beta1.Environment" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "CreateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_GetEnvironment_async", + "title": "Environments getEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Get an existing environment.", + "canonical": true, + "file": "environments.get_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.Environment", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "GetEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_ListEnvironments_async", + "title": "Environments listEnvironments Sample", + "origin": "API_DEFINITION", + "description": " List environments.", + "canonical": true, + "file": "environments.list_environments.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 63, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListEnvironments", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "ListEnvironments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListEnvironments", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_UpdateEnvironment_async", + "title": "Environments updateEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Update an environment.", + "canonical": true, + "file": "environments.update_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 198, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "environment", + "type": ".google.cloud.orchestration.airflow.service.v1beta1.Environment" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "UpdateEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_DeleteEnvironment_async", + "title": "Environments deleteEnvironment Sample", + "origin": "API_DEFINITION", + "description": " Delete an environment.", + "canonical": true, + "file": "environments.delete_environment.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteEnvironment", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "DeleteEnvironment", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteEnvironment", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_RestartWebServer_async", + "title": "Environments restartWebServer Sample", + "origin": "API_DEFINITION", + "description": " Restart Airflow web server.", + "canonical": true, + "file": "environments.restart_web_server.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "RestartWebServer", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.RestartWebServer", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "RestartWebServer", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.RestartWebServer", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_CheckUpgrade_async", + "title": "Environments checkUpgrade Sample", + "origin": "API_DEFINITION", + "description": " Check if an upgrade operation on the environment will succeed. In case of problems detailed info can be found in the returned Operation.", + "canonical": true, + "file": "environments.check_upgrade.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CheckUpgrade", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CheckUpgrade", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + }, + { + "name": "image_version", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "CheckUpgrade", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CheckUpgrade", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_ExecuteAirflowCommand_async", + "title": "Environments executeAirflowCommand Sample", + "origin": "API_DEFINITION", + "description": " Executes Airflow CLI command.", + "canonical": true, + "file": "environments.execute_airflow_command.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 68, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExecuteAirflowCommand", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ExecuteAirflowCommand", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + }, + { + "name": "command", + "type": "TYPE_STRING" + }, + { + "name": "subcommand", + "type": "TYPE_STRING" + }, + { + "name": "parameters", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "ExecuteAirflowCommand", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ExecuteAirflowCommand", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_StopAirflowCommand_async", + "title": "Environments stopAirflowCommand Sample", + "origin": "API_DEFINITION", + "description": " Stops Airflow CLI command execution.", + "canonical": true, + "file": "environments.stop_airflow_command.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "StopAirflowCommand", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.StopAirflowCommand", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + }, + { + "name": "execution_id", + "type": "TYPE_STRING" + }, + { + "name": "pod", + "type": "TYPE_STRING" + }, + { + "name": "pod_namespace", + "type": "TYPE_STRING" + }, + { + "name": "force", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "StopAirflowCommand", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.StopAirflowCommand", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_PollAirflowCommand_async", + "title": "Environments pollAirflowCommand Sample", + "origin": "API_DEFINITION", + "description": " Polls Airflow CLI command execution and fetches logs.", + "canonical": true, + "file": "environments.poll_airflow_command.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 69, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "PollAirflowCommand", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.PollAirflowCommand", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + }, + { + "name": "execution_id", + "type": "TYPE_STRING" + }, + { + "name": "pod", + "type": "TYPE_STRING" + }, + { + "name": "pod_namespace", + "type": "TYPE_STRING" + }, + { + "name": "next_line_number", + "type": "TYPE_INT32" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "PollAirflowCommand", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.PollAirflowCommand", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_ListWorkloads_async", + "title": "Environments listWorkloads Sample", + "origin": "API_DEFINITION", + "description": " Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer component. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.list_workloads.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 74, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListWorkloads", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListWorkloads", + "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" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "ListWorkloads", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListWorkloads", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_CreateUserWorkloadsSecret_async", + "title": "Environments createUserWorkloadsSecret Sample", + "origin": "API_DEFINITION", + "description": " Creates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.create_user_workloads_secret.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateUserWorkloadsSecret", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateUserWorkloadsSecret", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "user_workloads_secret", + "type": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "CreateUserWorkloadsSecret", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateUserWorkloadsSecret", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_GetUserWorkloadsSecret_async", + "title": "Environments getUserWorkloadsSecret Sample", + "origin": "API_DEFINITION", + "description": " Gets an existing user workloads Secret. Values of the \"data\" field in the response are cleared. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.get_user_workloads_secret.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetUserWorkloadsSecret", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetUserWorkloadsSecret", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "GetUserWorkloadsSecret", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetUserWorkloadsSecret", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_ListUserWorkloadsSecrets_async", + "title": "Environments listUserWorkloadsSecrets Sample", + "origin": "API_DEFINITION", + "description": " Lists user workloads Secrets. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.list_user_workloads_secrets.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListUserWorkloadsSecrets", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListUserWorkloadsSecrets", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "ListUserWorkloadsSecrets", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListUserWorkloadsSecrets", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_UpdateUserWorkloadsSecret_async", + "title": "Environments updateUserWorkloadsSecret Sample", + "origin": "API_DEFINITION", + "description": " Updates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.update_user_workloads_secret.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateUserWorkloadsSecret", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateUserWorkloadsSecret", + "async": true, + "parameters": [ + { + "name": "user_workloads_secret", + "type": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "UpdateUserWorkloadsSecret", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateUserWorkloadsSecret", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_DeleteUserWorkloadsSecret_async", + "title": "Environments deleteUserWorkloadsSecret Sample", + "origin": "API_DEFINITION", + "description": " Deletes a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.delete_user_workloads_secret.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteUserWorkloadsSecret", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteUserWorkloadsSecret", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "DeleteUserWorkloadsSecret", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteUserWorkloadsSecret", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_CreateUserWorkloadsConfigMap_async", + "title": "Environments createUserWorkloadsConfigMap Sample", + "origin": "API_DEFINITION", + "description": " Creates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.create_user_workloads_config_map.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateUserWorkloadsConfigMap", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateUserWorkloadsConfigMap", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "user_workloads_config_map", + "type": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "CreateUserWorkloadsConfigMap", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateUserWorkloadsConfigMap", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_GetUserWorkloadsConfigMap_async", + "title": "Environments getUserWorkloadsConfigMap Sample", + "origin": "API_DEFINITION", + "description": " Gets an existing user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.get_user_workloads_config_map.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetUserWorkloadsConfigMap", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetUserWorkloadsConfigMap", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "GetUserWorkloadsConfigMap", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetUserWorkloadsConfigMap", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_ListUserWorkloadsConfigMaps_async", + "title": "Environments listUserWorkloadsConfigMaps Sample", + "origin": "API_DEFINITION", + "description": " Lists user workloads ConfigMaps. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.list_user_workloads_config_maps.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListUserWorkloadsConfigMaps", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListUserWorkloadsConfigMaps", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "ListUserWorkloadsConfigMaps", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListUserWorkloadsConfigMaps", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_UpdateUserWorkloadsConfigMap_async", + "title": "Environments updateUserWorkloadsConfigMap Sample", + "origin": "API_DEFINITION", + "description": " Updates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.update_user_workloads_config_map.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 52, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateUserWorkloadsConfigMap", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateUserWorkloadsConfigMap", + "async": true, + "parameters": [ + { + "name": "user_workloads_config_map", + "type": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "UpdateUserWorkloadsConfigMap", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateUserWorkloadsConfigMap", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_DeleteUserWorkloadsConfigMap_async", + "title": "Environments deleteUserWorkloadsConfigMap Sample", + "origin": "API_DEFINITION", + "description": " Deletes a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", + "canonical": true, + "file": "environments.delete_user_workloads_config_map.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteUserWorkloadsConfigMap", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteUserWorkloadsConfigMap", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "DeleteUserWorkloadsConfigMap", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteUserWorkloadsConfigMap", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_SaveSnapshot_async", + "title": "Environments saveSnapshot Sample", + "origin": "API_DEFINITION", + "description": " Creates a snapshots of a Cloud Composer environment. As a result of this operation, snapshot of environment's state is stored in a location specified in the SaveSnapshotRequest.", + "canonical": true, + "file": "environments.save_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SaveSnapshot", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.SaveSnapshot", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + }, + { + "name": "snapshot_location", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "SaveSnapshot", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.SaveSnapshot", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_LoadSnapshot_async", + "title": "Environments loadSnapshot Sample", + "origin": "API_DEFINITION", + "description": " Loads a snapshot of a Cloud Composer environment. As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest is loaded into the environment.", + "canonical": true, + "file": "environments.load_snapshot.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 79, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "LoadSnapshot", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.LoadSnapshot", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + }, + { + "name": "snapshot_path", + "type": "TYPE_STRING" + }, + { + "name": "skip_pypi_packages_installation", + "type": "TYPE_BOOL" + }, + { + "name": "skip_environment_variables_setting", + "type": "TYPE_BOOL" + }, + { + "name": "skip_airflow_overrides_setting", + "type": "TYPE_BOOL" + }, + { + "name": "skip_gcs_data_copying", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "LoadSnapshot", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.LoadSnapshot", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_DatabaseFailover_async", + "title": "Environments databaseFailover Sample", + "origin": "API_DEFINITION", + "description": " Triggers database failover (only for highly resilient environments).", + "canonical": true, + "file": "environments.database_failover.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DatabaseFailover", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DatabaseFailover", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "DatabaseFailover", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DatabaseFailover", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_Environments_FetchDatabaseProperties_async", + "title": "Environments fetchDatabaseProperties Sample", + "origin": "API_DEFINITION", + "description": " Fetches database properties.", + "canonical": true, + "file": "environments.fetch_database_properties.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "FetchDatabaseProperties", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.FetchDatabaseProperties", + "async": true, + "parameters": [ + { + "name": "environment", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse", + "client": { + "shortName": "EnvironmentsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" + }, + "method": { + "shortName": "FetchDatabaseProperties", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.FetchDatabaseProperties", + "service": { + "shortName": "Environments", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" + } + } + } + }, + { + "regionTag": "composer_v1beta1_generated_ImageVersions_ListImageVersions_async", + "title": "Environments listImageVersions Sample", + "origin": "API_DEFINITION", + "description": " List ImageVersions for provided location.", + "canonical": true, + "file": "image_versions.list_image_versions.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions.ListImageVersions", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "include_past_releases", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse", + "client": { + "shortName": "ImageVersionsClient", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsClient" + }, + "method": { + "shortName": "ListImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions.ListImageVersions", + "service": { + "shortName": "ImageVersions", + "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/index.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/index.ts new file mode 100644 index 00000000000..e71474fce3d --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/index.ts @@ -0,0 +1,27 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 v1beta1 from './v1beta1'; +const EnvironmentsClient = v1beta1.EnvironmentsClient; +type EnvironmentsClient = v1beta1.EnvironmentsClient; +const ImageVersionsClient = v1beta1.ImageVersionsClient; +type ImageVersionsClient = v1beta1.ImageVersionsClient; +export {v1beta1, EnvironmentsClient, ImageVersionsClient}; +export default {v1beta1, EnvironmentsClient, ImageVersionsClient}; +import * as protos from '../protos/protos'; +export {protos} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_client.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_client.ts new file mode 100644 index 00000000000..a20bde03882 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_client.ts @@ -0,0 +1,3431 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); + +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/environments_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './environments_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Managed Apache Airflow Environments. + * @class + * @memberof v1beta1 + */ +export class EnvironmentsClient { + 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; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + operationsClient: gax.OperationsClient; + environmentsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of EnvironmentsClient. + * + * @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://developers.google.com/identity/protocols/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 EnvironmentsClient({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 EnvironmentsClient; + 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 = 'composer.' + 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; + } + + // 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 = { + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/environments/{environment}' + ), + userWorkloadsConfigMapPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}' + ), + userWorkloadsSecretPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}' + ), + }; + + // 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 = { + listEnvironments: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'environments'), + listWorkloads: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'workloads'), + listUserWorkloadsSecrets: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'userWorkloadsSecrets'), + listUserWorkloadsConfigMaps: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'userWorkloadsConfigMaps') + }; + + const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(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.longrunning.Operations.DeleteOperation',delete: '/v1beta1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1beta1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1beta1/{name=projects/*/locations/*}/operations',}]; + } + this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); + const createEnvironmentResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.Environment') as gax.protobuf.Type; + const createEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata') as gax.protobuf.Type; + const updateEnvironmentResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.Environment') as gax.protobuf.Type; + const updateEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata') as gax.protobuf.Type; + const deleteEnvironmentResponse = protoFilesRoot.lookup( + '.google.protobuf.Empty') as gax.protobuf.Type; + const deleteEnvironmentMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata') as gax.protobuf.Type; + const restartWebServerResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.Environment') as gax.protobuf.Type; + const restartWebServerMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata') as gax.protobuf.Type; + const checkUpgradeResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse') as gax.protobuf.Type; + const checkUpgradeMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata') as gax.protobuf.Type; + const saveSnapshotResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse') as gax.protobuf.Type; + const saveSnapshotMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata') as gax.protobuf.Type; + const loadSnapshotResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse') as gax.protobuf.Type; + const loadSnapshotMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata') as gax.protobuf.Type; + const databaseFailoverResponse = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse') as gax.protobuf.Type; + const databaseFailoverMetadata = protoFilesRoot.lookup( + '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata') as gax.protobuf.Type; + + this.descriptors.longrunning = { + createEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + createEnvironmentResponse.decode.bind(createEnvironmentResponse), + createEnvironmentMetadata.decode.bind(createEnvironmentMetadata)), + updateEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + updateEnvironmentResponse.decode.bind(updateEnvironmentResponse), + updateEnvironmentMetadata.decode.bind(updateEnvironmentMetadata)), + deleteEnvironment: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + deleteEnvironmentResponse.decode.bind(deleteEnvironmentResponse), + deleteEnvironmentMetadata.decode.bind(deleteEnvironmentMetadata)), + restartWebServer: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + restartWebServerResponse.decode.bind(restartWebServerResponse), + restartWebServerMetadata.decode.bind(restartWebServerMetadata)), + checkUpgrade: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + checkUpgradeResponse.decode.bind(checkUpgradeResponse), + checkUpgradeMetadata.decode.bind(checkUpgradeMetadata)), + saveSnapshot: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + saveSnapshotResponse.decode.bind(saveSnapshotResponse), + saveSnapshotMetadata.decode.bind(saveSnapshotMetadata)), + loadSnapshot: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + loadSnapshotResponse.decode.bind(loadSnapshotResponse), + loadSnapshotMetadata.decode.bind(loadSnapshotMetadata)), + databaseFailover: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + databaseFailoverResponse.decode.bind(databaseFailoverResponse), + databaseFailoverMetadata.decode.bind(databaseFailoverMetadata)) + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.orchestration.airflow.service.v1beta1.Environments', 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.environmentsStub) { + return this.environmentsStub; + } + + // Put together the "service stub" for + // google.cloud.orchestration.airflow.service.v1beta1.Environments. + this.environmentsStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.orchestration.airflow.service.v1beta1.Environments') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.orchestration.airflow.service.v1beta1.Environments, + 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 environmentsStubMethods = + ['createEnvironment', 'getEnvironment', 'listEnvironments', 'updateEnvironment', 'deleteEnvironment', 'restartWebServer', 'checkUpgrade', 'executeAirflowCommand', 'stopAirflowCommand', 'pollAirflowCommand', 'listWorkloads', 'createUserWorkloadsSecret', 'getUserWorkloadsSecret', 'listUserWorkloadsSecrets', 'updateUserWorkloadsSecret', 'deleteUserWorkloadsSecret', 'createUserWorkloadsConfigMap', 'getUserWorkloadsConfigMap', 'listUserWorkloadsConfigMaps', 'updateUserWorkloadsConfigMap', 'deleteUserWorkloadsConfigMap', 'saveSnapshot', 'loadSnapshot', 'databaseFailover', 'fetchDatabaseProperties']; + for (const methodName of environmentsStubMethods) { + const callPromise = this.environmentsStub.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.environmentsStub; + } + + /** + * 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 'composer.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 'composer.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 -- + // ------------------- +/** + * Get an existing environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource name of the environment to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @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.orchestration.airflow.service.v1beta1.Environment|Environment}. + * 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/v1beta1/environments.get_environment.js + * region_tag:composer_v1beta1_generated_Environments_GetEnvironment_async + */ + getEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest|undefined, {}|undefined + ]>; + getEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>): void; + getEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>): void; + getEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest|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(); + return this.innerApiCalls.getEnvironment(request, options, callback); + } +/** + * Executes Airflow CLI command. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + * @param {string} request.command + * Airflow command. + * @param {string} request.subcommand + * Airflow subcommand. + * @param {string[]} request.parameters + * Parameters for the Airflow command/subcommand as an array of arguments. + * It may contain positional arguments like `["my-dag-id"]`, key-value + * parameters like `["--foo=bar"]` or `["--foo","bar"]`, + * or other flags like `["-f"]`. + * @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.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse|ExecuteAirflowCommandResponse}. + * 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/v1beta1/environments.execute_airflow_command.js + * region_tag:composer_v1beta1_generated_Environments_ExecuteAirflowCommand_async + */ + executeAirflowCommand( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest|undefined, {}|undefined + ]>; + executeAirflowCommand( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest|null|undefined, + {}|null|undefined>): void; + executeAirflowCommand( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest|null|undefined, + {}|null|undefined>): void; + executeAirflowCommand( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest|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({ + 'environment': request.environment ?? '', + }); + this.initialize(); + return this.innerApiCalls.executeAirflowCommand(request, options, callback); + } +/** + * Stops Airflow CLI command execution. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". + * @param {string} request.executionId + * The unique ID of the command execution. + * @param {string} request.pod + * The name of the pod where the command is executed. + * @param {string} request.podNamespace + * The namespace of the pod where the command is executed. + * @param {boolean} request.force + * If true, the execution is terminated forcefully (SIGKILL). If false, the + * execution is stopped gracefully, giving it time for cleanup. + * @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.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse|StopAirflowCommandResponse}. + * 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/v1beta1/environments.stop_airflow_command.js + * region_tag:composer_v1beta1_generated_Environments_StopAirflowCommand_async + */ + stopAirflowCommand( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest|undefined, {}|undefined + ]>; + stopAirflowCommand( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest|null|undefined, + {}|null|undefined>): void; + stopAirflowCommand( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest|null|undefined, + {}|null|undefined>): void; + stopAirflowCommand( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest|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({ + 'environment': request.environment ?? '', + }); + this.initialize(); + return this.innerApiCalls.stopAirflowCommand(request, options, callback); + } +/** + * Polls Airflow CLI command execution and fetches logs. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * The resource name of the environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {string} request.executionId + * The unique ID of the command execution. + * @param {string} request.pod + * The name of the pod where the command is executed. + * @param {string} request.podNamespace + * The namespace of the pod where the command is executed. + * @param {number} request.nextLineNumber + * Line number from which new logs should be fetched. + * @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.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse|PollAirflowCommandResponse}. + * 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/v1beta1/environments.poll_airflow_command.js + * region_tag:composer_v1beta1_generated_Environments_PollAirflowCommand_async + */ + pollAirflowCommand( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest|undefined, {}|undefined + ]>; + pollAirflowCommand( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest|null|undefined, + {}|null|undefined>): void; + pollAirflowCommand( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest|null|undefined, + {}|null|undefined>): void; + pollAirflowCommand( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest|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({ + 'environment': request.environment ?? '', + }); + this.initialize(); + return this.innerApiCalls.pollAirflowCommand(request, options, callback); + } +/** + * Creates a user workloads Secret. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The environment name to create a Secret for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} request.userWorkloadsSecret + * Required. User workloads Secret to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret|UserWorkloadsSecret}. + * 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/v1beta1/environments.create_user_workloads_secret.js + * region_tag:composer_v1beta1_generated_Environments_CreateUserWorkloadsSecret_async + */ + createUserWorkloadsSecret( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest|undefined, {}|undefined + ]>; + createUserWorkloadsSecret( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): void; + createUserWorkloadsSecret( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): void; + createUserWorkloadsSecret( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest|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(); + return this.innerApiCalls.createUserWorkloadsSecret(request, options, callback); + } +/** + * Gets an existing user workloads Secret. + * Values of the "data" field in the response are cleared. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the Secret to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * @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.orchestration.airflow.service.v1beta1.UserWorkloadsSecret|UserWorkloadsSecret}. + * 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/v1beta1/environments.get_user_workloads_secret.js + * region_tag:composer_v1beta1_generated_Environments_GetUserWorkloadsSecret_async + */ + getUserWorkloadsSecret( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest|undefined, {}|undefined + ]>; + getUserWorkloadsSecret( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): void; + getUserWorkloadsSecret( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): void; + getUserWorkloadsSecret( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest|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(); + return this.innerApiCalls.getUserWorkloadsSecret(request, options, callback); + } +/** + * Updates a user workloads Secret. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} [request.userWorkloadsSecret] + * Optional. User workloads Secret to override. + * @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.orchestration.airflow.service.v1beta1.UserWorkloadsSecret|UserWorkloadsSecret}. + * 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/v1beta1/environments.update_user_workloads_secret.js + * region_tag:composer_v1beta1_generated_Environments_UpdateUserWorkloadsSecret_async + */ + updateUserWorkloadsSecret( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest|undefined, {}|undefined + ]>; + updateUserWorkloadsSecret( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): void; + updateUserWorkloadsSecret( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): void; + updateUserWorkloadsSecret( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest|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({ + 'user_workloads_secret.name': request.userWorkloadsSecret!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateUserWorkloadsSecret(request, options, callback); + } +/** + * Deletes a user workloads Secret. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The Secret to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" + * @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.protobuf.Empty|Empty}. + * 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/v1beta1/environments.delete_user_workloads_secret.js + * region_tag:composer_v1beta1_generated_Environments_DeleteUserWorkloadsSecret_async + */ + deleteUserWorkloadsSecret( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest|undefined, {}|undefined + ]>; + deleteUserWorkloadsSecret( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): void; + deleteUserWorkloadsSecret( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): void; + deleteUserWorkloadsSecret( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest|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(); + return this.innerApiCalls.deleteUserWorkloadsSecret(request, options, callback); + } +/** + * Creates a user workloads ConfigMap. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The environment name to create a ConfigMap for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} request.userWorkloadsConfigMap + * Required. User workloads ConfigMap to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. + * 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/v1beta1/environments.create_user_workloads_config_map.js + * region_tag:composer_v1beta1_generated_Environments_CreateUserWorkloadsConfigMap_async + */ + createUserWorkloadsConfigMap( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest|undefined, {}|undefined + ]>; + createUserWorkloadsConfigMap( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): void; + createUserWorkloadsConfigMap( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): void; + createUserWorkloadsConfigMap( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest|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(); + return this.innerApiCalls.createUserWorkloadsConfigMap(request, options, callback); + } +/** + * Gets an existing user workloads ConfigMap. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the ConfigMap to get, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * @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.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. + * 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/v1beta1/environments.get_user_workloads_config_map.js + * region_tag:composer_v1beta1_generated_Environments_GetUserWorkloadsConfigMap_async + */ + getUserWorkloadsConfigMap( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest|undefined, {}|undefined + ]>; + getUserWorkloadsConfigMap( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): void; + getUserWorkloadsConfigMap( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): void; + getUserWorkloadsConfigMap( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest|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(); + return this.innerApiCalls.getUserWorkloadsConfigMap(request, options, callback); + } +/** + * Updates a user workloads ConfigMap. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} [request.userWorkloadsConfigMap] + * Optional. User workloads ConfigMap to override. + * @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.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. + * 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/v1beta1/environments.update_user_workloads_config_map.js + * region_tag:composer_v1beta1_generated_Environments_UpdateUserWorkloadsConfigMap_async + */ + updateUserWorkloadsConfigMap( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest|undefined, {}|undefined + ]>; + updateUserWorkloadsConfigMap( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): void; + updateUserWorkloadsConfigMap( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): void; + updateUserWorkloadsConfigMap( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest|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({ + 'user_workloads_config_map.name': request.userWorkloadsConfigMap!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateUserWorkloadsConfigMap(request, options, callback); + } +/** + * Deletes a user workloads ConfigMap. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The ConfigMap to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" + * @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.protobuf.Empty|Empty}. + * 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/v1beta1/environments.delete_user_workloads_config_map.js + * region_tag:composer_v1beta1_generated_Environments_DeleteUserWorkloadsConfigMap_async + */ + deleteUserWorkloadsConfigMap( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest, + options?: CallOptions): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest|undefined, {}|undefined + ]>; + deleteUserWorkloadsConfigMap( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): void; + deleteUserWorkloadsConfigMap( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): void; + deleteUserWorkloadsConfigMap( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.protobuf.IEmpty, + protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest|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(); + return this.innerApiCalls.deleteUserWorkloadsConfigMap(request, options, callback); + } +/** + * Fetches database properties. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * Required. The resource name of the environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @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.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse|FetchDatabasePropertiesResponse}. + * 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/v1beta1/environments.fetch_database_properties.js + * region_tag:composer_v1beta1_generated_Environments_FetchDatabaseProperties_async + */ + fetchDatabaseProperties( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest|undefined, {}|undefined + ]>; + fetchDatabaseProperties( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest|null|undefined, + {}|null|undefined>): void; + fetchDatabaseProperties( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest, + callback: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest|null|undefined, + {}|null|undefined>): void; + fetchDatabaseProperties( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest, + optionsOrCallback?: CallOptions|Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest|null|undefined, + {}|null|undefined>, + callback?: Callback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest|null|undefined, + {}|null|undefined>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse, + protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest|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({ + 'environment': request.environment ?? '', + }); + this.initialize(); + return this.innerApiCalls.fetchDatabaseProperties(request, options, callback); + } + +/** + * Create a new environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * The parent must be of the form + * "projects/{projectId}/locations/{locationId}". + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environment} request.environment + * The environment to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1beta1/environments.create_environment.js + * region_tag:composer_v1beta1_generated_Environments_CreateEnvironment_async + */ + createEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + createEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + createEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, + 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(); + return this.innerApiCalls.createEnvironment(request, options, callback); + } +/** + * Check the status of the long running operation returned by `createEnvironment()`. + * @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/v1beta1/environments.create_environment.js + * region_tag:composer_v1beta1_generated_Environments_CreateEnvironment_async + */ + async checkCreateEnvironmentProgress(name: string): Promise>{ + 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.createEnvironment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Update an environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The relative resource name of the environment to update, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {google.cloud.orchestration.airflow.service.v1beta1.Environment} request.environment + * A patch environment. Fields specified by the `updateMask` will be copied + * from the patch environment into the environment under update. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. A comma-separated list of paths, relative to `Environment`, of + * fields to update. + * For example, to set the version of scikit-learn to install in the + * environment to 0.19.0 and to remove an existing installation of + * argparse, the `updateMask` parameter would include the following two + * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and + * "config.softwareConfig.pypiPackages.argparse". The included patch + * environment would specify the scikit-learn version as follows: + * + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "scikit-learn":"==0.19.0" + * } + * } + * } + * } + * + * Note that in the above example, any existing PyPI packages + * other than scikit-learn and argparse will be unaffected. + * + * Only one update type may be included in a single request's `updateMask`. + * For example, one cannot update both the PyPI packages and + * labels in the same request. However, it is possible to update multiple + * members of a map field simultaneously in the same request. For example, + * to set the labels "label1" and "label2" while clearing "label3" (assuming + * it already exists), one can + * provide the paths "labels.label1", "labels.label2", and "labels.label3" + * and populate the patch environment as follows: + * + * { + * "labels":{ + * "label1":"new-label1-value" + * "label2":"new-label2-value" + * } + * } + * + * Note that in the above example, any existing labels that are not + * included in the `updateMask` will be unaffected. + * + * It is also possible to replace an entire map field by providing the + * map field's path in the `updateMask`. The new value of the field will + * be that which is provided in the patch environment. For example, to + * delete all pre-existing user-specified PyPI packages and + * install botocore at version 1.7.14, the `updateMask` would contain + * the path "config.softwareConfig.pypiPackages", and + * the patch environment would be the following: + * + * { + * "config":{ + * "softwareConfig":{ + * "pypiPackages":{ + * "botocore":"==1.7.14" + * } + * } + * } + * } + * + * **Note:** Only the following fields can be updated: + * + * * `config.softwareConfig.pypiPackages` + * * Replace all custom custom PyPI packages. If a replacement + * package map is not included in `environment`, all custom + * PyPI packages are cleared. It is an error to provide both + * this mask and a mask specifying an individual package. + * * `config.softwareConfig.pypiPackages.`packagename + * * Update the custom PyPI package *packagename*, + * preserving other packages. To delete the package, include it in + * `updateMask`, and omit the mapping for it in + * `environment.config.softwareConfig.pypiPackages`. It is an error + * to provide both a mask of this form and the + * `config.softwareConfig.pypiPackages` mask. + * * `labels` + * * Replace all environment labels. If a replacement labels map is not + * included in `environment`, all labels are cleared. It is an error to + * provide both this mask and a mask specifying one or more individual + * labels. + * * `labels.`labelName + * * Set the label named *labelName*, while preserving other + * labels. To delete the label, include it in `updateMask` and omit its + * mapping in `environment.labels`. It is an error to provide both a + * mask of this form and the `labels` mask. + * * `config.nodeCount` + * * Horizontally scale the number of nodes in the environment. An integer + * greater than or equal to 3 must be provided in the `config.nodeCount` + * field. Supported for Cloud Composer environments in versions + * composer-1.*.*-airflow-*.*.*. + * * `config.webServerNetworkAccessControl` + * * Replace the environment's current WebServerNetworkAccessControl. + * * `config.softwareConfig.airflowConfigOverrides` + * * Replace all Apache Airflow config overrides. If a replacement config + * overrides map is not included in `environment`, all config overrides + * are cleared. + * It is an error to provide both this mask and a mask specifying one or + * more individual config overrides. + * * `config.softwareConfig.airflowConfigOverrides.`section-name + * * Override the Apache Airflow config property *name* in the + * section named *section*, preserving other properties. To + * delete the property override, include it in `updateMask` and omit its + * mapping in + * `environment.config.softwareConfig.airflowConfigOverrides`. + * It is an error to provide both a mask of this form and the + * `config.softwareConfig.airflowConfigOverrides` mask. + * * `config.softwareConfig.envVariables` + * * Replace all environment variables. If a replacement environment + * variable map is not included in `environment`, all custom environment + * variables are cleared. + * * `config.softwareConfig.imageVersion` + * * Upgrade the version of the environment in-place. Refer to + * `SoftwareConfig.image_version` for information on how to format the + * new image version. Additionally, the new image version cannot effect + * a version downgrade, and must match the current image version's + * Composer and Airflow major versions. Consult the [Cloud Composer + * version list](/composer/docs/concepts/versioning/composer-versions) + * for valid values. + * * `config.softwareConfig.schedulerCount` + * * Horizontally scale the number of schedulers in Airflow. A positive + * integer not greater than the number of nodes must be provided in the + * `config.softwareConfig.schedulerCount` field. Supported for Cloud + * Composer environments in versions composer-1.*.*-airflow-2.*.*. + * * `config.softwareConfig.cloudDataLineageIntegration` + * * Configuration for Cloud Data Lineage integration. + * * `config.databaseConfig.machineType` + * * Cloud SQL machine type used by Airflow database. + * It has to be one of: db-n1-standard-2, db-n1-standard-4, + * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer + * environments in versions composer-1.*.*-airflow-*.*.*. + * * `config.webServerConfig.machineType` + * * Machine type on which Airflow web server is running. + * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 + * or composer-n1-webserver-8. Supported for Cloud Composer environments + * in versions composer-1.*.*-airflow-*.*.*. + * * `config.maintenanceWindow` + * * Maintenance window during which Cloud Composer components may be + * under maintenance. + * * `config.workloadsConfig` + * * The workloads configuration settings for the GKE cluster associated + * with the Cloud Composer environment. Supported for Cloud Composer + * environments in versions composer-2.*.*-airflow-*.*.* and newer. + * * `config.environmentSize` + * * The size of the Cloud Composer environment. Supported for Cloud + * Composer environments in versions composer-2.*.*-airflow-*.*.* and + * newer. + * @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/v1beta1/environments.update_environment.js + * region_tag:composer_v1beta1_generated_Environments_UpdateEnvironment_async + */ + updateEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + updateEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + updateEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, + 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(); + return this.innerApiCalls.updateEnvironment(request, options, callback); + } +/** + * Check the status of the long running operation returned by `updateEnvironment()`. + * @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/v1beta1/environments.update_environment.js + * region_tag:composer_v1beta1_generated_Environments_UpdateEnvironment_async + */ + async checkUpdateEnvironmentProgress(name: string): Promise>{ + 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.updateEnvironment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Delete an environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The environment to delete, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @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/v1beta1/environments.delete_environment.js + * region_tag:composer_v1beta1_generated_Environments_DeleteEnvironment_async + */ + deleteEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + deleteEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteEnvironment( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + deleteEnvironment( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, + 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(); + return this.innerApiCalls.deleteEnvironment(request, options, callback); + } +/** + * Check the status of the long running operation returned by `deleteEnvironment()`. + * @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/v1beta1/environments.delete_environment.js + * region_tag:composer_v1beta1_generated_Environments_DeleteEnvironment_async + */ + async checkDeleteEnvironmentProgress(name: string): Promise>{ + 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.deleteEnvironment, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Restart Airflow web server. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * The resource name of the environment to restart the web server for, in the + * form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @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/v1beta1/environments.restart_web_server.js + * region_tag:composer_v1beta1_generated_Environments_RestartWebServer_async + */ + restartWebServer( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + restartWebServer( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + restartWebServer( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + restartWebServer( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, + 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(); + return this.innerApiCalls.restartWebServer(request, options, callback); + } +/** + * Check the status of the long running operation returned by `restartWebServer()`. + * @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/v1beta1/environments.restart_web_server.js + * region_tag:composer_v1beta1_generated_Environments_RestartWebServer_async + */ + async checkRestartWebServerProgress(name: string): Promise>{ + 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.restartWebServer, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Check if an upgrade operation on the environment will succeed. + * + * In case of problems detailed info can be found in the returned Operation. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * The resource name of the environment to check upgrade for, in the + * form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {string} request.imageVersion + * The version of the software running in the environment. + * This encapsulates both the version of Cloud Composer functionality and the + * version of Apache Airflow. It must match the regular expression + * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. + * When used as input, the server also checks if the provided version is + * supported and denies the request for an unsupported version. + * + * The Cloud Composer portion of the image version is a full + * [semantic version](https://semver.org), or an alias in the form of major + * version number or `latest`. When an alias is provided, the server replaces + * it with the current Cloud Composer version that satisfies the alias. + * + * The Apache Airflow portion of the image version is a full semantic version + * that points to one of the supported Apache Airflow versions, or an alias in + * the form of only major or major.minor versions specified. When an alias is + * provided, the server replaces it with the latest Apache Airflow version + * that satisfies the alias and is supported in the given Cloud Composer + * version. + * + * In all cases, the resolved image version is stored in the same field. + * + * See also [version + * list](/composer/docs/concepts/versioning/composer-versions) and [versioning + * overview](/composer/docs/concepts/versioning/composer-versioning-overview). + * @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/v1beta1/environments.check_upgrade.js + * region_tag:composer_v1beta1_generated_Environments_CheckUpgrade_async + */ + checkUpgrade( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + checkUpgrade( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + checkUpgrade( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + checkUpgrade( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, + 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({ + 'environment': request.environment ?? '', + }); + this.initialize(); + return this.innerApiCalls.checkUpgrade(request, options, callback); + } +/** + * Check the status of the long running operation returned by `checkUpgrade()`. + * @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/v1beta1/environments.check_upgrade.js + * region_tag:composer_v1beta1_generated_Environments_CheckUpgrade_async + */ + async checkCheckUpgradeProgress(name: string): Promise>{ + 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.checkUpgrade, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Creates a snapshots of a Cloud Composer environment. + * + * As a result of this operation, snapshot of environment's state is stored + * in a location specified in the SaveSnapshotRequest. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * The resource name of the source environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {string} request.snapshotLocation + * Location in a Cloud Storage where the snapshot is going to be stored, e.g.: + * "gs://my-bucket/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/v1beta1/environments.save_snapshot.js + * region_tag:composer_v1beta1_generated_Environments_SaveSnapshot_async + */ + saveSnapshot( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + saveSnapshot( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + saveSnapshot( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + saveSnapshot( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest, + 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({ + 'environment': request.environment ?? '', + }); + this.initialize(); + return this.innerApiCalls.saveSnapshot(request, options, callback); + } +/** + * Check the status of the long running operation returned by `saveSnapshot()`. + * @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/v1beta1/environments.save_snapshot.js + * region_tag:composer_v1beta1_generated_Environments_SaveSnapshot_async + */ + async checkSaveSnapshotProgress(name: string): Promise>{ + 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.saveSnapshot, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Loads a snapshot of a Cloud Composer environment. + * + * As a result of this operation, a snapshot of environment's specified in + * LoadSnapshotRequest is loaded into the environment. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * The resource name of the target environment in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {string} request.snapshotPath + * A Cloud Storage path to a snapshot to load, e.g.: + * "gs://my-bucket/snapshots/project_location_environment_timestamp". + * @param {boolean} request.skipPypiPackagesInstallation + * Whether or not to skip installing Pypi packages when loading the + * environment's state. + * @param {boolean} request.skipEnvironmentVariablesSetting + * Whether or not to skip setting environment variables when loading the + * environment's state. + * @param {boolean} request.skipAirflowOverridesSetting + * Whether or not to skip setting Airflow overrides when loading the + * environment's state. + * @param {boolean} request.skipGcsDataCopying + * Whether or not to skip copying Cloud Storage data when loading the + * environment's state. + * @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/v1beta1/environments.load_snapshot.js + * region_tag:composer_v1beta1_generated_Environments_LoadSnapshot_async + */ + loadSnapshot( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + loadSnapshot( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + loadSnapshot( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + loadSnapshot( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest, + 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({ + 'environment': request.environment ?? '', + }); + this.initialize(); + return this.innerApiCalls.loadSnapshot(request, options, callback); + } +/** + * Check the status of the long running operation returned by `loadSnapshot()`. + * @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/v1beta1/environments.load_snapshot.js + * region_tag:composer_v1beta1_generated_Environments_LoadSnapshot_async + */ + async checkLoadSnapshotProgress(name: string): Promise>{ + 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.loadSnapshot, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } +/** + * Triggers database failover (only for highly resilient environments). + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.environment + * Target environment: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @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/v1beta1/environments.database_failover.js + * region_tag:composer_v1beta1_generated_Environments_DatabaseFailover_async + */ + databaseFailover( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest, + options?: CallOptions): + Promise<[ + LROperation, + protos.google.longrunning.IOperation|undefined, {}|undefined + ]>; + databaseFailover( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest, + options: CallOptions, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + databaseFailover( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest, + callback: Callback< + LROperation, + protos.google.longrunning.IOperation|null|undefined, + {}|null|undefined>): void; + databaseFailover( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest, + 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({ + 'environment': request.environment ?? '', + }); + this.initialize(); + return this.innerApiCalls.databaseFailover(request, options, callback); + } +/** + * Check the status of the long running operation returned by `databaseFailover()`. + * @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/v1beta1/environments.database_failover.js + * region_tag:composer_v1beta1_generated_Environments_DatabaseFailover_async + */ + async checkDatabaseFailoverProgress(name: string): Promise>{ + 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.databaseFailover, this._gaxModule.createDefaultBackoffSettings()); + return decodeOperation as LROperation; + } + /** + * List environments. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of environments to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @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.orchestration.airflow.service.v1beta1.Environment|Environment}. + * 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 `listEnvironmentsAsync()` + * 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. + */ + listEnvironments( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[], + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse + ]>; + listEnvironments( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment>): void; + listEnvironments( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment>): void; + listEnvironments( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment>, + callback?: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[], + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse + ]>|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(); + return this.innerApiCalls.listEnvironments(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of environments to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @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.orchestration.airflow.service.v1beta1.Environment|Environment} 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 `listEnvironmentsAsync()` + * 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. + */ + listEnvironmentsStream( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + 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['listEnvironments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEnvironments.createStream( + this.innerApiCalls.listEnvironments as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listEnvironments`, 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 + * List environments in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of environments to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @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.orchestration.airflow.service.v1beta1.Environment|Environment}. 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/v1beta1/environments.list_environments.js + * region_tag:composer_v1beta1_generated_Environments_ListEnvironments_async + */ + listEnvironmentsAsync( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, + 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['listEnvironments']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listEnvironments.asyncIterate( + this.innerApiCalls['listEnvironments'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists workloads in a Cloud Composer environment. Workload is a unit that + * runs a single Composer component. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The environment name to get workloads for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of environments to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @param {string} [request.filter] + * Optional. The list filter. + * Currently only supports equality on the type field. The value of a field + * specified in the filter expression must be one ComposerWorkloadType enum + * option. It's possible to get multiple types using "OR" operator, e.g.: + * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are + * returned. + * @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.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload|ComposerWorkload}. + * 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 `listWorkloadsAsync()` + * 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. + */ + listWorkloads( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload[], + protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse + ]>; + listWorkloads( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload>): void; + listWorkloads( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload>): void; + listWorkloads( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload>, + callback?: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload[], + protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse + ]>|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(); + return this.innerApiCalls.listWorkloads(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The environment name to get workloads for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of environments to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @param {string} [request.filter] + * Optional. The list filter. + * Currently only supports equality on the type field. The value of a field + * specified in the filter expression must be one ComposerWorkloadType enum + * option. It's possible to get multiple types using "OR" operator, e.g.: + * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are + * returned. + * @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.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload|ComposerWorkload} 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 `listWorkloadsAsync()` + * 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. + */ + listWorkloadsStream( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, + 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['listWorkloads']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkloads.createStream( + this.innerApiCalls.listWorkloads as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listWorkloads`, 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 environment name to get workloads for, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of environments to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @param {string} [request.filter] + * Optional. The list filter. + * Currently only supports equality on the type field. The value of a field + * specified in the filter expression must be one ComposerWorkloadType enum + * option. It's possible to get multiple types using "OR" operator, e.g.: + * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are + * returned. + * @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.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload|ComposerWorkload}. 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/v1beta1/environments.list_workloads.js + * region_tag:composer_v1beta1_generated_Environments_ListWorkloads_async + */ + listWorkloadsAsync( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, + 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['listWorkloads']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listWorkloads.asyncIterate( + this.innerApiCalls['listWorkloads'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists user workloads Secrets. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. List Secrets in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of Secrets to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @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.orchestration.airflow.service.v1beta1.UserWorkloadsSecret|UserWorkloadsSecret}. + * 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 `listUserWorkloadsSecretsAsync()` + * 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. + */ + listUserWorkloadsSecrets( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret[], + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse + ]>; + listUserWorkloadsSecrets( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret>): void; + listUserWorkloadsSecrets( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret>): void; + listUserWorkloadsSecrets( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret>, + callback?: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret[], + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse + ]>|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(); + return this.innerApiCalls.listUserWorkloadsSecrets(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. List Secrets in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of Secrets to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @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.orchestration.airflow.service.v1beta1.UserWorkloadsSecret|UserWorkloadsSecret} 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 `listUserWorkloadsSecretsAsync()` + * 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. + */ + listUserWorkloadsSecretsStream( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, + 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['listUserWorkloadsSecrets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listUserWorkloadsSecrets.createStream( + this.innerApiCalls.listUserWorkloadsSecrets as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listUserWorkloadsSecrets`, 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. List Secrets in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of Secrets to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @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.orchestration.airflow.service.v1beta1.UserWorkloadsSecret|UserWorkloadsSecret}. 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/v1beta1/environments.list_user_workloads_secrets.js + * region_tag:composer_v1beta1_generated_Environments_ListUserWorkloadsSecrets_async + */ + listUserWorkloadsSecretsAsync( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, + 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['listUserWorkloadsSecrets']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listUserWorkloadsSecrets.asyncIterate( + this.innerApiCalls['listUserWorkloadsSecrets'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + /** + * Lists user workloads ConfigMaps. + * + * This method is supported for Cloud Composer environments in versions + * composer-3.*.*-airflow-*.*.* and newer. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. List ConfigMaps in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of ConfigMaps to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @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.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. + * 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 `listUserWorkloadsConfigMapsAsync()` + * 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. + */ + listUserWorkloadsConfigMaps( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap[], + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse + ]>; + listUserWorkloadsConfigMaps( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap>): void; + listUserWorkloadsConfigMaps( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap>): void; + listUserWorkloadsConfigMaps( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap>, + callback?: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap[], + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse + ]>|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(); + return this.innerApiCalls.listUserWorkloadsConfigMaps(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. List ConfigMaps in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of ConfigMaps to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @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.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap|UserWorkloadsConfigMap} 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 `listUserWorkloadsConfigMapsAsync()` + * 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. + */ + listUserWorkloadsConfigMapsStream( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, + 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['listUserWorkloadsConfigMaps']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listUserWorkloadsConfigMaps.createStream( + this.innerApiCalls.listUserWorkloadsConfigMaps as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listUserWorkloadsConfigMaps`, 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. List ConfigMaps in the given environment, in the form: + * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" + * @param {number} [request.pageSize] + * Optional. The maximum number of ConfigMaps to return. + * @param {string} [request.pageToken] + * Optional. The next_page_token value returned from a previous List request, + * if any. + * @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.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. 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/v1beta1/environments.list_user_workloads_config_maps.js + * region_tag:composer_v1beta1_generated_Environments_ListUserWorkloadsConfigMaps_async + */ + listUserWorkloadsConfigMapsAsync( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, + 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['listUserWorkloadsConfigMaps']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate( + this.innerApiCalls['listUserWorkloadsConfigMaps'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } +/** + * 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, + options?: + | 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]> { + 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 { + 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, + options?: + | gax.CallOptions + | Callback< + protos.google.protobuf.Empty, + protos.google.longrunning.CancelOperationRequest, + {} | undefined | null + >, + callback?: Callback< + protos.google.longrunning.CancelOperationRequest, + protos.google.protobuf.Empty, + {} | undefined | null + > + ): Promise { + 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, + options?: + | 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 { + return this.operationsClient.deleteOperation(request, options, callback); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project:string,location:string,environment:string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).location; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + } + + /** + * Return a fully-qualified userWorkloadsConfigMap resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} environment + * @param {string} user_workloads_config_map + * @returns {string} Resource name string. + */ + userWorkloadsConfigMapPath(project:string,location:string,environment:string,userWorkloadsConfigMap:string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.render({ + project: project, + location: location, + environment: environment, + user_workloads_config_map: userWorkloadsConfigMap, + }); + } + + /** + * Parse the project from UserWorkloadsConfigMap resource. + * + * @param {string} userWorkloadsConfigMapName + * A fully-qualified path representing UserWorkloadsConfigMap resource. + * @returns {string} A string representing the project. + */ + matchProjectFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).project; + } + + /** + * Parse the location from UserWorkloadsConfigMap resource. + * + * @param {string} userWorkloadsConfigMapName + * A fully-qualified path representing UserWorkloadsConfigMap resource. + * @returns {string} A string representing the location. + */ + matchLocationFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).location; + } + + /** + * Parse the environment from UserWorkloadsConfigMap resource. + * + * @param {string} userWorkloadsConfigMapName + * A fully-qualified path representing UserWorkloadsConfigMap resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).environment; + } + + /** + * Parse the user_workloads_config_map from UserWorkloadsConfigMap resource. + * + * @param {string} userWorkloadsConfigMapName + * A fully-qualified path representing UserWorkloadsConfigMap resource. + * @returns {string} A string representing the user_workloads_config_map. + */ + matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).user_workloads_config_map; + } + + /** + * Return a fully-qualified userWorkloadsSecret resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} environment + * @param {string} user_workloads_secret + * @returns {string} Resource name string. + */ + userWorkloadsSecretPath(project:string,location:string,environment:string,userWorkloadsSecret:string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.render({ + project: project, + location: location, + environment: environment, + user_workloads_secret: userWorkloadsSecret, + }); + } + + /** + * Parse the project from UserWorkloadsSecret resource. + * + * @param {string} userWorkloadsSecretName + * A fully-qualified path representing UserWorkloadsSecret resource. + * @returns {string} A string representing the project. + */ + matchProjectFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).project; + } + + /** + * Parse the location from UserWorkloadsSecret resource. + * + * @param {string} userWorkloadsSecretName + * A fully-qualified path representing UserWorkloadsSecret resource. + * @returns {string} A string representing the location. + */ + matchLocationFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).location; + } + + /** + * Parse the environment from UserWorkloadsSecret resource. + * + * @param {string} userWorkloadsSecretName + * A fully-qualified path representing UserWorkloadsSecret resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).environment; + } + + /** + * Parse the user_workloads_secret from UserWorkloadsSecret resource. + * + * @param {string} userWorkloadsSecretName + * A fully-qualified path representing UserWorkloadsSecret resource. + * @returns {string} A string representing the user_workloads_secret. + */ + matchUserWorkloadsSecretFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).user_workloads_secret; + } + + /** + * 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.environmentsStub && !this._terminated) { + return this.environmentsStub.then(stub => { + this._terminated = true; + stub.close(); + this.operationsClient.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_client_config.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_client_config.json new file mode 100644 index 00000000000..22c8786ee75 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_client_config.json @@ -0,0 +1,126 @@ +{ + "interfaces": { + "google.cloud.orchestration.airflow.service.v1beta1.Environments": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "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 + } + }, + "methods": { + "CreateEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListEnvironments": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteEnvironment": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "RestartWebServer": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CheckUpgrade": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ExecuteAirflowCommand": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "StopAirflowCommand": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "PollAirflowCommand": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListWorkloads": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateUserWorkloadsSecret": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetUserWorkloadsSecret": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListUserWorkloadsSecrets": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateUserWorkloadsSecret": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteUserWorkloadsSecret": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CreateUserWorkloadsConfigMap": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetUserWorkloadsConfigMap": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListUserWorkloadsConfigMaps": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateUserWorkloadsConfigMap": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DeleteUserWorkloadsConfigMap": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "SaveSnapshot": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "LoadSnapshot": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "DatabaseFailover": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "FetchDatabaseProperties": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_proto_list.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_proto_list.json new file mode 100644 index 00000000000..c854c306722 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto", + "../../protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto", + "../../protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto" +] diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/gapic_metadata.json new file mode 100644 index 00000000000..bd6361e3308 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/gapic_metadata.json @@ -0,0 +1,317 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.orchestration.airflow.service.v1beta1", + "libraryPackage": "@google-cloud/orchestration-airflow", + "services": { + "Environments": { + "clients": { + "grpc": { + "libraryClient": "EnvironmentsClient", + "rpcs": { + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "ExecuteAirflowCommand": { + "methods": [ + "executeAirflowCommand" + ] + }, + "StopAirflowCommand": { + "methods": [ + "stopAirflowCommand" + ] + }, + "PollAirflowCommand": { + "methods": [ + "pollAirflowCommand" + ] + }, + "CreateUserWorkloadsSecret": { + "methods": [ + "createUserWorkloadsSecret" + ] + }, + "GetUserWorkloadsSecret": { + "methods": [ + "getUserWorkloadsSecret" + ] + }, + "UpdateUserWorkloadsSecret": { + "methods": [ + "updateUserWorkloadsSecret" + ] + }, + "DeleteUserWorkloadsSecret": { + "methods": [ + "deleteUserWorkloadsSecret" + ] + }, + "CreateUserWorkloadsConfigMap": { + "methods": [ + "createUserWorkloadsConfigMap" + ] + }, + "GetUserWorkloadsConfigMap": { + "methods": [ + "getUserWorkloadsConfigMap" + ] + }, + "UpdateUserWorkloadsConfigMap": { + "methods": [ + "updateUserWorkloadsConfigMap" + ] + }, + "DeleteUserWorkloadsConfigMap": { + "methods": [ + "deleteUserWorkloadsConfigMap" + ] + }, + "FetchDatabaseProperties": { + "methods": [ + "fetchDatabaseProperties" + ] + }, + "CreateEnvironment": { + "methods": [ + "createEnvironment" + ] + }, + "UpdateEnvironment": { + "methods": [ + "updateEnvironment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "deleteEnvironment" + ] + }, + "RestartWebServer": { + "methods": [ + "restartWebServer" + ] + }, + "CheckUpgrade": { + "methods": [ + "checkUpgrade" + ] + }, + "SaveSnapshot": { + "methods": [ + "saveSnapshot" + ] + }, + "LoadSnapshot": { + "methods": [ + "loadSnapshot" + ] + }, + "DatabaseFailover": { + "methods": [ + "databaseFailover" + ] + }, + "ListEnvironments": { + "methods": [ + "listEnvironments", + "listEnvironmentsStream", + "listEnvironmentsAsync" + ] + }, + "ListWorkloads": { + "methods": [ + "listWorkloads", + "listWorkloadsStream", + "listWorkloadsAsync" + ] + }, + "ListUserWorkloadsSecrets": { + "methods": [ + "listUserWorkloadsSecrets", + "listUserWorkloadsSecretsStream", + "listUserWorkloadsSecretsAsync" + ] + }, + "ListUserWorkloadsConfigMaps": { + "methods": [ + "listUserWorkloadsConfigMaps", + "listUserWorkloadsConfigMapsStream", + "listUserWorkloadsConfigMapsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "EnvironmentsClient", + "rpcs": { + "GetEnvironment": { + "methods": [ + "getEnvironment" + ] + }, + "ExecuteAirflowCommand": { + "methods": [ + "executeAirflowCommand" + ] + }, + "StopAirflowCommand": { + "methods": [ + "stopAirflowCommand" + ] + }, + "PollAirflowCommand": { + "methods": [ + "pollAirflowCommand" + ] + }, + "CreateUserWorkloadsSecret": { + "methods": [ + "createUserWorkloadsSecret" + ] + }, + "GetUserWorkloadsSecret": { + "methods": [ + "getUserWorkloadsSecret" + ] + }, + "UpdateUserWorkloadsSecret": { + "methods": [ + "updateUserWorkloadsSecret" + ] + }, + "DeleteUserWorkloadsSecret": { + "methods": [ + "deleteUserWorkloadsSecret" + ] + }, + "CreateUserWorkloadsConfigMap": { + "methods": [ + "createUserWorkloadsConfigMap" + ] + }, + "GetUserWorkloadsConfigMap": { + "methods": [ + "getUserWorkloadsConfigMap" + ] + }, + "UpdateUserWorkloadsConfigMap": { + "methods": [ + "updateUserWorkloadsConfigMap" + ] + }, + "DeleteUserWorkloadsConfigMap": { + "methods": [ + "deleteUserWorkloadsConfigMap" + ] + }, + "FetchDatabaseProperties": { + "methods": [ + "fetchDatabaseProperties" + ] + }, + "CreateEnvironment": { + "methods": [ + "createEnvironment" + ] + }, + "UpdateEnvironment": { + "methods": [ + "updateEnvironment" + ] + }, + "DeleteEnvironment": { + "methods": [ + "deleteEnvironment" + ] + }, + "RestartWebServer": { + "methods": [ + "restartWebServer" + ] + }, + "CheckUpgrade": { + "methods": [ + "checkUpgrade" + ] + }, + "SaveSnapshot": { + "methods": [ + "saveSnapshot" + ] + }, + "LoadSnapshot": { + "methods": [ + "loadSnapshot" + ] + }, + "DatabaseFailover": { + "methods": [ + "databaseFailover" + ] + }, + "ListEnvironments": { + "methods": [ + "listEnvironments", + "listEnvironmentsStream", + "listEnvironmentsAsync" + ] + }, + "ListWorkloads": { + "methods": [ + "listWorkloads", + "listWorkloadsStream", + "listWorkloadsAsync" + ] + }, + "ListUserWorkloadsSecrets": { + "methods": [ + "listUserWorkloadsSecrets", + "listUserWorkloadsSecretsStream", + "listUserWorkloadsSecretsAsync" + ] + }, + "ListUserWorkloadsConfigMaps": { + "methods": [ + "listUserWorkloadsConfigMaps", + "listUserWorkloadsConfigMapsStream", + "listUserWorkloadsConfigMapsAsync" + ] + } + } + } + } + }, + "ImageVersions": { + "clients": { + "grpc": { + "libraryClient": "ImageVersionsClient", + "rpcs": { + "ListImageVersions": { + "methods": [ + "listImageVersions", + "listImageVersionsStream", + "listImageVersionsAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "ImageVersionsClient", + "rpcs": { + "ListImageVersions": { + "methods": [ + "listImageVersions", + "listImageVersionsStream", + "listImageVersionsAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_client.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_client.ts new file mode 100644 index 00000000000..d7c4ab67d68 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_client.ts @@ -0,0 +1,714 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); + +/** + * Client JSON configuration object, loaded from + * `src/v1beta1/image_versions_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './image_versions_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Readonly service to query available ImageVersions. + * @class + * @memberof v1beta1 + */ +export class ImageVersionsClient { + 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; + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; + imageVersionsStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of ImageVersionsClient. + * + * @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://developers.google.com/identity/protocols/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 ImageVersionsClient({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 ImageVersionsClient; + 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 = 'composer.' + 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; + } + + // 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 = { + environmentPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/environments/{environment}' + ), + userWorkloadsConfigMapPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}' + ), + userWorkloadsSecretPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}' + ), + }; + + // 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 = { + listImageVersions: + new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'imageVersions') + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.orchestration.airflow.service.v1beta1.ImageVersions', 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.imageVersionsStub) { + return this.imageVersionsStub; + } + + // Put together the "service stub" for + // google.cloud.orchestration.airflow.service.v1beta1.ImageVersions. + this.imageVersionsStub = this._gaxGrpc.createStub( + this._opts.fallback ? + (this._protos as protobuf.Root).lookupService('google.cloud.orchestration.airflow.service.v1beta1.ImageVersions') : + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.orchestration.airflow.service.v1beta1.ImageVersions, + 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 imageVersionsStubMethods = + ['listImageVersions']; + for (const methodName of imageVersionsStubMethods) { + const callPromise = this.imageVersionsStub.then( + stub => (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error|null|undefined) => () => { + throw err; + }); + + const descriptor = + this.descriptors.page[methodName] || + undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.imageVersionsStub; + } + + /** + * 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 'composer.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 'composer.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 -- + // ------------------- + + /** + * List ImageVersions for provided location. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of image_versions to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {boolean} request.includePastReleases + * Whether or not image versions from old releases should be included. + * @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.orchestration.airflow.service.v1beta1.ImageVersion|ImageVersion}. + * 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 `listImageVersionsAsync()` + * 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. + */ + listImageVersions( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + options?: CallOptions): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[], + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse + ]>; + listImageVersions( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion>): void; + listImageVersions( + request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + callback: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion>): void; + listImageVersions( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + optionsOrCallback?: CallOptions|PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion>, + callback?: PaginationCallback< + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse|null|undefined, + protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion>): + Promise<[ + protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[], + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest|null, + protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse + ]>|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(); + return this.innerApiCalls.listImageVersions(request, options, callback); + } + +/** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of image_versions to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {boolean} request.includePastReleases + * Whether or not image versions from old releases should be included. + * @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.orchestration.airflow.service.v1beta1.ImageVersion|ImageVersion} 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 `listImageVersionsAsync()` + * 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. + */ + listImageVersionsStream( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + 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['listImageVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listImageVersions.createStream( + this.innerApiCalls.listImageVersions as GaxCall, + request, + callSettings + ); + } + +/** + * Equivalent to `listImageVersions`, 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 + * List ImageVersions in the given project and location, in the form: + * "projects/{projectId}/locations/{locationId}" + * @param {number} request.pageSize + * The maximum number of image_versions to return. + * @param {string} request.pageToken + * The next_page_token value returned from a previous List request, if any. + * @param {boolean} request.includePastReleases + * Whether or not image versions from old releases should be included. + * @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.orchestration.airflow.service.v1beta1.ImageVersion|ImageVersion}. 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/v1beta1/image_versions.list_image_versions.js + * region_tag:composer_v1beta1_generated_ImageVersions_ListImageVersions_async + */ + listImageVersionsAsync( + request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, + 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['listImageVersions']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listImageVersions.asyncIterate( + this.innerApiCalls['listImageVersions'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified environment resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} environment + * @returns {string} Resource name string. + */ + environmentPath(project:string,location:string,environment:string) { + return this.pathTemplates.environmentPathTemplate.render({ + project: project, + location: location, + environment: environment, + }); + } + + /** + * Parse the project from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).project; + } + + /** + * Parse the location from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).location; + } + + /** + * Parse the environment from Environment resource. + * + * @param {string} environmentName + * A fully-qualified path representing Environment resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromEnvironmentName(environmentName: string) { + return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; + } + + /** + * Return a fully-qualified userWorkloadsConfigMap resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} environment + * @param {string} user_workloads_config_map + * @returns {string} Resource name string. + */ + userWorkloadsConfigMapPath(project:string,location:string,environment:string,userWorkloadsConfigMap:string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.render({ + project: project, + location: location, + environment: environment, + user_workloads_config_map: userWorkloadsConfigMap, + }); + } + + /** + * Parse the project from UserWorkloadsConfigMap resource. + * + * @param {string} userWorkloadsConfigMapName + * A fully-qualified path representing UserWorkloadsConfigMap resource. + * @returns {string} A string representing the project. + */ + matchProjectFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).project; + } + + /** + * Parse the location from UserWorkloadsConfigMap resource. + * + * @param {string} userWorkloadsConfigMapName + * A fully-qualified path representing UserWorkloadsConfigMap resource. + * @returns {string} A string representing the location. + */ + matchLocationFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).location; + } + + /** + * Parse the environment from UserWorkloadsConfigMap resource. + * + * @param {string} userWorkloadsConfigMapName + * A fully-qualified path representing UserWorkloadsConfigMap resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).environment; + } + + /** + * Parse the user_workloads_config_map from UserWorkloadsConfigMap resource. + * + * @param {string} userWorkloadsConfigMapName + * A fully-qualified path representing UserWorkloadsConfigMap resource. + * @returns {string} A string representing the user_workloads_config_map. + */ + matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { + return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).user_workloads_config_map; + } + + /** + * Return a fully-qualified userWorkloadsSecret resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} environment + * @param {string} user_workloads_secret + * @returns {string} Resource name string. + */ + userWorkloadsSecretPath(project:string,location:string,environment:string,userWorkloadsSecret:string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.render({ + project: project, + location: location, + environment: environment, + user_workloads_secret: userWorkloadsSecret, + }); + } + + /** + * Parse the project from UserWorkloadsSecret resource. + * + * @param {string} userWorkloadsSecretName + * A fully-qualified path representing UserWorkloadsSecret resource. + * @returns {string} A string representing the project. + */ + matchProjectFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).project; + } + + /** + * Parse the location from UserWorkloadsSecret resource. + * + * @param {string} userWorkloadsSecretName + * A fully-qualified path representing UserWorkloadsSecret resource. + * @returns {string} A string representing the location. + */ + matchLocationFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).location; + } + + /** + * Parse the environment from UserWorkloadsSecret resource. + * + * @param {string} userWorkloadsSecretName + * A fully-qualified path representing UserWorkloadsSecret resource. + * @returns {string} A string representing the environment. + */ + matchEnvironmentFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).environment; + } + + /** + * Parse the user_workloads_secret from UserWorkloadsSecret resource. + * + * @param {string} userWorkloadsSecretName + * A fully-qualified path representing UserWorkloadsSecret resource. + * @returns {string} A string representing the user_workloads_secret. + */ + matchUserWorkloadsSecretFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { + return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).user_workloads_secret; + } + + /** + * 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.imageVersionsStub && !this._terminated) { + return this.imageVersionsStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_client_config.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_client_config.json new file mode 100644 index 00000000000..9db3275858a --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_client_config.json @@ -0,0 +1,30 @@ +{ + "interfaces": { + "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "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 + } + }, + "methods": { + "ListImageVersions": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_proto_list.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_proto_list.json new file mode 100644 index 00000000000..c854c306722 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto", + "../../protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto", + "../../protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto" +] diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/index.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/index.ts new file mode 100644 index 00000000000..38cec48d623 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/index.ts @@ -0,0 +1,20 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 {EnvironmentsClient} from './environments_client'; +export {ImageVersionsClient} from './image_versions_client'; diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..2ef4b0dcd16 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/fixtures/sample/src/index.js @@ -0,0 +1,28 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 service = require('@google-cloud/orchestration-airflow'); + +function main() { + const environmentsClient = new service.EnvironmentsClient(); + const imageVersionsClient = new service.ImageVersionsClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..dd47e569943 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,38 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 {EnvironmentsClient, ImageVersionsClient} from '@google-cloud/orchestration-airflow'; + +// check that the client class type name can be used +function doStuffWithEnvironmentsClient(client: EnvironmentsClient) { + client.close(); +} +function doStuffWithImageVersionsClient(client: ImageVersionsClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const environmentsClient = new EnvironmentsClient(); + doStuffWithEnvironmentsClient(environmentsClient); + // check that the client instance can be created + const imageVersionsClient = new ImageVersionsClient(); + doStuffWithImageVersionsClient(imageVersionsClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/install.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/install.ts new file mode 100644 index 00000000000..fd5bfdc71d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/install.ts @@ -0,0 +1,49 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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-orchestration-airflow-service/v1beta1/test/gapic_environments_v1beta1.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/test/gapic_environments_v1beta1.ts new file mode 100644 index 00000000000..2f2ea8877bc --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/test/gapic_environments_v1beta1.ts @@ -0,0 +1,4313 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 environmentsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf, LROperation, operationsProtos} 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('v1beta1.EnvironmentsClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'composer.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient(); + 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 = environmentsModule.v1beta1.EnvironmentsClient.servicePath; + assert.strictEqual(servicePath, 'composer.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = environmentsModule.v1beta1.EnvironmentsClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'composer.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'composer.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'composer.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 environmentsModule.v1beta1.EnvironmentsClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'composer.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 environmentsModule.v1beta1.EnvironmentsClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'composer.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 environmentsModule.v1beta1.EnvironmentsClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = environmentsModule.v1beta1.EnvironmentsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.environmentsStub, undefined); + await client.initialize(); + assert(client.environmentsStub); + }); + + it('has close method for the initialized client', done => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.environmentsStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.environmentsStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + 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 environmentsModule.v1beta1.EnvironmentsClient({ + 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('getEnvironment', () => { + it('invokes getEnvironment without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() + ); + client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); + const [response] = await client.getEnvironment(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEnvironment without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() + ); + client.innerApiCalls.getEnvironment = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEnvironment( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEnvironment with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getEnvironment = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getEnvironment(request), expectedError); + const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEnvironment with closed client', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getEnvironment(request), expectedError); + }); + }); + + describe('executeAirflowCommand', () => { + it('invokes executeAirflowCommand without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse() + ); + client.innerApiCalls.executeAirflowCommand = stubSimpleCall(expectedResponse); + const [response] = await client.executeAirflowCommand(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeAirflowCommand without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse() + ); + client.innerApiCalls.executeAirflowCommand = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.executeAirflowCommand( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.executeAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeAirflowCommand with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.executeAirflowCommand = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.executeAirflowCommand(request), expectedError); + const actualRequest = (client.innerApiCalls.executeAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.executeAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes executeAirflowCommand with closed client', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.executeAirflowCommand(request), expectedError); + }); + }); + + describe('stopAirflowCommand', () => { + it('invokes stopAirflowCommand without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse() + ); + client.innerApiCalls.stopAirflowCommand = stubSimpleCall(expectedResponse); + const [response] = await client.stopAirflowCommand(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.stopAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.stopAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes stopAirflowCommand without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse() + ); + client.innerApiCalls.stopAirflowCommand = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.stopAirflowCommand( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.stopAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.stopAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes stopAirflowCommand with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.stopAirflowCommand = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.stopAirflowCommand(request), expectedError); + const actualRequest = (client.innerApiCalls.stopAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.stopAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes stopAirflowCommand with closed client', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.stopAirflowCommand(request), expectedError); + }); + }); + + describe('pollAirflowCommand', () => { + it('invokes pollAirflowCommand without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse() + ); + client.innerApiCalls.pollAirflowCommand = stubSimpleCall(expectedResponse); + const [response] = await client.pollAirflowCommand(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.pollAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.pollAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pollAirflowCommand without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse() + ); + client.innerApiCalls.pollAirflowCommand = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.pollAirflowCommand( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.pollAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.pollAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pollAirflowCommand with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.pollAirflowCommand = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.pollAirflowCommand(request), expectedError); + const actualRequest = (client.innerApiCalls.pollAirflowCommand as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.pollAirflowCommand as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes pollAirflowCommand with closed client', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest', ['environment']); + request.environment = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.pollAirflowCommand(request), expectedError); + }); + }); + + describe('createUserWorkloadsSecret', () => { + it('invokes createUserWorkloadsSecret without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret() + ); + client.innerApiCalls.createUserWorkloadsSecret = stubSimpleCall(expectedResponse); + const [response] = await client.createUserWorkloadsSecret(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserWorkloadsSecret without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret() + ); + client.innerApiCalls.createUserWorkloadsSecret = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createUserWorkloadsSecret( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserWorkloadsSecret with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createUserWorkloadsSecret = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createUserWorkloadsSecret(request), expectedError); + const actualRequest = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserWorkloadsSecret with closed client', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createUserWorkloadsSecret(request), expectedError); + }); + }); + + describe('getUserWorkloadsSecret', () => { + it('invokes getUserWorkloadsSecret without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret() + ); + client.innerApiCalls.getUserWorkloadsSecret = stubSimpleCall(expectedResponse); + const [response] = await client.getUserWorkloadsSecret(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserWorkloadsSecret without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret() + ); + client.innerApiCalls.getUserWorkloadsSecret = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getUserWorkloadsSecret( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserWorkloadsSecret with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getUserWorkloadsSecret = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getUserWorkloadsSecret(request), expectedError); + const actualRequest = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserWorkloadsSecret with closed client', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getUserWorkloadsSecret(request), expectedError); + }); + }); + + describe('updateUserWorkloadsSecret', () => { + it('invokes updateUserWorkloadsSecret without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest() + ); + request.userWorkloadsSecret ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest', ['userWorkloadsSecret', 'name']); + request.userWorkloadsSecret.name = defaultValue1; + const expectedHeaderRequestParams = `user_workloads_secret.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret() + ); + client.innerApiCalls.updateUserWorkloadsSecret = stubSimpleCall(expectedResponse); + const [response] = await client.updateUserWorkloadsSecret(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserWorkloadsSecret without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest() + ); + request.userWorkloadsSecret ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest', ['userWorkloadsSecret', 'name']); + request.userWorkloadsSecret.name = defaultValue1; + const expectedHeaderRequestParams = `user_workloads_secret.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret() + ); + client.innerApiCalls.updateUserWorkloadsSecret = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateUserWorkloadsSecret( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserWorkloadsSecret with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest() + ); + request.userWorkloadsSecret ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest', ['userWorkloadsSecret', 'name']); + request.userWorkloadsSecret.name = defaultValue1; + const expectedHeaderRequestParams = `user_workloads_secret.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateUserWorkloadsSecret = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateUserWorkloadsSecret(request), expectedError); + const actualRequest = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserWorkloadsSecret with closed client', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest() + ); + request.userWorkloadsSecret ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest', ['userWorkloadsSecret', 'name']); + request.userWorkloadsSecret.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateUserWorkloadsSecret(request), expectedError); + }); + }); + + describe('deleteUserWorkloadsSecret', () => { + it('invokes deleteUserWorkloadsSecret without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteUserWorkloadsSecret = stubSimpleCall(expectedResponse); + const [response] = await client.deleteUserWorkloadsSecret(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserWorkloadsSecret without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteUserWorkloadsSecret = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteUserWorkloadsSecret( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserWorkloadsSecret with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteUserWorkloadsSecret = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteUserWorkloadsSecret(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserWorkloadsSecret with closed client', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteUserWorkloadsSecret(request), expectedError); + }); + }); + + describe('createUserWorkloadsConfigMap', () => { + it('invokes createUserWorkloadsConfigMap without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap() + ); + client.innerApiCalls.createUserWorkloadsConfigMap = stubSimpleCall(expectedResponse); + const [response] = await client.createUserWorkloadsConfigMap(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserWorkloadsConfigMap without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap() + ); + client.innerApiCalls.createUserWorkloadsConfigMap = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createUserWorkloadsConfigMap( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserWorkloadsConfigMap with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createUserWorkloadsConfigMap = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.createUserWorkloadsConfigMap(request), expectedError); + const actualRequest = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createUserWorkloadsConfigMap with closed client', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest', ['parent']); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.createUserWorkloadsConfigMap(request), expectedError); + }); + }); + + describe('getUserWorkloadsConfigMap', () => { + it('invokes getUserWorkloadsConfigMap without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap() + ); + client.innerApiCalls.getUserWorkloadsConfigMap = stubSimpleCall(expectedResponse); + const [response] = await client.getUserWorkloadsConfigMap(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserWorkloadsConfigMap without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap() + ); + client.innerApiCalls.getUserWorkloadsConfigMap = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getUserWorkloadsConfigMap( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserWorkloadsConfigMap with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getUserWorkloadsConfigMap = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.getUserWorkloadsConfigMap(request), expectedError); + const actualRequest = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getUserWorkloadsConfigMap with closed client', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getUserWorkloadsConfigMap(request), expectedError); + }); + }); + + describe('updateUserWorkloadsConfigMap', () => { + it('invokes updateUserWorkloadsConfigMap without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest() + ); + request.userWorkloadsConfigMap ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest', ['userWorkloadsConfigMap', 'name']); + request.userWorkloadsConfigMap.name = defaultValue1; + const expectedHeaderRequestParams = `user_workloads_config_map.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap() + ); + client.innerApiCalls.updateUserWorkloadsConfigMap = stubSimpleCall(expectedResponse); + const [response] = await client.updateUserWorkloadsConfigMap(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserWorkloadsConfigMap without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest() + ); + request.userWorkloadsConfigMap ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest', ['userWorkloadsConfigMap', 'name']); + request.userWorkloadsConfigMap.name = defaultValue1; + const expectedHeaderRequestParams = `user_workloads_config_map.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap() + ); + client.innerApiCalls.updateUserWorkloadsConfigMap = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateUserWorkloadsConfigMap( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserWorkloadsConfigMap with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest() + ); + request.userWorkloadsConfigMap ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest', ['userWorkloadsConfigMap', 'name']); + request.userWorkloadsConfigMap.name = defaultValue1; + const expectedHeaderRequestParams = `user_workloads_config_map.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateUserWorkloadsConfigMap = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.updateUserWorkloadsConfigMap(request), expectedError); + const actualRequest = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateUserWorkloadsConfigMap with closed client', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest() + ); + request.userWorkloadsConfigMap ??= {}; + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest', ['userWorkloadsConfigMap', 'name']); + request.userWorkloadsConfigMap.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateUserWorkloadsConfigMap(request), expectedError); + }); + }); + + describe('deleteUserWorkloadsConfigMap', () => { + it('invokes deleteUserWorkloadsConfigMap without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteUserWorkloadsConfigMap = stubSimpleCall(expectedResponse); + const [response] = await client.deleteUserWorkloadsConfigMap(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserWorkloadsConfigMap without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteUserWorkloadsConfigMap = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteUserWorkloadsConfigMap( + request, + (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserWorkloadsConfigMap with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteUserWorkloadsConfigMap = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.deleteUserWorkloadsConfigMap(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteUserWorkloadsConfigMap with closed client', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest', ['name']); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteUserWorkloadsConfigMap(request), expectedError); + }); + }); + + describe('fetchDatabaseProperties', () => { + it('invokes fetchDatabaseProperties without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse() + ); + client.innerApiCalls.fetchDatabaseProperties = stubSimpleCall(expectedResponse); + const [response] = await client.fetchDatabaseProperties(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchDatabaseProperties without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse() + ); + client.innerApiCalls.fetchDatabaseProperties = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.fetchDatabaseProperties( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchDatabaseProperties with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.fetchDatabaseProperties = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.fetchDatabaseProperties(request), expectedError); + const actualRequest = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes fetchDatabaseProperties with closed client', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest', ['environment']); + request.environment = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.fetchDatabaseProperties(request), expectedError); + }); + }); + + describe('createEnvironment', () => { + it('invokes createEnvironment without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEnvironment = stubLongRunningCall(expectedResponse); + const [operation] = await client.createEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEnvironment without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.createEnvironment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createEnvironment( + 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.createEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEnvironment with call error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createEnvironment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.createEnvironment(request), expectedError); + const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createEnvironment with LRO error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createEnvironment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.createEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCreateEnvironmentProgress without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkCreateEnvironmentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCreateEnvironmentProgress with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCreateEnvironmentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('updateEnvironment', () => { + it('invokes updateEnvironment without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEnvironment = stubLongRunningCall(expectedResponse); + const [operation] = await client.updateEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEnvironment without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.updateEnvironment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateEnvironment( + 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.updateEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEnvironment with call error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEnvironment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.updateEnvironment(request), expectedError); + const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateEnvironment with LRO error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateEnvironment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.updateEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpdateEnvironmentProgress without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkUpdateEnvironmentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkUpdateEnvironmentProgress with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkUpdateEnvironmentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('deleteEnvironment', () => { + it('invokes deleteEnvironment without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEnvironment = stubLongRunningCall(expectedResponse); + const [operation] = await client.deleteEnvironment(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEnvironment without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.deleteEnvironment = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteEnvironment( + 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.deleteEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEnvironment with call error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEnvironment = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.deleteEnvironment(request), expectedError); + const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteEnvironment with LRO error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteEnvironment = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.deleteEnvironment(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDeleteEnvironmentProgress without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkDeleteEnvironmentProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDeleteEnvironmentProgress with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDeleteEnvironmentProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('restartWebServer', () => { + it('invokes restartWebServer without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restartWebServer = stubLongRunningCall(expectedResponse); + const [operation] = await client.restartWebServer(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.restartWebServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restartWebServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restartWebServer without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.restartWebServer = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.restartWebServer( + 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.restartWebServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restartWebServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restartWebServer with call error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restartWebServer = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.restartWebServer(request), expectedError); + const actualRequest = (client.innerApiCalls.restartWebServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restartWebServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes restartWebServer with LRO error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest', ['name']); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.restartWebServer = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.restartWebServer(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.restartWebServer as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.restartWebServer as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkRestartWebServerProgress without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkRestartWebServerProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkRestartWebServerProgress with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkRestartWebServerProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('checkUpgrade', () => { + it('invokes checkUpgrade without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.checkUpgrade = stubLongRunningCall(expectedResponse); + const [operation] = await client.checkUpgrade(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpgrade without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.checkUpgrade = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.checkUpgrade( + 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.checkUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpgrade with call error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.checkUpgrade = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.checkUpgrade(request), expectedError); + const actualRequest = (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkUpgrade with LRO error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.checkUpgrade = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.checkUpgrade(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.checkUpgrade as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCheckUpgradeProgress without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkCheckUpgradeProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCheckUpgradeProgress with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkCheckUpgradeProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('saveSnapshot', () => { + it('invokes saveSnapshot without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.saveSnapshot = stubLongRunningCall(expectedResponse); + const [operation] = await client.saveSnapshot(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.saveSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.saveSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes saveSnapshot without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.saveSnapshot = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.saveSnapshot( + 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.saveSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.saveSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes saveSnapshot with call error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.saveSnapshot = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.saveSnapshot(request), expectedError); + const actualRequest = (client.innerApiCalls.saveSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.saveSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes saveSnapshot with LRO error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.saveSnapshot = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.saveSnapshot(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.saveSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.saveSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkSaveSnapshotProgress without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkSaveSnapshotProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkSaveSnapshotProgress with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkSaveSnapshotProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('loadSnapshot', () => { + it('invokes loadSnapshot without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.loadSnapshot = stubLongRunningCall(expectedResponse); + const [operation] = await client.loadSnapshot(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.loadSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.loadSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes loadSnapshot without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.loadSnapshot = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.loadSnapshot( + 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.loadSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.loadSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes loadSnapshot with call error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.loadSnapshot = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.loadSnapshot(request), expectedError); + const actualRequest = (client.innerApiCalls.loadSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.loadSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes loadSnapshot with LRO error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.loadSnapshot = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.loadSnapshot(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.loadSnapshot as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.loadSnapshot as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkLoadSnapshotProgress without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkLoadSnapshotProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkLoadSnapshotProgress with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkLoadSnapshotProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('databaseFailover', () => { + it('invokes databaseFailover without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.databaseFailover = stubLongRunningCall(expectedResponse); + const [operation] = await client.databaseFailover(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.databaseFailover as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.databaseFailover as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes databaseFailover without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.databaseFailover = stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.databaseFailover( + 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.databaseFailover as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.databaseFailover as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes databaseFailover with call error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.databaseFailover = stubLongRunningCall(undefined, expectedError); + await assert.rejects(client.databaseFailover(request), expectedError); + const actualRequest = (client.innerApiCalls.databaseFailover as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.databaseFailover as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes databaseFailover with LRO error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest', ['environment']); + request.environment = defaultValue1; + const expectedHeaderRequestParams = `environment=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.databaseFailover = stubLongRunningCall(undefined, undefined, expectedError); + const [operation] = await client.databaseFailover(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = (client.innerApiCalls.databaseFailover as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.databaseFailover as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkDatabaseFailoverProgress without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.checkDatabaseFailoverProgress(expectedResponse.name); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkDatabaseFailoverProgress with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.checkDatabaseFailoverProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub) + .getCall(0)); + }); + }); + + describe('listEnvironments', () => { + it('invokes listEnvironments without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), + ]; + client.innerApiCalls.listEnvironments = stubSimpleCall(expectedResponse); + const [response] = await client.listEnvironments(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEnvironments without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), + ]; + client.innerApiCalls.listEnvironments = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listEnvironments( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEnvironments with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listEnvironments = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listEnvironments(request), expectedError); + const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listEnvironmentsStream without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), + ]; + client.descriptors.page.listEnvironments.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listEnvironmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.Environment[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.Environment) => { + 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.listEnvironments.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listEnvironments, request)); + assert( + (client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listEnvironmentsStream with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listEnvironments.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listEnvironmentsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.Environment[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.Environment) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listEnvironments, request)); + assert( + (client.descriptors.page.listEnvironments.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listEnvironments without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), + ]; + client.descriptors.page.listEnvironments.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[] = []; + const iterable = client.listEnvironmentsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listEnvironments with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listEnvironments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listEnvironmentsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listWorkloads', () => { + it('invokes listWorkloads without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), + ]; + client.innerApiCalls.listWorkloads = stubSimpleCall(expectedResponse); + const [response] = await client.listWorkloads(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listWorkloads as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listWorkloads as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkloads without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), + ]; + client.innerApiCalls.listWorkloads = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listWorkloads( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listWorkloads as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listWorkloads as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkloads with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listWorkloads = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listWorkloads(request), expectedError); + const actualRequest = (client.innerApiCalls.listWorkloads as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listWorkloads as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listWorkloadsStream without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), + ]; + client.descriptors.page.listWorkloads.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listWorkloadsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload) => { + 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.listWorkloads.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listWorkloads, request)); + assert( + (client.descriptors.page.listWorkloads.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listWorkloadsStream with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkloads.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listWorkloadsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listWorkloads.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listWorkloads, request)); + assert( + (client.descriptors.page.listWorkloads.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listWorkloads without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), + ]; + client.descriptors.page.listWorkloads.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload[] = []; + const iterable = client.listWorkloadsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listWorkloads.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listWorkloads.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listWorkloads with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listWorkloads.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listWorkloadsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listWorkloads.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listWorkloads.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listUserWorkloadsSecrets', () => { + it('invokes listUserWorkloadsSecrets without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), + ]; + client.innerApiCalls.listUserWorkloadsSecrets = stubSimpleCall(expectedResponse); + const [response] = await client.listUserWorkloadsSecrets(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserWorkloadsSecrets without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), + ]; + client.innerApiCalls.listUserWorkloadsSecrets = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listUserWorkloadsSecrets( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserWorkloadsSecrets with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listUserWorkloadsSecrets = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listUserWorkloadsSecrets(request), expectedError); + const actualRequest = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserWorkloadsSecretsStream without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), + ]; + client.descriptors.page.listUserWorkloadsSecrets.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listUserWorkloadsSecretsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret) => { + 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.listUserWorkloadsSecrets.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUserWorkloadsSecrets, request)); + assert( + (client.descriptors.page.listUserWorkloadsSecrets.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listUserWorkloadsSecretsStream with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserWorkloadsSecrets.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listUserWorkloadsSecretsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listUserWorkloadsSecrets.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUserWorkloadsSecrets, request)); + assert( + (client.descriptors.page.listUserWorkloadsSecrets.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserWorkloadsSecrets without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), + ]; + client.descriptors.page.listUserWorkloadsSecrets.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret[] = []; + const iterable = client.listUserWorkloadsSecretsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listUserWorkloadsSecrets.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUserWorkloadsSecrets.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserWorkloadsSecrets with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserWorkloadsSecrets.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listUserWorkloadsSecretsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listUserWorkloadsSecrets.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUserWorkloadsSecrets.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('listUserWorkloadsConfigMaps', () => { + it('invokes listUserWorkloadsConfigMaps without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), + ]; + client.innerApiCalls.listUserWorkloadsConfigMaps = stubSimpleCall(expectedResponse); + const [response] = await client.listUserWorkloadsConfigMaps(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserWorkloadsConfigMaps without error using callback', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), + ]; + client.innerApiCalls.listUserWorkloadsConfigMaps = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listUserWorkloadsConfigMaps( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserWorkloadsConfigMaps with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listUserWorkloadsConfigMaps = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listUserWorkloadsConfigMaps(request), expectedError); + const actualRequest = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listUserWorkloadsConfigMapsStream without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), + ]; + client.descriptors.page.listUserWorkloadsConfigMaps.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listUserWorkloadsConfigMapsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap) => { + 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.listUserWorkloadsConfigMaps.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUserWorkloadsConfigMaps, request)); + assert( + (client.descriptors.page.listUserWorkloadsConfigMaps.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listUserWorkloadsConfigMapsStream with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserWorkloadsConfigMaps.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listUserWorkloadsConfigMapsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listUserWorkloadsConfigMaps.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listUserWorkloadsConfigMaps, request)); + assert( + (client.descriptors.page.listUserWorkloadsConfigMaps.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserWorkloadsConfigMaps without error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), + ]; + client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap[] = []; + const iterable = client.listUserWorkloadsConfigMapsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listUserWorkloadsConfigMaps with error', async () => { + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listUserWorkloadsConfigMapsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listUserWorkloadsConfigMaps.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 environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 environmentsModule.v1beta1.EnvironmentsClient({ + 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); + } + }); + }); + 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 environmentsModule.v1beta1.EnvironmentsClient({ + 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 environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 environmentsModule.v1beta1.EnvironmentsClient({ + 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); + } + }); + }); + 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 environmentsModule.v1beta1.EnvironmentsClient({ + 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 environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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 environmentsModule.v1beta1.EnvironmentsClient({ + 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); + } + }); + }); + 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 environmentsModule.v1beta1.EnvironmentsClient({ + 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 environmentsModule.v1beta1.EnvironmentsClient({ + 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.ListOperationsResponse[] = []; + 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 environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + 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.ListOperationsResponse[] = []; + 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('environment', () => { + const fakePath = "/rendered/path/environment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + environment: "environmentValue", + }; + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath("projectValue", "locationValue", "environmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userWorkloadsConfigMap', () => { + const fakePath = "/rendered/path/userWorkloadsConfigMap"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + environment: "environmentValue", + user_workloads_config_map: "userWorkloadsConfigMapValue", + }; + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.userWorkloadsConfigMapPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userWorkloadsConfigMapPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userWorkloadsConfigMapPath', () => { + const result = client.userWorkloadsConfigMapPath("projectValue", "locationValue", "environmentValue", "userWorkloadsConfigMapValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromUserWorkloadsConfigMapName', () => { + const result = client.matchProjectFromUserWorkloadsConfigMapName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromUserWorkloadsConfigMapName', () => { + const result = client.matchLocationFromUserWorkloadsConfigMapName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromUserWorkloadsConfigMapName', () => { + const result = client.matchEnvironmentFromUserWorkloadsConfigMapName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName', () => { + const result = client.matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(fakePath); + assert.strictEqual(result, "userWorkloadsConfigMapValue"); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userWorkloadsSecret', () => { + const fakePath = "/rendered/path/userWorkloadsSecret"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + environment: "environmentValue", + user_workloads_secret: "userWorkloadsSecretValue", + }; + const client = new environmentsModule.v1beta1.EnvironmentsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.userWorkloadsSecretPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userWorkloadsSecretPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userWorkloadsSecretPath', () => { + const result = client.userWorkloadsSecretPath("projectValue", "locationValue", "environmentValue", "userWorkloadsSecretValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromUserWorkloadsSecretName', () => { + const result = client.matchProjectFromUserWorkloadsSecretName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromUserWorkloadsSecretName', () => { + const result = client.matchLocationFromUserWorkloadsSecretName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromUserWorkloadsSecretName', () => { + const result = client.matchEnvironmentFromUserWorkloadsSecretName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserWorkloadsSecretFromUserWorkloadsSecretName', () => { + const result = client.matchUserWorkloadsSecretFromUserWorkloadsSecretName(fakePath); + assert.strictEqual(result, "userWorkloadsSecretValue"); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/test/gapic_image_versions_v1beta1.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/test/gapic_image_versions_v1beta1.ts new file mode 100644 index 00000000000..80b42ab2683 --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/test/gapic_image_versions_v1beta1.ts @@ -0,0 +1,663 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 imageversionsModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = (instance.constructor as typeof protobuf.Message) + .toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { + return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { mockStream.write({}); }); + } + setImmediate(() => { mockStream.end(); }); + } else { + setImmediate(() => { mockStream.write({}); }); + setImmediate(() => { mockStream.end(); }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + } + }; + } + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1beta1.ImageVersionsClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'composer.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient(); + 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 = imageversionsModule.v1beta1.ImageVersionsClient.servicePath; + assert.strictEqual(servicePath, 'composer.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = imageversionsModule.v1beta1.ImageVersionsClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'composer.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({universeDomain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'composer.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({universe_domain: 'example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'composer.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 imageversionsModule.v1beta1.ImageVersionsClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'composer.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 imageversionsModule.v1beta1.ImageVersionsClient({universeDomain: 'configured.example.com'}); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'composer.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 imageversionsModule.v1beta1.ImageVersionsClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); + }); + + it('has port', () => { + const port = imageversionsModule.v1beta1.ImageVersionsClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageVersionsStub, undefined); + await client.initialize(); + assert(client.imageVersionsStub); + }); + + it('has close method for the initialized client', done => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.imageVersionsStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.imageVersionsStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + 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 imageversionsModule.v1beta1.ImageVersionsClient({ + 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('listImageVersions', () => { + it('invokes listImageVersions without error', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), + ]; + client.innerApiCalls.listImageVersions = stubSimpleCall(expectedResponse); + const [response] = await client.listImageVersions(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listImageVersions without error using callback', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), + ]; + client.innerApiCalls.listImageVersions = stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listImageVersions( + request, + (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[]|null) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listImageVersions with error', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listImageVersions = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.listImageVersions(request), expectedError); + const actualRequest = (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = (client.innerApiCalls.listImageVersions as SinonStub) + .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listImageVersionsStream without error', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), + ]; + client.descriptors.page.listImageVersions.createStream = stubPageStreamingCall(expectedResponse); + const stream = client.listImageVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion) => { + 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.listImageVersions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listImageVersions, request)); + assert( + (client.descriptors.page.listImageVersions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listImageVersionsStream with error', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listImageVersions.createStream = stubPageStreamingCall(undefined, expectedError); + const stream = client.listImageVersionsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion[] = []; + stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion) => { + responses.push(response); + }); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert((client.descriptors.page.listImageVersions.createStream as SinonStub) + .getCall(0).calledWith(client.innerApiCalls.listImageVersions, request)); + assert( + (client.descriptors.page.listImageVersions.createStream as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listImageVersions without error', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), + generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), + ]; + client.descriptors.page.listImageVersions.asyncIterate = stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[] = []; + const iterable = client.listImageVersionsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listImageVersions with error', async () => { + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() + ); + const defaultValue1 = + getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', ['parent']); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listImageVersions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listImageVersionsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[] = []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) + .getCall(0).args[1], request); + assert( + (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) + .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + + describe('environment', () => { + const fakePath = "/rendered/path/environment"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + environment: "environmentValue", + }; + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.environmentPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.environmentPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('environmentPath', () => { + const result = client.environmentPath("projectValue", "locationValue", "environmentValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromEnvironmentName', () => { + const result = client.matchProjectFromEnvironmentName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromEnvironmentName', () => { + const result = client.matchLocationFromEnvironmentName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromEnvironmentName', () => { + const result = client.matchEnvironmentFromEnvironmentName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userWorkloadsConfigMap', () => { + const fakePath = "/rendered/path/userWorkloadsConfigMap"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + environment: "environmentValue", + user_workloads_config_map: "userWorkloadsConfigMapValue", + }; + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.userWorkloadsConfigMapPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userWorkloadsConfigMapPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userWorkloadsConfigMapPath', () => { + const result = client.userWorkloadsConfigMapPath("projectValue", "locationValue", "environmentValue", "userWorkloadsConfigMapValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromUserWorkloadsConfigMapName', () => { + const result = client.matchProjectFromUserWorkloadsConfigMapName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromUserWorkloadsConfigMapName', () => { + const result = client.matchLocationFromUserWorkloadsConfigMapName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromUserWorkloadsConfigMapName', () => { + const result = client.matchEnvironmentFromUserWorkloadsConfigMapName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName', () => { + const result = client.matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(fakePath); + assert.strictEqual(result, "userWorkloadsConfigMapValue"); + assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + + describe('userWorkloadsSecret', () => { + const fakePath = "/rendered/path/userWorkloadsSecret"; + const expectedParameters = { + project: "projectValue", + location: "locationValue", + environment: "environmentValue", + user_workloads_secret: "userWorkloadsSecretValue", + }; + const client = new imageversionsModule.v1beta1.ImageVersionsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.userWorkloadsSecretPathTemplate.render = + sinon.stub().returns(fakePath); + client.pathTemplates.userWorkloadsSecretPathTemplate.match = + sinon.stub().returns(expectedParameters); + + it('userWorkloadsSecretPath', () => { + const result = client.userWorkloadsSecretPath("projectValue", "locationValue", "environmentValue", "userWorkloadsSecretValue"); + assert.strictEqual(result, fakePath); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.render as SinonStub) + .getCall(-1).calledWith(expectedParameters)); + }); + + it('matchProjectFromUserWorkloadsSecretName', () => { + const result = client.matchProjectFromUserWorkloadsSecretName(fakePath); + assert.strictEqual(result, "projectValue"); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchLocationFromUserWorkloadsSecretName', () => { + const result = client.matchLocationFromUserWorkloadsSecretName(fakePath); + assert.strictEqual(result, "locationValue"); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchEnvironmentFromUserWorkloadsSecretName', () => { + const result = client.matchEnvironmentFromUserWorkloadsSecretName(fakePath); + assert.strictEqual(result, "environmentValue"); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + + it('matchUserWorkloadsSecretFromUserWorkloadsSecretName', () => { + const result = client.matchUserWorkloadsSecretFromUserWorkloadsSecretName(fakePath); + assert.strictEqual(result, "userWorkloadsSecretValue"); + assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) + .getCall(-1).calledWith(fakePath)); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/tsconfig.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/webpack.config.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/webpack.config.js new file mode 100644 index 00000000000..9b7becac60a --- /dev/null +++ b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/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: 'Environments', + filename: './environments.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 27b71d32a7496629f65bce2cea95f5d4672c5218 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Thu, 12 Sep 2024 22:07:34 +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 --- .../v1/.eslintignore | 7 - .../v1/.eslintrc.json | 3 - .../v1/.gitignore | 14 - .../v1/.jsdoc.js | 55 - .../v1/.mocharc.js | 33 - .../v1/.prettierrc.js | 22 - .../v1/README.md | 1 - .../v1/package.json | 59 - .../airflow/service/v1/environments.proto | 2075 - .../airflow/service/v1/image_versions.proto | 90 - .../airflow/service/v1/operations.proto | 97 - .../v1/protos/protos.d.ts | 16914 ------ .../v1/protos/protos.js | 42770 --------------- .../v1/protos/protos.json | 4446 -- .../v1/environments.check_upgrade.js | 87 - .../v1/environments.create_environment.js | 66 - ...nments.create_user_workloads_config_map.js | 67 - ...vironments.create_user_workloads_secret.js | 67 - .../v1/environments.database_failover.js | 62 - .../v1/environments.delete_environment.js | 62 - ...nments.delete_user_workloads_config_map.js | 62 - ...vironments.delete_user_workloads_secret.js | 62 - .../environments.execute_airflow_command.js | 76 - .../environments.fetch_database_properties.js | 62 - .../v1/environments.get_environment.js | 61 - ...ironments.get_user_workloads_config_map.js | 62 - .../environments.get_user_workloads_secret.js | 62 - .../v1/environments.list_environments.js | 71 - ...onments.list_user_workloads_config_maps.js | 73 - ...nvironments.list_user_workloads_secrets.js | 73 - .../v1/environments.list_workloads.js | 82 - .../v1/environments.load_snapshot.js | 87 - .../v1/environments.poll_airflow_command.js | 77 - .../v1/environments.save_snapshot.js | 67 - .../v1/environments.stop_airflow_command.js | 78 - .../v1/environments.update_environment.js | 184 - ...nments.update_user_workloads_config_map.js | 60 - ...vironments.update_user_workloads_secret.js | 60 - .../v1/image_versions.list_image_versions.js | 75 - ...loud.orchestration.airflow.service.v1.json | 1155 - .../v1/src/index.ts | 27 - .../v1/src/v1/environments_client.ts | 3311 -- .../v1/src/v1/environments_client_config.json | 122 - .../v1/src/v1/environments_proto_list.json | 5 - .../v1/src/v1/gapic_metadata.json | 307 - .../v1/src/v1/image_versions_client.ts | 714 - .../src/v1/image_versions_client_config.json | 30 - .../v1/src/v1/image_versions_proto_list.json | 5 - .../v1/src/v1/index.ts | 20 - .../system-test/fixtures/sample/src/index.js | 28 - .../system-test/fixtures/sample/src/index.ts | 38 - .../v1/system-test/install.ts | 49 - .../v1/test/gapic_environments_v1.ts | 4159 -- .../v1/test/gapic_image_versions_v1.ts | 663 - .../v1/tsconfig.json | 19 - .../v1/webpack.config.js | 64 - .../v1beta1/.eslintignore | 7 - .../v1beta1/.eslintrc.json | 3 - .../v1beta1/.gitignore | 14 - .../v1beta1/.jsdoc.js | 55 - .../v1beta1/.mocharc.js | 33 - .../v1beta1/.prettierrc.js | 22 - .../v1beta1/README.md | 1 - .../v1beta1/package.json | 59 - .../service/v1beta1/environments.proto | 2145 - .../service/v1beta1/image_versions.proto | 90 - .../airflow/service/v1beta1/operations.proto | 93 - .../v1beta1/protos/protos.d.ts | 17037 ------ .../v1beta1/protos/protos.js | 43000 ---------------- .../v1beta1/protos/protos.json | 4529 -- .../v1beta1/environments.check_upgrade.js | 86 - .../environments.create_environment.js | 66 - ...nments.create_user_workloads_config_map.js | 67 - ...vironments.create_user_workloads_secret.js | 67 - .../v1beta1/environments.database_failover.js | 62 - .../environments.delete_environment.js | 62 - ...nments.delete_user_workloads_config_map.js | 62 - ...vironments.delete_user_workloads_secret.js | 62 - .../environments.execute_airflow_command.js | 76 - .../environments.fetch_database_properties.js | 62 - .../v1beta1/environments.get_environment.js | 61 - ...ironments.get_user_workloads_config_map.js | 62 - .../environments.get_user_workloads_secret.js | 62 - .../v1beta1/environments.list_environments.js | 71 - ...onments.list_user_workloads_config_maps.js | 73 - ...nvironments.list_user_workloads_secrets.js | 73 - .../v1beta1/environments.list_workloads.js | 82 - .../v1beta1/environments.load_snapshot.js | 87 - .../environments.poll_airflow_command.js | 77 - .../environments.restart_web_server.js | 63 - .../v1beta1/environments.save_snapshot.js | 67 - .../environments.stop_airflow_command.js | 78 - .../environments.update_environment.js | 206 - ...nments.update_user_workloads_config_map.js | 60 - ...vironments.update_user_workloads_secret.js | 60 - .../image_versions.list_image_versions.js | 75 - ...orchestration.airflow.service.v1beta1.json | 1195 - .../v1beta1/src/index.ts | 27 - .../src/v1beta1/environments_client.ts | 3431 -- .../v1beta1/environments_client_config.json | 126 - .../src/v1beta1/environments_proto_list.json | 5 - .../v1beta1/src/v1beta1/gapic_metadata.json | 317 - .../src/v1beta1/image_versions_client.ts | 714 - .../v1beta1/image_versions_client_config.json | 30 - .../v1beta1/image_versions_proto_list.json | 5 - .../v1beta1/src/v1beta1/index.ts | 20 - .../system-test/fixtures/sample/src/index.js | 28 - .../system-test/fixtures/sample/src/index.ts | 38 - .../v1beta1/system-test/install.ts | 49 - .../test/gapic_environments_v1beta1.ts | 4313 -- .../test/gapic_image_versions_v1beta1.ts | 663 - .../v1beta1/tsconfig.json | 19 - .../v1beta1/webpack.config.js | 64 - .../service/v1beta1/environments.proto | 3 + .../protos/protos.d.ts | 6 + .../protos/protos.js | 23 + .../protos/protos.json | 7 + 117 files changed, 39 insertions(+), 159208 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/README.md delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/package.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/environments.proto delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/operations.proto delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.check_upgrade.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_environment.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_user_workloads_config_map.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_user_workloads_secret.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.database_failover.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_environment.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_user_workloads_config_map.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_user_workloads_secret.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.execute_airflow_command.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.fetch_database_properties.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_environment.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_user_workloads_config_map.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_user_workloads_secret.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_environments.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_user_workloads_config_maps.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_user_workloads_secrets.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_workloads.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.load_snapshot.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.poll_airflow_command.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.save_snapshot.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.stop_airflow_command.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_environment.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_user_workloads_config_map.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_user_workloads_secret.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/image_versions.list_image_versions.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_client.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_client_config.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_client.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_client_config.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/index.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/test/gapic_environments_v1.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/test/gapic_image_versions_v1.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1/webpack.config.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.prettierrc.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/README.md delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/package.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.check_upgrade.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_environment.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_user_workloads_config_map.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_user_workloads_secret.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.database_failover.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_environment.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_user_workloads_config_map.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_user_workloads_secret.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.execute_airflow_command.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.fetch_database_properties.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_environment.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_user_workloads_config_map.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_user_workloads_secret.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_environments.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_user_workloads_config_maps.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_user_workloads_secrets.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_workloads.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.load_snapshot.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.poll_airflow_command.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.restart_web_server.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.save_snapshot.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.stop_airflow_command.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_environment.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_user_workloads_config_map.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_user_workloads_secret.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/image_versions.list_image_versions.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_client.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_client_config.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_client.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_client_config.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/index.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/test/gapic_environments_v1beta1.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/test/gapic_image_versions_v1beta1.ts delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/webpack.config.js diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.eslintignore b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.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-orchestration-airflow-service/v1/.eslintrc.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.gitignore b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.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-orchestration-airflow-service/v1/.jsdoc.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.jsdoc.js deleted file mode 100644 index 86e4179a983..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 2024 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/orchestration-airflow', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.mocharc.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.mocharc.js deleted file mode 100644 index 13b67c34edc..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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-orchestration-airflow-service/v1/.prettierrc.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.prettierrc.js deleted file mode 100644 index 9a8fd690982..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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-orchestration-airflow-service/v1/README.md b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/README.md deleted file mode 100644 index 536af38a9bb..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/README.md +++ /dev/null @@ -1 +0,0 @@ -Service: Nodejs Client diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/package.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/package.json deleted file mode 100644 index 5d2f497a88a..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "@google-cloud/orchestration-airflow", - "version": "0.1.0", - "description": "Service client for Node.js", - "repository": "googleapis/nodejs-service", - "license": "Apache-2.0", - "author": "Google LLC", - "main": "build/src/index.js", - "files": [ - "build/src", - "build/protos" - ], - "keywords": [ - "google apis client", - "google api client", - "google apis", - "google api", - "google", - "google cloud platform", - "google cloud", - "cloud", - "google service", - "service", - "environments", - "image versions" - ], - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "fix": "gts fix", - "lint": "gts check", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^4.3.4" - }, - "devDependencies": { - "@types/mocha": "^10.0.6", - "@types/node": "^20.12.12", - "@types/sinon": "^10.0.20", - "c8": "^9.1.0", - "gapic-tools": "^0.4.2", - "gts": "5.3.0", - "jsdoc": "^4.0.3", - "jsdoc-fresh": "^3.0.0", - "jsdoc-region-tag": "^3.0.0", - "mocha": "^10.4.0", - "pack-n-play": "^2.0.3", - "sinon": "^15.2.0", - "typescript": "5.1.6" - }, - "engines": { - "node": ">=v14" - } -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/environments.proto b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/environments.proto deleted file mode 100644 index 9976999b6f0..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/environments.proto +++ /dev/null @@ -1,2075 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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.orchestration.airflow.service.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/orchestration/airflow/service/v1/operations.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "cloud.google.com/go/orchestration/airflow/service/apiv1/servicepb;servicepb"; -option java_multiple_files = true; -option java_package = "com.google.cloud.orchestration.airflow.service.v1"; - -// Managed Apache Airflow Environments. -service Environments { - option (google.api.default_host) = "composer.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Create a new environment. - rpc CreateEnvironment(CreateEnvironmentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*}/environments" - body: "environment" - }; - option (google.api.method_signature) = "parent,environment"; - option (google.longrunning.operation_info) = { - response_type: "Environment" - metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - }; - } - - // Get an existing environment. - rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/environments/*}" - }; - option (google.api.method_signature) = "name"; - } - - // List environments. - rpc ListEnvironments(ListEnvironmentsRequest) - returns (ListEnvironmentsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/environments" - }; - option (google.api.method_signature) = "parent"; - } - - // Update an environment. - rpc UpdateEnvironment(UpdateEnvironmentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1/{name=projects/*/locations/*/environments/*}" - body: "environment" - }; - option (google.api.method_signature) = "name,environment,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Environment" - metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - }; - } - - // Delete an environment. - rpc DeleteEnvironment(DeleteEnvironmentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/environments/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - }; - } - - // Executes Airflow CLI command. - rpc ExecuteAirflowCommand(ExecuteAirflowCommandRequest) - returns (ExecuteAirflowCommandResponse) { - option (google.api.http) = { - post: "/v1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand" - body: "*" - }; - } - - // Stops Airflow CLI command execution. - rpc StopAirflowCommand(StopAirflowCommandRequest) - returns (StopAirflowCommandResponse) { - option (google.api.http) = { - post: "/v1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand" - body: "*" - }; - } - - // Polls Airflow CLI command execution and fetches logs. - rpc PollAirflowCommand(PollAirflowCommandRequest) - returns (PollAirflowCommandResponse) { - option (google.api.http) = { - post: "/v1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand" - body: "*" - }; - } - - // Lists workloads in a Cloud Composer environment. Workload is a unit that - // runs a single Composer component. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc ListWorkloads(ListWorkloadsRequest) returns (ListWorkloadsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/environments/*}/workloads" - }; - option (google.api.method_signature) = "parent"; - } - - // Check if an upgrade operation on the environment will succeed. - // - // In case of problems detailed info can be found in the returned Operation. - rpc CheckUpgrade(CheckUpgradeRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{environment=projects/*/locations/*/environments/*}:checkUpgrade" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse" - metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - }; - } - - // Creates a user workloads Secret. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc CreateUserWorkloadsSecret(CreateUserWorkloadsSecretRequest) - returns (UserWorkloadsSecret) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets" - body: "user_workloads_secret" - }; - option (google.api.method_signature) = "parent,user_workloads_secret"; - } - - // Gets an existing user workloads Secret. - // Values of the "data" field in the response are cleared. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc GetUserWorkloadsSecret(GetUserWorkloadsSecretRequest) - returns (UserWorkloadsSecret) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists user workloads Secrets. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc ListUserWorkloadsSecrets(ListUserWorkloadsSecretsRequest) - returns (ListUserWorkloadsSecretsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets" - }; - option (google.api.method_signature) = "parent"; - } - - // Updates a user workloads Secret. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc UpdateUserWorkloadsSecret(UpdateUserWorkloadsSecretRequest) - returns (UserWorkloadsSecret) { - option (google.api.http) = { - put: "/v1/{user_workloads_secret.name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" - body: "user_workloads_secret" - }; - option (google.api.method_signature) = "user_workloads_secret"; - } - - // Deletes a user workloads Secret. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc DeleteUserWorkloadsSecret(DeleteUserWorkloadsSecretRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a user workloads ConfigMap. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc CreateUserWorkloadsConfigMap(CreateUserWorkloadsConfigMapRequest) - returns (UserWorkloadsConfigMap) { - option (google.api.http) = { - post: "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps" - body: "user_workloads_config_map" - }; - option (google.api.method_signature) = "parent,user_workloads_config_map"; - } - - // Gets an existing user workloads ConfigMap. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc GetUserWorkloadsConfigMap(GetUserWorkloadsConfigMapRequest) - returns (UserWorkloadsConfigMap) { - option (google.api.http) = { - get: "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists user workloads ConfigMaps. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc ListUserWorkloadsConfigMaps(ListUserWorkloadsConfigMapsRequest) - returns (ListUserWorkloadsConfigMapsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps" - }; - option (google.api.method_signature) = "parent"; - } - - // Updates a user workloads ConfigMap. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc UpdateUserWorkloadsConfigMap(UpdateUserWorkloadsConfigMapRequest) - returns (UserWorkloadsConfigMap) { - option (google.api.http) = { - put: "/v1/{user_workloads_config_map.name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" - body: "user_workloads_config_map" - }; - option (google.api.method_signature) = "user_workloads_config_map"; - } - - // Deletes a user workloads ConfigMap. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc DeleteUserWorkloadsConfigMap(DeleteUserWorkloadsConfigMapRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a snapshots of a Cloud Composer environment. - // - // As a result of this operation, snapshot of environment's state is stored - // in a location specified in the SaveSnapshotRequest. - rpc SaveSnapshot(SaveSnapshotRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{environment=projects/*/locations/*/environments/*}:saveSnapshot" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse" - metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - }; - } - - // Loads a snapshot of a Cloud Composer environment. - // - // As a result of this operation, a snapshot of environment's specified in - // LoadSnapshotRequest is loaded into the environment. - rpc LoadSnapshot(LoadSnapshotRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{environment=projects/*/locations/*/environments/*}:loadSnapshot" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse" - metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - }; - } - - // Triggers database failover (only for highly resilient environments). - rpc DatabaseFailover(DatabaseFailoverRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1/{environment=projects/*/locations/*/environments/*}:databaseFailover" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse" - metadata_type: "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - }; - } - - // Fetches database properties. - rpc FetchDatabaseProperties(FetchDatabasePropertiesRequest) - returns (FetchDatabasePropertiesResponse) { - option (google.api.http) = { - get: "/v1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties" - }; - } -} - -// Create a new environment. -message CreateEnvironmentRequest { - // The parent must be of the form - // "projects/{projectId}/locations/{locationId}". - string parent = 1; - - // The environment to create. - Environment environment = 2; -} - -// Get an environment. -message GetEnvironmentRequest { - // The resource name of the environment to get, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string name = 1; -} - -// List environments in a project and location. -message ListEnvironmentsRequest { - // List environments in the given project and location, in the form: - // "projects/{projectId}/locations/{locationId}" - string parent = 1; - - // The maximum number of environments to return. - int32 page_size = 2; - - // The next_page_token value returned from a previous List request, if any. - string page_token = 3; -} - -// The environments in a project and location. -message ListEnvironmentsResponse { - // The list of environments returned by a ListEnvironmentsRequest. - repeated Environment environments = 1; - - // The page token used to query for the next page if one exists. - string next_page_token = 2; -} - -// Delete an environment. -message DeleteEnvironmentRequest { - // The environment to delete, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string name = 1; -} - -// Update an environment. -message UpdateEnvironmentRequest { - // The relative resource name of the environment to update, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string name = 2; - - // A patch environment. Fields specified by the `updateMask` will be copied - // from the patch environment into the environment under update. - Environment environment = 1; - - // Required. A comma-separated list of paths, relative to `Environment`, of - // fields to update. - // For example, to set the version of scikit-learn to install in the - // environment to 0.19.0 and to remove an existing installation of - // numpy, the `updateMask` parameter would include the following two - // `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and - // "config.softwareConfig.pypiPackages.numpy". The included patch - // environment would specify the scikit-learn version as follows: - // - // { - // "config":{ - // "softwareConfig":{ - // "pypiPackages":{ - // "scikit-learn":"==0.19.0" - // } - // } - // } - // } - // - // Note that in the above example, any existing PyPI packages - // other than scikit-learn and numpy will be unaffected. - // - // Only one update type may be included in a single request's `updateMask`. - // For example, one cannot update both the PyPI packages and - // labels in the same request. However, it is possible to update multiple - // members of a map field simultaneously in the same request. For example, - // to set the labels "label1" and "label2" while clearing "label3" (assuming - // it already exists), one can - // provide the paths "labels.label1", "labels.label2", and "labels.label3" - // and populate the patch environment as follows: - // - // { - // "labels":{ - // "label1":"new-label1-value" - // "label2":"new-label2-value" - // } - // } - // - // Note that in the above example, any existing labels that are not - // included in the `updateMask` will be unaffected. - // - // It is also possible to replace an entire map field by providing the - // map field's path in the `updateMask`. The new value of the field will - // be that which is provided in the patch environment. For example, to - // delete all pre-existing user-specified PyPI packages and - // install botocore at version 1.7.14, the `updateMask` would contain - // the path "config.softwareConfig.pypiPackages", and - // the patch environment would be the following: - // - // { - // "config":{ - // "softwareConfig":{ - // "pypiPackages":{ - // "botocore":"==1.7.14" - // } - // } - // } - // } - // - // **Note:** Only the following fields can be updated: - // - // * `config.softwareConfig.pypiPackages` - // * Replace all custom custom PyPI packages. If a replacement - // package map is not included in `environment`, all custom - // PyPI packages are cleared. It is an error to provide both - // this mask and a mask specifying an individual package. - // * `config.softwareConfig.pypiPackages.`packagename - // * Update the custom PyPI package *packagename*, - // preserving other packages. To delete the package, include it in - // `updateMask`, and omit the mapping for it in - // `environment.config.softwareConfig.pypiPackages`. It is an error - // to provide both a mask of this form and the - // `config.softwareConfig.pypiPackages` mask. - // * `labels` - // * Replace all environment labels. If a replacement labels map is not - // included in `environment`, all labels are cleared. It is an error to - // provide both this mask and a mask specifying one or more individual - // labels. - // * `labels.`labelName - // * Set the label named *labelName*, while preserving other - // labels. To delete the label, include it in `updateMask` and omit its - // mapping in `environment.labels`. It is an error to provide both a - // mask of this form and the `labels` mask. - // * `config.nodeCount` - // * Horizontally scale the number of nodes in the environment. An integer - // greater than or equal to 3 must be provided in the `config.nodeCount` - // field. Supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - // * `config.webServerNetworkAccessControl` - // * Replace the environment's current `WebServerNetworkAccessControl`. - // * `config.softwareConfig.airflowConfigOverrides` - // * Replace all Apache Airflow config overrides. If a replacement config - // overrides map is not included in `environment`, all config overrides - // are cleared. - // It is an error to provide both this mask and a mask specifying one or - // more individual config overrides. - // * `config.softwareConfig.airflowConfigOverrides.`section-name - // * Override the Apache Airflow config property *name* in the - // section named *section*, preserving other properties. To - // delete the property override, include it in `updateMask` and omit its - // mapping in - // `environment.config.softwareConfig.airflowConfigOverrides`. - // It is an error to provide both a mask of this form and the - // `config.softwareConfig.airflowConfigOverrides` mask. - // * `config.softwareConfig.envVariables` - // * Replace all environment variables. If a replacement environment - // variable map is not included in `environment`, all custom environment - // variables are cleared. - // * `config.softwareConfig.schedulerCount` - // * Horizontally scale the number of schedulers in Airflow. A positive - // integer not greater than the number of nodes must be provided in the - // `config.softwareConfig.schedulerCount` field. Supported for Cloud - // Composer environments in versions composer-1.*.*-airflow-2.*.*. - // * `config.databaseConfig.machineType` - // * Cloud SQL machine type used by Airflow database. - // It has to be one of: db-n1-standard-2, db-n1-standard-4, - // db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer - // environments in versions composer-1.*.*-airflow-*.*.*. - // * `config.webServerConfig.machineType` - // * Machine type on which Airflow web server is running. - // It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 - // or composer-n1-webserver-8. Supported for Cloud Composer environments - // in versions composer-1.*.*-airflow-*.*.*. - google.protobuf.FieldMask update_mask = 3; -} - -// Execute Airflow Command request. -message ExecuteAirflowCommandRequest { - // The resource name of the environment in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - string environment = 1; - - // Airflow command. - string command = 2; - - // Airflow subcommand. - string subcommand = 3; - - // Parameters for the Airflow command/subcommand as an array of arguments. - // It may contain positional arguments like `["my-dag-id"]`, key-value - // parameters like `["--foo=bar"]` or `["--foo","bar"]`, - // or other flags like `["-f"]`. - repeated string parameters = 4; -} - -// Response to ExecuteAirflowCommandRequest. -message ExecuteAirflowCommandResponse { - // The unique ID of the command execution for polling. - string execution_id = 1; - - // The name of the pod where the command is executed. - string pod = 2; - - // The namespace of the pod where the command is executed. - string pod_namespace = 3; - - // Error message. Empty if there was no error. - string error = 4; -} - -// Stop Airflow Command request. -message StopAirflowCommandRequest { - // The resource name of the environment in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - string environment = 1; - - // The unique ID of the command execution. - string execution_id = 2; - - // The name of the pod where the command is executed. - string pod = 3; - - // The namespace of the pod where the command is executed. - string pod_namespace = 4; - - // If true, the execution is terminated forcefully (SIGKILL). If false, the - // execution is stopped gracefully, giving it time for cleanup. - bool force = 5; -} - -// Response to StopAirflowCommandRequest. -message StopAirflowCommandResponse { - // Whether the execution is still running. - bool is_done = 1; - - // Output message from stopping execution request. - repeated string output = 2; -} - -// Poll Airflow Command request. -message PollAirflowCommandRequest { - // The resource name of the environment in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string environment = 1; - - // The unique ID of the command execution. - string execution_id = 2; - - // The name of the pod where the command is executed. - string pod = 3; - - // The namespace of the pod where the command is executed. - string pod_namespace = 4; - - // Line number from which new logs should be fetched. - int32 next_line_number = 5; -} - -// Response to PollAirflowCommandRequest. -message PollAirflowCommandResponse { - // Contains information about a single line from logs. - message Line { - // Number of the line. - int32 line_number = 1; - - // Text content of the log line. - string content = 2; - } - - // Information about how a command ended. - message ExitInfo { - // The exit code from the command execution. - int32 exit_code = 1; - - // Error message. Empty if there was no error. - string error = 2; - } - - // Output from the command execution. It may not contain the full output - // and the caller may need to poll for more lines. - repeated Line output = 1; - - // Whether the command execution has finished and there is no more output. - bool output_end = 2; - - // The result exit status of the command. - ExitInfo exit_info = 3; -} - -// Create user workloads Secret request. -message CreateUserWorkloadsSecretRequest { - // Required. The environment name to create a Secret for, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/Environment" - } - ]; - - // Required. User workloads Secret to create. - UserWorkloadsSecret user_workloads_secret = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// Get user workloads Secret request. -message GetUserWorkloadsSecretRequest { - // Required. The resource name of the Secret to get, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/UserWorkloadsSecret" - } - ]; -} - -// List user workloads Secrets request. -message ListUserWorkloadsSecretsRequest { - // Required. List Secrets in the given environment, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/Environment" - } - ]; - - // Optional. The maximum number of Secrets to return. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous List request, - // if any. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update user workloads Secret request. -message UpdateUserWorkloadsSecretRequest { - // Optional. User workloads Secret to override. - UserWorkloadsSecret user_workloads_secret = 1 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Delete user workloads Secret request. -message DeleteUserWorkloadsSecretRequest { - // Required. The Secret to delete, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/UserWorkloadsSecret" - } - ]; -} - -// Create user workloads ConfigMap request. -message CreateUserWorkloadsConfigMapRequest { - // Required. The environment name to create a ConfigMap for, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/Environment" - } - ]; - - // Required. User workloads ConfigMap to create. - UserWorkloadsConfigMap user_workloads_config_map = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// Get user workloads ConfigMap request. -message GetUserWorkloadsConfigMapRequest { - // Required. The resource name of the ConfigMap to get, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/UserWorkloadsConfigMap" - } - ]; -} - -// List user workloads ConfigMaps request. -message ListUserWorkloadsConfigMapsRequest { - // Required. List ConfigMaps in the given environment, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/Environment" - } - ]; - - // Optional. The maximum number of ConfigMaps to return. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous List request, - // if any. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update user workloads ConfigMap request. -message UpdateUserWorkloadsConfigMapRequest { - // Optional. User workloads ConfigMap to override. - UserWorkloadsConfigMap user_workloads_config_map = 1 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Delete user workloads ConfigMap request. -message DeleteUserWorkloadsConfigMapRequest { - // Required. The ConfigMap to delete, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/UserWorkloadsConfigMap" - } - ]; -} - -// User workloads Secret used by Airflow tasks that run with Kubernetes executor -// or KubernetesPodOperator. -message UserWorkloadsSecret { - option (google.api.resource) = { - type: "composer.googleapis.com/UserWorkloadsSecret" - pattern: "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}" - plural: "userWorkloadsSecrets" - singular: "userWorkloadsSecret" - }; - - // Identifier. The resource name of the Secret, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Optional. The "data" field of Kubernetes Secret, organized in key-value - // pairs, which can contain sensitive values such as a password, a token, or a - // key. The values for all keys have to be base64-encoded strings. For details - // see: https://kubernetes.io/docs/concepts/configuration/secret/ - map data = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The user workloads Secrets for a given environment. -message ListUserWorkloadsSecretsResponse { - // The list of Secrets returned by a ListUserWorkloadsSecretsRequest. - repeated UserWorkloadsSecret user_workloads_secrets = 1; - - // The page token used to query for the next page if one exists. - string next_page_token = 2; -} - -// User workloads ConfigMap used by Airflow tasks that run with Kubernetes -// executor or KubernetesPodOperator. -message UserWorkloadsConfigMap { - option (google.api.resource) = { - type: "composer.googleapis.com/UserWorkloadsConfigMap" - pattern: "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}" - plural: "userWorkloadsConfigMaps" - singular: "userWorkloadsConfigMap" - }; - - // Identifier. The resource name of the ConfigMap, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Optional. The "data" field of Kubernetes ConfigMap, organized in key-value - // pairs. For details see: - // https://kubernetes.io/docs/concepts/configuration/configmap/ - map data = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The user workloads ConfigMaps for a given environment. -message ListUserWorkloadsConfigMapsResponse { - // The list of ConfigMaps returned by a ListUserWorkloadsConfigMapsRequest. - repeated UserWorkloadsConfigMap user_workloads_config_maps = 1; - - // The page token used to query for the next page if one exists. - string next_page_token = 2; -} - -// Request for listing workloads in a Cloud Composer environment. -message ListWorkloadsRequest { - // Required. The environment name to get workloads for, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/Environment" - } - ]; - - // Optional. The maximum number of environments to return. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous List request, - // if any. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The list filter. - // Currently only supports equality on the type field. The value of a field - // specified in the filter expression must be one ComposerWorkloadType enum - // option. It's possible to get multiple types using "OR" operator, e.g.: - // "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are - // returned. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response to ListWorkloadsRequest. -message ListWorkloadsResponse { - // Information about a single workload. - message ComposerWorkload { - // Name of a workload. - string name = 1; - - // Type of a workload. - ComposerWorkloadType type = 2; - - // Output only. Status of a workload. - ComposerWorkloadStatus status = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Supported workload types. - enum ComposerWorkloadType { - // Not able to determine the type of the workload. - COMPOSER_WORKLOAD_TYPE_UNSPECIFIED = 0; - - // Celery worker. - CELERY_WORKER = 1; - - // Kubernetes worker. - KUBERNETES_WORKER = 2; - - // Workload created by Kubernetes Pod Operator. - KUBERNETES_OPERATOR_POD = 3; - - // Airflow scheduler. - SCHEDULER = 4; - - // Airflow Dag processor. - DAG_PROCESSOR = 5; - - // Airflow triggerer. - TRIGGERER = 6; - - // Airflow web server UI. - WEB_SERVER = 7; - - // Redis. - REDIS = 8; - } - - // Workload status. - message ComposerWorkloadStatus { - // Output only. Workload state. - ComposerWorkloadState state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Text to provide more descriptive status. - string status_message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Detailed message of the status. - string detailed_status_message = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Workload states. - enum ComposerWorkloadState { - // Not able to determine the status of the workload. - COMPOSER_WORKLOAD_STATE_UNSPECIFIED = 0; - - // Workload is in pending state and has not yet started. - PENDING = 1; - - // Workload is running fine. - OK = 2; - - // Workload is running but there are some non-critical problems. - WARNING = 3; - - // Workload is not running due to an error. - ERROR = 4; - - // Workload has finished execution with success. - SUCCEEDED = 5; - - // Workload has finished execution with failure. - FAILED = 6; - } - - // The list of environment workloads. - repeated ComposerWorkload workloads = 1; - - // The page token used to query for the next page if one exists. - string next_page_token = 2; -} - -// Request to create a snapshot of a Cloud Composer environment. -message SaveSnapshotRequest { - // The resource name of the source environment in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string environment = 1; - - // Location in a Cloud Storage where the snapshot is going to be stored, e.g.: - // "gs://my-bucket/snapshots". - string snapshot_location = 2; -} - -// Response to SaveSnapshotRequest. -message SaveSnapshotResponse { - // The fully-resolved Cloud Storage path of the created snapshot, - // e.g.: - // "gs://my-bucket/snapshots/project_location_environment_timestamp". - // This field is populated only if the snapshot creation was successful. - string snapshot_path = 1; -} - -// Request to load a snapshot into a Cloud Composer environment. -message LoadSnapshotRequest { - // The resource name of the target environment in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string environment = 1; - - // A Cloud Storage path to a snapshot to load, e.g.: - // "gs://my-bucket/snapshots/project_location_environment_timestamp". - string snapshot_path = 2; - - // Whether or not to skip installing Pypi packages when loading the - // environment's state. - bool skip_pypi_packages_installation = 3; - - // Whether or not to skip setting environment variables when loading the - // environment's state. - bool skip_environment_variables_setting = 4; - - // Whether or not to skip setting Airflow overrides when loading the - // environment's state. - bool skip_airflow_overrides_setting = 5; - - // Whether or not to skip copying Cloud Storage data when loading the - // environment's state. - bool skip_gcs_data_copying = 6; -} - -// Response to LoadSnapshotRequest. -message LoadSnapshotResponse {} - -// Request to trigger database failover (only for highly resilient -// environments). -message DatabaseFailoverRequest { - // Target environment: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string environment = 1; -} - -// Response for DatabaseFailoverRequest. -message DatabaseFailoverResponse {} - -// Request to fetch properties of environment's database. -message FetchDatabasePropertiesRequest { - // Required. The resource name of the environment, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string environment = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/Environment" - } - ]; -} - -// Response for FetchDatabasePropertiesRequest. -message FetchDatabasePropertiesResponse { - // The Compute Engine zone that the instance is currently serving from. - string primary_gce_zone = 1; - - // The Compute Engine zone that the failover instance is currently serving - // from for a regional Cloud SQL instance. - string secondary_gce_zone = 2; - - // The availability status of the failover replica. A false status indicates - // that the failover replica is out of sync. The primary instance can only - // fail over to the failover replica when the status is true. - bool is_failover_replica_available = 3; -} - -// The configuration for data storage in the environment. -message StorageConfig { - // Optional. The name of the Cloud Storage bucket used by the environment. No - // `gs://` prefix. - string bucket = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration information for an environment. -message EnvironmentConfig { - // The size of the Cloud Composer environment. - enum EnvironmentSize { - // The size of the environment is unspecified. - ENVIRONMENT_SIZE_UNSPECIFIED = 0; - - // The environment size is small. - ENVIRONMENT_SIZE_SMALL = 1; - - // The environment size is medium. - ENVIRONMENT_SIZE_MEDIUM = 2; - - // The environment size is large. - ENVIRONMENT_SIZE_LARGE = 3; - } - - // Resilience mode of the Cloud Composer Environment. - enum ResilienceMode { - // Default mode doesn't change environment parameters. - RESILIENCE_MODE_UNSPECIFIED = 0; - - // Enabled High Resilience mode, including Cloud SQL HA. - HIGH_RESILIENCE = 1; - } - - // Output only. The Kubernetes Engine cluster used to run this environment. - string gke_cluster = 1; - - // Output only. The Cloud Storage prefix of the DAGs for this environment. - // Although Cloud Storage objects reside in a flat namespace, a hierarchical - // file tree can be simulated using "/"-delimited object name prefixes. DAG - // objects for this environment reside in a simulated directory with the given - // prefix. - string dag_gcs_prefix = 2; - - // The number of nodes in the Kubernetes Engine cluster that will be - // used to run this environment. - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - int32 node_count = 3; - - // The configuration settings for software inside the environment. - SoftwareConfig software_config = 4; - - // The configuration used for the Kubernetes Engine cluster. - NodeConfig node_config = 5; - - // The configuration used for the Private IP Cloud Composer environment. - PrivateEnvironmentConfig private_environment_config = 7; - - // Optional. The network-level access control policy for the Airflow web - // server. If unspecified, no network-level access restrictions will be - // applied. - WebServerNetworkAccessControl web_server_network_access_control = 8 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The configuration settings for Cloud SQL instance used internally - // by Apache Airflow software. - DatabaseConfig database_config = 9 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The configuration settings for the Airflow web server App Engine - // instance. - WebServerConfig web_server_config = 10 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The encryption options for the Cloud Composer environment - // and its dependencies. Cannot be updated. - EncryptionConfig encryption_config = 11 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The maintenance window is the period when Cloud Composer - // components may undergo maintenance. It is defined so that maintenance is - // not executed during peak hours or critical time periods. - // - // The system will not be under maintenance for every occurrence of this - // window, but when maintenance is planned, it will be scheduled - // during the window. - // - // The maintenance window period must encompass at least 12 hours per week. - // This may be split into multiple chunks, each with a size of - // at least 4 hours. - // - // If this value is omitted, the default value for maintenance window is - // applied. By default, maintenance windows are from 00:00:00 to 04:00:00 - // (GMT) on Friday, Saturday, and Sunday every week. - MaintenanceWindow maintenance_window = 12 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The workloads configuration settings for the GKE cluster - // associated with the Cloud Composer environment. The GKE cluster runs - // Airflow scheduler, web server and workers workloads. - // - // This field is supported for Cloud Composer environments in versions - // composer-2.*.*-airflow-*.*.* and newer. - WorkloadsConfig workloads_config = 15 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The size of the Cloud Composer environment. - // - // This field is supported for Cloud Composer environments in versions - // composer-2.*.*-airflow-*.*.* and newer. - EnvironmentSize environment_size = 16 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The URI of the Apache Airflow Web UI hosted within this - // environment (see [Airflow web - // interface](/composer/docs/how-to/accessing/airflow-web-interface)). - string airflow_uri = 6; - - // Output only. The 'bring your own identity' variant of the URI of the Apache - // Airflow Web UI hosted within this environment, to be accessed with external - // identities using workforce identity federation (see [Access environments - // with workforce identity - // federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). - string airflow_byoid_uri = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The configuration options for GKE cluster master authorized - // networks. By default master authorized networks feature is: - // - in case of private environment: enabled with no external networks - // allowlisted. - // - in case of public environment: disabled. - MasterAuthorizedNetworksConfig master_authorized_networks_config = 17 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Recovery settings configuration of an environment. - // - // This field is supported for Cloud Composer environments in versions - // composer-2.*.*-airflow-*.*.* and newer. - RecoveryConfig recovery_config = 18 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Resilience mode of the Cloud Composer Environment. - // - // This field is supported for Cloud Composer environments in versions - // composer-2.2.0-airflow-*.*.* and newer. - ResilienceMode resilience_mode = 19 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The configuration setting for Airflow database data retention - // mechanism. - DataRetentionConfig data_retention_config = 21 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Network-level access control policy for the Airflow web server. -message WebServerNetworkAccessControl { - // Allowed IP range with user-provided description. - message AllowedIpRange { - // IP address or range, defined using CIDR notation, of requests that this - // rule applies to. - // Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` - // or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. - // - // IP range prefixes should be properly truncated. For example, - // `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, - // `2001:db8::1/32` should be truncated to `2001:db8::/32`. - string value = 1; - - // Optional. User-provided description. It must contain at most 300 - // characters. - string description = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // A collection of allowed IP ranges with descriptions. - repeated AllowedIpRange allowed_ip_ranges = 1; -} - -// The configuration of Cloud SQL instance that is used by the Apache Airflow -// software. -message DatabaseConfig { - // Optional. Cloud SQL machine type used by Airflow database. - // It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 - // or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. - // Supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Compute Engine zone where the Airflow database is created. If - // zone is provided, it must be in the region selected for the environment. If - // zone is not provided, a zone is automatically selected. The zone can only - // be set during environment creation. Supported for Cloud Composer - // environments in versions composer-2.*.*-airflow-*.*.*. - string zone = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The configuration settings for the Airflow web server App Engine instance. -// Supported for Cloud Composer environments in versions -// composer-1.*.*-airflow-*.*.* -message WebServerConfig { - // Optional. Machine type on which Airflow web server is running. - // It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or - // composer-n1-webserver-8. - // If not specified, composer-n1-webserver-2 will be used. - // Value custom is returned only in response, if Airflow web server parameters - // were manually changed to a non-standard values. - string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// The encryption options for the Cloud Composer environment -// and its dependencies.Supported for Cloud Composer environments in versions -// composer-1.*.*-airflow-*.*.*. -message EncryptionConfig { - // Optional. Customer-managed Encryption Key available through Google's Key - // Management Service. Cannot be updated. If not specified, Google-managed key - // will be used. - string kms_key_name = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// The configuration settings for Cloud Composer maintenance window. -// The following example: -// -// ``` -// { -// "startTime":"2019-08-01T01:00:00Z" -// "endTime":"2019-08-01T07:00:00Z" -// "recurrence":"FREQ=WEEKLY;BYDAY=TU,WE" -// } -// ``` -// -// would define a maintenance window between 01 and 07 hours UTC during -// each Tuesday and Wednesday. -message MaintenanceWindow { - // Required. Start time of the first recurrence of the maintenance window. - google.protobuf.Timestamp start_time = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Maintenance window end time. It is used only to calculate the - // duration of the maintenance window. The value for end-time must be in the - // future, relative to `start_time`. - google.protobuf.Timestamp end_time = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Maintenance window recurrence. Format is a subset of - // [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed - // values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` - // Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. - string recurrence = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Specifies the selection and configuration of software inside the environment. -message SoftwareConfig { - // Web server plugins mode of the Cloud Composer environment. - enum WebServerPluginsMode { - // Default mode. - WEB_SERVER_PLUGINS_MODE_UNSPECIFIED = 0; - - // Web server plugins are not supported. - PLUGINS_DISABLED = 1; - - // Web server plugins are supported. - PLUGINS_ENABLED = 2; - } - - // The version of the software running in the environment. - // This encapsulates both the version of Cloud Composer functionality and the - // version of Apache Airflow. It must match the regular expression - // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. - // When used as input, the server also checks if the provided version is - // supported and denies the request for an unsupported version. - // - // The Cloud Composer portion of the image version is a full - // [semantic version](https://semver.org), or an alias in the form of major - // version number or `latest`. When an alias is provided, the server replaces - // it with the current Cloud Composer version that satisfies the alias. - // - // The Apache Airflow portion of the image version is a full semantic version - // that points to one of the supported Apache Airflow versions, or an alias in - // the form of only major or major.minor versions specified. When an alias is - // provided, the server replaces it with the latest Apache Airflow version - // that satisfies the alias and is supported in the given Cloud Composer - // version. - // - // In all cases, the resolved image version is stored in the same field. - // - // See also [version - // list](/composer/docs/concepts/versioning/composer-versions) and [versioning - // overview](/composer/docs/concepts/versioning/composer-versioning-overview). - string image_version = 1; - - // Optional. Apache Airflow configuration properties to override. - // - // Property keys contain the section and property names, separated by a - // hyphen, for example "core-dags_are_paused_at_creation". Section names must - // not contain hyphens ("-"), opening square brackets ("["), or closing - // square brackets ("]"). The property name must not be empty and must not - // contain an equals sign ("=") or semicolon (";"). Section and property names - // must not contain a period ("."). Apache Airflow configuration property - // names must be written in - // [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can - // contain any character, and can be written in any lower/upper case format. - // - // Certain Apache Airflow configuration property values are - // [blocked](/composer/docs/concepts/airflow-configurations), - // and cannot be overridden. - map airflow_config_overrides = 2; - - // Optional. Custom Python Package Index (PyPI) packages to be installed in - // the environment. - // - // Keys refer to the lowercase package name such as "numpy" - // and values are the lowercase extras and version specifier such as - // "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a - // package without pinning it to a version specifier, use the empty string as - // the value. - map pypi_packages = 3; - - // Optional. Additional environment variables to provide to the Apache Airflow - // scheduler, worker, and webserver processes. - // - // Environment variable names must match the regular expression - // `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow - // software configuration overrides (they cannot match the regular expression - // `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the - // following reserved names: - // - // * `AIRFLOW_HOME` - // * `C_FORCE_ROOT` - // * `CONTAINER_NAME` - // * `DAGS_FOLDER` - // * `GCP_PROJECT` - // * `GCS_BUCKET` - // * `GKE_CLUSTER_NAME` - // * `SQL_DATABASE` - // * `SQL_INSTANCE` - // * `SQL_PASSWORD` - // * `SQL_PROJECT` - // * `SQL_REGION` - // * `SQL_USER` - map env_variables = 4; - - // Optional. The major version of Python used to run the Apache Airflow - // scheduler, worker, and webserver processes. - // - // Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be - // updated. - // - // This field is only supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. Environments in newer versions always use - // Python major version 3. - string python_version = 6; - - // Optional. The number of schedulers for Airflow. - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-2.*.*. - int32 scheduler_count = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The configuration for Cloud Data Lineage integration. - CloudDataLineageIntegration cloud_data_lineage_integration = 8 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether or not the web server uses custom plugins. - // If unspecified, the field defaults to `PLUGINS_ENABLED`. - // - // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - WebServerPluginsMode web_server_plugins_mode = 10 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration for controlling how IPs are allocated in the -// GKE cluster running the Apache Airflow software. -message IPAllocationPolicy { - // Optional. Whether or not to enable Alias IPs in the GKE cluster. - // If `true`, a VPC-native cluster is created. - // - // This field is only supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. Environments in newer versions always use - // VPC-native GKE clusters. - bool use_ip_aliases = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Configuration of allocating IP addresses for pods in the GKE cluster. - oneof cluster_ip_allocation { - // Optional. The name of the GKE cluster's secondary range used to allocate - // IP addresses to pods. - // - // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - // this field is applicable only when `use_ip_aliases` is true. - string cluster_secondary_range_name = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The IP address range used to allocate IP addresses to pods in - // the GKE cluster. - // - // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - // this field is applicable only when `use_ip_aliases` is true. - // - // Set to blank to have GKE choose a range with the default size. - // - // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific - // netmask. - // - // Set to a - // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - // to use. - string cluster_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // Configuration of allocating IP addresses for services in the GKE cluster. - oneof services_ip_allocation { - // Optional. The name of the services' secondary range used to allocate - // IP addresses to the GKE cluster. - // - // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - // this field is applicable only when `use_ip_aliases` is true. - string services_secondary_range_name = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The IP address range of the services IP addresses in this - // GKE cluster. - // - // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - // this field is applicable only when `use_ip_aliases` is true. - // - // Set to blank to have GKE choose a range with the default size. - // - // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific - // netmask. - // - // Set to a - // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - // to use. - string services_ipv4_cidr_block = 5 - [(google.api.field_behavior) = OPTIONAL]; - } -} - -// The configuration information for the Kubernetes Engine nodes running -// the Apache Airflow software. -message NodeConfig { - // Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which - // to deploy the VMs used to run the Apache Airflow software, specified as a - // [relative resource - // name](/apis/design/resource_names#relative_resource_name). For example: - // "projects/{projectId}/zones/{zoneId}". - // - // This `location` must belong to the enclosing environment's project and - // location. If both this field and `nodeConfig.machineType` are specified, - // `nodeConfig.machineType` must belong to this `location`; if both are - // unspecified, the service will pick a zone in the Compute Engine region - // corresponding to the Cloud Composer location, and propagate that choice to - // both fields. If only one field (`location` or `nodeConfig.machineType`) is - // specified, the location information from the specified field will be - // propagated to the unspecified field. - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - string location = 1; - - // Optional. The Compute Engine - // [machine type](/compute/docs/machine-types) used for cluster instances, - // specified as a - // [relative resource - // name](/apis/design/resource_names#relative_resource_name). For example: - // "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". - // - // The `machineType` must belong to the enclosing environment's project and - // location. If both this field and `nodeConfig.location` are specified, - // this `machineType` must belong to the `nodeConfig.location`; if both are - // unspecified, the service will pick a zone in the Compute Engine region - // corresponding to the Cloud Composer location, and propagate that choice to - // both fields. If exactly one of this field and `nodeConfig.location` is - // specified, the location information from the specified field will be - // propagated to the unspecified field. - // - // The `machineTypeId` must not be a [shared-core machine - // type](/compute/docs/machine-types#sharedcore). - // - // If this field is unspecified, the `machineTypeId` defaults - // to "n1-standard-1". - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - string machine_type = 2; - - // Optional. The Compute Engine network to be used for machine - // communications, specified as a - // [relative resource - // name](/apis/design/resource_names#relative_resource_name). For example: - // "projects/{projectId}/global/networks/{networkId}". - // - // If unspecified, the "default" network ID in the environment's project is - // used. If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) - // is provided, `nodeConfig.subnetwork` must also be provided. For - // [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see - // `nodeConfig.subnetwork`. - string network = 3; - - // Optional. The Compute Engine subnetwork to be used for machine - // communications, specified as a - // [relative resource - // name](/apis/design/resource_names#relative_resource_name). For example: - // "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" - // - // If a subnetwork is provided, `nodeConfig.network` must also be provided, - // and the subnetwork must belong to the enclosing environment's project and - // location. - string subnetwork = 4; - - // Optional. The disk size in GB used for node VMs. Minimum size is 30GB. - // If unspecified, defaults to 100GB. Cannot be updated. - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - int32 disk_size_gb = 5; - - // Optional. The set of Google API scopes to be made available on all - // node VMs. If `oauth_scopes` is empty, defaults to - // ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - repeated string oauth_scopes = 6; - - // Optional. The Google Cloud Platform Service Account to be used by the node - // VMs. If a service account is not specified, the "default" Compute Engine - // service account is used. Cannot be updated. - string service_account = 7; - - // Optional. The list of instance tags applied to all node VMs. Tags are used - // to identify valid sources or targets for network firewalls. Each tag within - // the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - // Cannot be updated. - repeated string tags = 8; - - // Optional. The configuration for controlling how IPs are allocated in the - // GKE cluster. - IPAllocationPolicy ip_allocation_policy = 9 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines - // nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for - // all destination addresses, except between pods traffic. - // - // See: - // https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent - bool enable_ip_masq_agent = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Network Attachment that Cloud Composer environment is connected - // to, which provides connectivity with a user's VPC network. Takes precedence - // over network and subnetwork settings. If not provided, but network and - // subnetwork are defined during environment, it will be provisioned. If not - // provided and network and subnetwork are also empty, then connectivity to - // user's VPC network is disabled. Network attachment must be provided in - // format - // projects/{project}/regions/{region}/networkAttachments/{networkAttachment}. - // - // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - string composer_network_attachment = 12 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The IP range in CIDR notation to use internally by Cloud - // Composer. IP addresses are not reserved - and the same range can be used by - // multiple Cloud Composer environments. In case of overlap, IPs from this - // range will not be accessible in the user's VPC network. Cannot be updated. - // If not specified, the default value of '100.64.128.0/20' is used. - // - // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - string composer_internal_ipv4_cidr_block = 13 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration options for the private GKE cluster in a Cloud Composer -// environment. -message PrivateClusterConfig { - // Optional. If `true`, access to the public endpoint of the GKE cluster is - // denied. - bool enable_private_endpoint = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The CIDR block from which IPv4 range for GKE master will be - // reserved. If left blank, the default value of '172.16.0.0/23' is used. - string master_ipv4_cidr_block = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The IP range in CIDR notation to use for the hosted master - // network. This range is used for assigning internal IP addresses to the GKE - // cluster master or set of masters and to the internal load balancer virtual - // IP. This range must not overlap with any other ranges in use within the - // cluster's network. - string master_ipv4_reserved_range = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Configuration options for networking connections in the Composer 2 -// environment. -message NetworkingConfig { - // Represents connection type between Composer environment in Customer - // Project and the corresponding Tenant project, from a predefined list - // of available connection modes. - enum ConnectionType { - // No specific connection type was requested, so the environment uses - // the default value corresponding to the rest of its configuration. - CONNECTION_TYPE_UNSPECIFIED = 0; - - // Requests the use of VPC peerings for connecting the Customer and Tenant - // projects. - VPC_PEERING = 1; - - // Requests the use of Private Service Connect for connecting the Customer - // and Tenant projects. - PRIVATE_SERVICE_CONNECT = 2; - } - - // Optional. Indicates the user requested specifc connection type between - // Tenant and Customer projects. You cannot set networking connection type in - // public IP environment. - ConnectionType connection_type = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// The configuration information for configuring a Private IP Cloud Composer -// environment. -message PrivateEnvironmentConfig { - // Optional. If `true`, a Private IP Cloud Composer environment is created. - // If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be - // set to true for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - bool enable_private_environment = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If `true`, builds performed during operations that install Python - // packages have only private connectivity to Google services (including - // Artifact Registry) and VPC network (if either `NodeConfig.network` and - // `NodeConfig.subnetwork` fields or `NodeConfig.composer_network_attachment` - // field are specified). If `false`, the builds also have access to the - // internet. - // - // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - bool enable_private_builds_only = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration for the private GKE cluster for a Private IP - // Cloud Composer environment. - PrivateClusterConfig private_cluster_config = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The CIDR block from which IP range for web server will be - // reserved. Needs to be disjoint from - // `private_cluster_config.master_ipv4_cidr_block` and - // `cloud_sql_ipv4_cidr_block`. - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - string web_server_ipv4_cidr_block = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The CIDR block from which IP range in tenant project will be - // reserved for Cloud SQL. Needs to be disjoint from - // `web_server_ipv4_cidr_block`. - string cloud_sql_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The IP range reserved for the tenant project's App Engine VMs. - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - string web_server_ipv4_reserved_range = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The CIDR block from which IP range for Cloud Composer Network in - // tenant project will be reserved. Needs to be disjoint from - // private_cluster_config.master_ipv4_cidr_block and - // cloud_sql_ipv4_cidr_block. - // - // This field is supported for Cloud Composer environments in versions - // composer-2.*.*-airflow-*.*.* and newer. - string cloud_composer_network_ipv4_cidr_block = 7 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The IP range reserved for the tenant project's Cloud Composer - // network. - // - // This field is supported for Cloud Composer environments in versions - // composer-2.*.*-airflow-*.*.* and newer. - string cloud_composer_network_ipv4_reserved_range = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. When enabled, IPs from public (non-RFC1918) ranges can be used - // for `IPAllocationPolicy.cluster_ipv4_cidr_block` and - // `IPAllocationPolicy.service_ipv4_cidr_block`. - bool enable_privately_used_public_ips = 6 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. When specified, the environment will use Private Service Connect - // instead of VPC peerings to connect to Cloud SQL in the Tenant Project, - // and the PSC endpoint in the Customer Project will use an IP address from - // this subnetwork. - string cloud_composer_connection_subnetwork = 9 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration for the network connections configuration in the - // environment. - NetworkingConfig networking_config = 10 - [(google.api.field_behavior) = OPTIONAL]; -} - -// The Kubernetes workloads configuration for GKE cluster associated with the -// Cloud Composer environment. Supported for Cloud Composer environments in -// versions composer-2.*.*-airflow-*.*.* and newer. -message WorkloadsConfig { - // Configuration for resources used by Airflow schedulers. - message SchedulerResource { - // Optional. CPU request and limit for a single Airflow scheduler replica. - float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Memory (GB) request and limit for a single Airflow scheduler - // replica. - float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Storage (GB) request and limit for a single Airflow scheduler - // replica. - float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of schedulers. - int32 count = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // Configuration for resources used by Airflow web server. - message WebServerResource { - // Optional. CPU request and limit for Airflow web server. - float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Memory (GB) request and limit for Airflow web server. - float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Storage (GB) request and limit for Airflow web server. - float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // Configuration for resources used by Airflow workers. - message WorkerResource { - // Optional. CPU request and limit for a single Airflow worker replica. - float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Memory (GB) request and limit for a single Airflow worker - // replica. - float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Storage (GB) request and limit for a single Airflow worker - // replica. - float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Minimum number of workers for autoscaling. - int32 min_count = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Maximum number of workers for autoscaling. - int32 max_count = 5 [(google.api.field_behavior) = OPTIONAL]; - } - - // Configuration for resources used by Airflow triggerers. - message TriggererResource { - // Optional. The number of triggerers. - int32 count = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. CPU request and limit for a single Airflow triggerer replica. - float cpu = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Memory (GB) request and limit for a single Airflow triggerer - // replica. - float memory_gb = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // Configuration for resources used by Airflow DAG processors. - // - // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - message DagProcessorResource { - // Optional. CPU request and limit for a single Airflow DAG processor - // replica. - float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Memory (GB) request and limit for a single Airflow DAG - // processor replica. - float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Storage (GB) request and limit for a single Airflow DAG - // processor replica. - float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of DAG processors. If not provided or set to 0, a - // single DAG processor instance will be created. - int32 count = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. Resources used by Airflow schedulers. - SchedulerResource scheduler = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Resources used by Airflow web server. - WebServerResource web_server = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Resources used by Airflow workers. - WorkerResource worker = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Resources used by Airflow triggerers. - TriggererResource triggerer = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Resources used by Airflow DAG processors. - // - // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - DagProcessorResource dag_processor = 5 - [(google.api.field_behavior) = OPTIONAL]; -} - -// The Recovery settings of an environment. -message RecoveryConfig { - // Optional. The configuration for scheduled snapshot creation mechanism. - ScheduledSnapshotsConfig scheduled_snapshots_config = 1 - [(google.api.field_behavior) = OPTIONAL]; -} - -// The configuration for scheduled snapshot creation mechanism. -message ScheduledSnapshotsConfig { - // Optional. Whether scheduled snapshots creation is enabled. - bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Cloud Storage location for storing automatically created - // snapshots. - string snapshot_location = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The cron expression representing the time when snapshots creation - // mechanism runs. This field is subject to additional validation around - // frequency of execution. - string snapshot_creation_schedule = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Time zone that sets the context to interpret - // snapshot_creation_schedule. - string time_zone = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration options for the master authorized networks feature. Enabled -// master authorized networks will disallow all external traffic to access -// Kubernetes master through HTTPS except traffic from the given CIDR blocks, -// Google Compute Engine Public IPs and Google Prod IPs. -message MasterAuthorizedNetworksConfig { - // CIDR block with an optional name. - message CidrBlock { - // User-defined name that identifies the CIDR block. - string display_name = 1; - - // CIDR block that must be specified in CIDR notation. - string cidr_block = 2; - } - - // Whether or not master authorized networks feature is enabled. - bool enabled = 1; - - // Up to 50 external networks that could access Kubernetes master through - // HTTPS. - repeated CidrBlock cidr_blocks = 2; -} - -// Configuration for Cloud Data Lineage integration. -message CloudDataLineageIntegration { - // Optional. Whether or not Cloud Data Lineage integration is enabled. - bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// An environment for running orchestration tasks. -message Environment { - option (google.api.resource) = { - type: "composer.googleapis.com/Environment" - pattern: "projects/{project}/locations/{location}/environments/{environment}" - }; - - // State of the environment. - enum State { - // The state of the environment is unknown. - STATE_UNSPECIFIED = 0; - - // The environment is in the process of being created. - CREATING = 1; - - // The environment is currently running and healthy. It is ready for use. - RUNNING = 2; - - // The environment is being updated. It remains usable but cannot receive - // additional update requests or be deleted at this time. - UPDATING = 3; - - // The environment is undergoing deletion. It cannot be used. - DELETING = 4; - - // The environment has encountered an error and cannot be used. - ERROR = 5; - } - - // The resource name of the environment, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - // - // EnvironmentId must start with a lowercase letter followed by up to 63 - // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - string name = 1; - - // Configuration parameters for this environment. - EnvironmentConfig config = 2; - - // Output only. The UUID (Universally Unique IDentifier) associated with this - // environment. This value is generated when the environment is created. - string uuid = 3; - - // The current state of the environment. - State state = 4; - - // Output only. The time at which this environment was created. - google.protobuf.Timestamp create_time = 5; - - // Output only. The time at which this environment was last modified. - google.protobuf.Timestamp update_time = 6; - - // Optional. User-defined labels for this environment. - // The labels map can contain no more than 64 entries. Entries of the labels - // map are UTF8 strings that comply with the following restrictions: - // - // * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} - // * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} - // * Both keys and values are additionally constrained to be <= 128 bytes in - // size. - map labels = 7; - - // Output only. Reserved for future use. - bool satisfies_pzs = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reserved for future use. - bool satisfies_pzi = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Storage configuration for this environment. - StorageConfig storage_config = 9 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request to check whether image upgrade will succeed. -message CheckUpgradeRequest { - // Required. The resource name of the environment to check upgrade for, in the - // form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string environment = 1 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The version of the software running in the environment. - // This encapsulates both the version of Cloud Composer functionality and the - // version of Apache Airflow. It must match the regular expression - // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. - // When used as input, the server also checks if the provided version is - // supported and denies the request for an unsupported version. - // - // The Cloud Composer portion of the image version is a full - // [semantic version](https://semver.org), or an alias in the form of major - // version number or `latest`. When an alias is provided, the server replaces - // it with the current Cloud Composer version that satisfies the alias. - // - // The Apache Airflow portion of the image version is a full semantic version - // that points to one of the supported Apache Airflow versions, or an alias in - // the form of only major or major.minor versions specified. When an alias is - // provided, the server replaces it with the latest Apache Airflow version - // that satisfies the alias and is supported in the given Cloud Composer - // version. - // - // In all cases, the resolved image version is stored in the same field. - // - // See also [version - // list](/composer/docs/concepts/versioning/composer-versions) and [versioning - // overview](/composer/docs/concepts/versioning/composer-versioning-overview). - string image_version = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// Message containing information about the result of an upgrade check -// operation. -message CheckUpgradeResponse { - // Whether there were python modules conflict during image build. - enum ConflictResult { - // It is unknown whether build had conflicts or not. - CONFLICT_RESULT_UNSPECIFIED = 0; - - // There were python packages conflicts. - CONFLICT = 1; - - // There were no python packages conflicts. - NO_CONFLICT = 2; - } - - // Output only. Url for a docker build log of an upgraded image. - string build_log_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Whether build has succeeded or failed on modules conflicts. - ConflictResult contains_pypi_modules_conflict = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Extract from a docker image build log containing information - // about pypi modules conflicts. - string pypi_conflict_build_log_extract = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Composer image for which the build was happening. - string image_version = 5; - - // Pypi dependencies specified in the environment configuration, at the time - // when the build was triggered. - map pypi_dependencies = 6; -} - -// The configuration setting for Airflow database data retention mechanism. -message DataRetentionConfig { - // Optional. The retention policy for airflow metadata database. - AirflowMetadataRetentionPolicyConfig airflow_metadata_retention_config = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The configuration settings for task logs retention - TaskLogsRetentionConfig task_logs_retention_config = 2 - [(google.api.field_behavior) = OPTIONAL]; -} - -// The configuration setting for Task Logs. -message TaskLogsRetentionConfig { - // The definition of task_logs_storage_mode. - enum TaskLogsStorageMode { - // This configuration is not specified by the user. - TASK_LOGS_STORAGE_MODE_UNSPECIFIED = 0; - - // Store task logs in Cloud Logging and in the environment's Cloud Storage - // bucket. - CLOUD_LOGGING_AND_CLOUD_STORAGE = 1; - - // Store task logs in Cloud Logging only. - CLOUD_LOGGING_ONLY = 2; - } - - // Optional. The mode of storage for Airflow workers task logs. - TaskLogsStorageMode storage_mode = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The policy for airflow metadata database retention. -message AirflowMetadataRetentionPolicyConfig { - // Describes retention policy. - enum RetentionMode { - // Default mode doesn't change environment parameters. - RETENTION_MODE_UNSPECIFIED = 0; - - // Retention policy is enabled. - RETENTION_MODE_ENABLED = 1; - - // Retention policy is disabled. - RETENTION_MODE_DISABLED = 2; - } - - // Optional. Retention can be either enabled or disabled. - RetentionMode retention_mode = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. How many days data should be retained for. - int32 retention_days = 2 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto deleted file mode 100644 index 94c92b8ec7f..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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.orchestration.airflow.service.v1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/type/date.proto"; - -option go_package = "cloud.google.com/go/orchestration/airflow/service/apiv1/servicepb;servicepb"; -option java_multiple_files = true; -option java_package = "com.google.cloud.orchestration.airflow.service.v1"; - -// Readonly service to query available ImageVersions. -service ImageVersions { - option (google.api.default_host) = "composer.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // List ImageVersions for provided location. - rpc ListImageVersions(ListImageVersionsRequest) - returns (ListImageVersionsResponse) { - option (google.api.http) = { - get: "/v1/{parent=projects/*/locations/*}/imageVersions" - }; - option (google.api.method_signature) = "parent"; - } -} - -// List ImageVersions in a project and location. -message ListImageVersionsRequest { - // List ImageVersions in the given project and location, in the form: - // "projects/{projectId}/locations/{locationId}" - string parent = 1; - - // The maximum number of image_versions to return. - int32 page_size = 2; - - // The next_page_token value returned from a previous List request, if any. - string page_token = 3; - - // Whether or not image versions from old releases should be included. - bool include_past_releases = 4; -} - -// The ImageVersions in a project and location. -message ListImageVersionsResponse { - // The list of supported ImageVersions in a location. - repeated ImageVersion image_versions = 1; - - // The page token used to query for the next page if one exists. - string next_page_token = 2; -} - -// ImageVersion information -message ImageVersion { - // The string identifier of the ImageVersion, in the form: - // "composer-x.y.z-airflow-a.b.c" - string image_version_id = 1; - - // Whether this is the default ImageVersion used by Composer during - // environment creation if no input ImageVersion is specified. - bool is_default = 2; - - // supported python versions - repeated string supported_python_versions = 3; - - // The date of the version release. - google.type.Date release_date = 4; - - // Whether it is impossible to create an environment with the image version. - bool creation_disabled = 5; - - // Whether it is impossible to upgrade an environment running with the image - // version. - bool upgrade_disabled = 6; -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/operations.proto b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/operations.proto deleted file mode 100644 index ec14d069c03..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/google/cloud/orchestration/airflow/service/v1/operations.proto +++ /dev/null @@ -1,97 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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.orchestration.airflow.service.v1; - -import "google/protobuf/timestamp.proto"; - -option go_package = "cloud.google.com/go/orchestration/airflow/service/apiv1/servicepb;servicepb"; -option java_multiple_files = true; -option java_outer_classname = "OperationsProto"; -option java_package = "com.google.cloud.orchestration.airflow.service.v1"; - -// Metadata describing an operation. -message OperationMetadata { - // An enum describing the overall state of an operation. - enum State { - option allow_alias = true; - - // Unused. - STATE_UNSPECIFIED = 0; - - // The operation has been created but is not yet started. - PENDING = 1; - - // The operation is underway. - RUNNING = 2; - - // The operation completed successfully. - SUCCEEDED = 3; - - SUCCESSFUL = 3; - - // The operation is no longer running but did not succeed. - FAILED = 4; - } - - // Type of longrunning operation. - enum Type { - // Unused. - TYPE_UNSPECIFIED = 0; - - // A resource creation operation. - CREATE = 1; - - // A resource deletion operation. - DELETE = 2; - - // A resource update operation. - UPDATE = 3; - - // A resource check operation. - CHECK = 4; - - // Saves snapshot of the resource operation. - SAVE_SNAPSHOT = 5; - - // Loads snapshot of the resource operation. - LOAD_SNAPSHOT = 6; - - // Triggers failover of environment's Cloud SQL instance (only for highly - // resilient environments). - DATABASE_FAILOVER = 7; - } - - // Output only. The current operation state. - State state = 1; - - // Output only. The type of operation being performed. - Type operation_type = 2; - - // Output only. The resource being operated on, as a [relative resource name]( - // /apis/design/resource_names#relative_resource_name). - string resource = 3; - - // Output only. The UUID of the resource being operated on. - string resource_uuid = 4; - - // Output only. The time the operation was submitted to the server. - google.protobuf.Timestamp create_time = 5; - - // Output only. The time when the operation terminated, regardless of its - // success. This field is unset if the operation is still ongoing. - google.protobuf.Timestamp end_time = 6; -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.d.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.d.ts deleted file mode 100644 index 8ab29e46783..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.d.ts +++ /dev/null @@ -1,16914 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 orchestration. */ - namespace orchestration { - - /** Namespace airflow. */ - namespace airflow { - - /** Namespace service. */ - namespace service { - - /** Namespace v1. */ - namespace v1 { - - /** Represents an Environments */ - class Environments extends $protobuf.rpc.Service { - - /** - * Constructs a new Environments 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 Environments 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): Environments; - - /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createEnvironment(request: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.CreateEnvironmentCallback): void; - - /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @returns Promise - */ - public createEnvironment(request: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest): Promise; - - /** - * Calls GetEnvironment. - * @param request GetEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Environment - */ - public getEnvironment(request: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.GetEnvironmentCallback): void; - - /** - * Calls GetEnvironment. - * @param request GetEnvironmentRequest message or plain object - * @returns Promise - */ - public getEnvironment(request: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest): Promise; - - /** - * Calls ListEnvironments. - * @param request ListEnvironmentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse - */ - public listEnvironments(request: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.ListEnvironmentsCallback): void; - - /** - * Calls ListEnvironments. - * @param request ListEnvironmentsRequest message or plain object - * @returns Promise - */ - public listEnvironments(request: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest): Promise; - - /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateEnvironment(request: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.UpdateEnvironmentCallback): void; - - /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object - * @returns Promise - */ - public updateEnvironment(request: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest): Promise; - - /** - * Calls DeleteEnvironment. - * @param request DeleteEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteEnvironment(request: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.DeleteEnvironmentCallback): void; - - /** - * Calls DeleteEnvironment. - * @param request DeleteEnvironmentRequest message or plain object - * @returns Promise - */ - public deleteEnvironment(request: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest): Promise; - - /** - * Calls ExecuteAirflowCommand. - * @param request ExecuteAirflowCommandRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ExecuteAirflowCommandResponse - */ - public executeAirflowCommand(request: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.ExecuteAirflowCommandCallback): void; - - /** - * Calls ExecuteAirflowCommand. - * @param request ExecuteAirflowCommandRequest message or plain object - * @returns Promise - */ - public executeAirflowCommand(request: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest): Promise; - - /** - * Calls StopAirflowCommand. - * @param request StopAirflowCommandRequest message or plain object - * @param callback Node-style callback called with the error, if any, and StopAirflowCommandResponse - */ - public stopAirflowCommand(request: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.StopAirflowCommandCallback): void; - - /** - * Calls StopAirflowCommand. - * @param request StopAirflowCommandRequest message or plain object - * @returns Promise - */ - public stopAirflowCommand(request: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest): Promise; - - /** - * Calls PollAirflowCommand. - * @param request PollAirflowCommandRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PollAirflowCommandResponse - */ - public pollAirflowCommand(request: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.PollAirflowCommandCallback): void; - - /** - * Calls PollAirflowCommand. - * @param request PollAirflowCommandRequest message or plain object - * @returns Promise - */ - public pollAirflowCommand(request: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest): Promise; - - /** - * Calls ListWorkloads. - * @param request ListWorkloadsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListWorkloadsResponse - */ - public listWorkloads(request: google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.ListWorkloadsCallback): void; - - /** - * Calls ListWorkloads. - * @param request ListWorkloadsRequest message or plain object - * @returns Promise - */ - public listWorkloads(request: google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest): Promise; - - /** - * Calls CheckUpgrade. - * @param request CheckUpgradeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public checkUpgrade(request: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.CheckUpgradeCallback): void; - - /** - * Calls CheckUpgrade. - * @param request CheckUpgradeRequest message or plain object - * @returns Promise - */ - public checkUpgrade(request: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest): Promise; - - /** - * Calls CreateUserWorkloadsSecret. - * @param request CreateUserWorkloadsSecretRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserWorkloadsSecret - */ - public createUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.CreateUserWorkloadsSecretCallback): void; - - /** - * Calls CreateUserWorkloadsSecret. - * @param request CreateUserWorkloadsSecretRequest message or plain object - * @returns Promise - */ - public createUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest): Promise; - - /** - * Calls GetUserWorkloadsSecret. - * @param request GetUserWorkloadsSecretRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserWorkloadsSecret - */ - public getUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.GetUserWorkloadsSecretCallback): void; - - /** - * Calls GetUserWorkloadsSecret. - * @param request GetUserWorkloadsSecretRequest message or plain object - * @returns Promise - */ - public getUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest): Promise; - - /** - * Calls ListUserWorkloadsSecrets. - * @param request ListUserWorkloadsSecretsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListUserWorkloadsSecretsResponse - */ - public listUserWorkloadsSecrets(request: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.ListUserWorkloadsSecretsCallback): void; - - /** - * Calls ListUserWorkloadsSecrets. - * @param request ListUserWorkloadsSecretsRequest message or plain object - * @returns Promise - */ - public listUserWorkloadsSecrets(request: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest): Promise; - - /** - * Calls UpdateUserWorkloadsSecret. - * @param request UpdateUserWorkloadsSecretRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserWorkloadsSecret - */ - public updateUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.UpdateUserWorkloadsSecretCallback): void; - - /** - * Calls UpdateUserWorkloadsSecret. - * @param request UpdateUserWorkloadsSecretRequest message or plain object - * @returns Promise - */ - public updateUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest): Promise; - - /** - * Calls DeleteUserWorkloadsSecret. - * @param request DeleteUserWorkloadsSecretRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.DeleteUserWorkloadsSecretCallback): void; - - /** - * Calls DeleteUserWorkloadsSecret. - * @param request DeleteUserWorkloadsSecretRequest message or plain object - * @returns Promise - */ - public deleteUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest): Promise; - - /** - * Calls CreateUserWorkloadsConfigMap. - * @param request CreateUserWorkloadsConfigMapRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap - */ - public createUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.CreateUserWorkloadsConfigMapCallback): void; - - /** - * Calls CreateUserWorkloadsConfigMap. - * @param request CreateUserWorkloadsConfigMapRequest message or plain object - * @returns Promise - */ - public createUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest): Promise; - - /** - * Calls GetUserWorkloadsConfigMap. - * @param request GetUserWorkloadsConfigMapRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap - */ - public getUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.GetUserWorkloadsConfigMapCallback): void; - - /** - * Calls GetUserWorkloadsConfigMap. - * @param request GetUserWorkloadsConfigMapRequest message or plain object - * @returns Promise - */ - public getUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest): Promise; - - /** - * Calls ListUserWorkloadsConfigMaps. - * @param request ListUserWorkloadsConfigMapsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListUserWorkloadsConfigMapsResponse - */ - public listUserWorkloadsConfigMaps(request: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.ListUserWorkloadsConfigMapsCallback): void; - - /** - * Calls ListUserWorkloadsConfigMaps. - * @param request ListUserWorkloadsConfigMapsRequest message or plain object - * @returns Promise - */ - public listUserWorkloadsConfigMaps(request: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest): Promise; - - /** - * Calls UpdateUserWorkloadsConfigMap. - * @param request UpdateUserWorkloadsConfigMapRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap - */ - public updateUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.UpdateUserWorkloadsConfigMapCallback): void; - - /** - * Calls UpdateUserWorkloadsConfigMap. - * @param request UpdateUserWorkloadsConfigMapRequest message or plain object - * @returns Promise - */ - public updateUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest): Promise; - - /** - * Calls DeleteUserWorkloadsConfigMap. - * @param request DeleteUserWorkloadsConfigMapRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.DeleteUserWorkloadsConfigMapCallback): void; - - /** - * Calls DeleteUserWorkloadsConfigMap. - * @param request DeleteUserWorkloadsConfigMapRequest message or plain object - * @returns Promise - */ - public deleteUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest): Promise; - - /** - * Calls SaveSnapshot. - * @param request SaveSnapshotRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public saveSnapshot(request: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.SaveSnapshotCallback): void; - - /** - * Calls SaveSnapshot. - * @param request SaveSnapshotRequest message or plain object - * @returns Promise - */ - public saveSnapshot(request: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest): Promise; - - /** - * Calls LoadSnapshot. - * @param request LoadSnapshotRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public loadSnapshot(request: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.LoadSnapshotCallback): void; - - /** - * Calls LoadSnapshot. - * @param request LoadSnapshotRequest message or plain object - * @returns Promise - */ - public loadSnapshot(request: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest): Promise; - - /** - * Calls DatabaseFailover. - * @param request DatabaseFailoverRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public databaseFailover(request: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.DatabaseFailoverCallback): void; - - /** - * Calls DatabaseFailover. - * @param request DatabaseFailoverRequest message or plain object - * @returns Promise - */ - public databaseFailover(request: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest): Promise; - - /** - * Calls FetchDatabaseProperties. - * @param request FetchDatabasePropertiesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FetchDatabasePropertiesResponse - */ - public fetchDatabaseProperties(request: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, callback: google.cloud.orchestration.airflow.service.v1.Environments.FetchDatabasePropertiesCallback): void; - - /** - * Calls FetchDatabaseProperties. - * @param request FetchDatabasePropertiesRequest message or plain object - * @returns Promise - */ - public fetchDatabaseProperties(request: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest): Promise; - } - - namespace Environments { - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|createEnvironment}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|getEnvironment}. - * @param error Error, if any - * @param [response] Environment - */ - type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.Environment) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listEnvironments}. - * @param error Error, if any - * @param [response] ListEnvironmentsResponse - */ - type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|updateEnvironment}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|deleteEnvironment}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|executeAirflowCommand}. - * @param error Error, if any - * @param [response] ExecuteAirflowCommandResponse - */ - type ExecuteAirflowCommandCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|stopAirflowCommand}. - * @param error Error, if any - * @param [response] StopAirflowCommandResponse - */ - type StopAirflowCommandCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|pollAirflowCommand}. - * @param error Error, if any - * @param [response] PollAirflowCommandResponse - */ - type PollAirflowCommandCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listWorkloads}. - * @param error Error, if any - * @param [response] ListWorkloadsResponse - */ - type ListWorkloadsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|checkUpgrade}. - * @param error Error, if any - * @param [response] Operation - */ - type CheckUpgradeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|createUserWorkloadsSecret}. - * @param error Error, if any - * @param [response] UserWorkloadsSecret - */ - type CreateUserWorkloadsSecretCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|getUserWorkloadsSecret}. - * @param error Error, if any - * @param [response] UserWorkloadsSecret - */ - type GetUserWorkloadsSecretCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listUserWorkloadsSecrets}. - * @param error Error, if any - * @param [response] ListUserWorkloadsSecretsResponse - */ - type ListUserWorkloadsSecretsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|updateUserWorkloadsSecret}. - * @param error Error, if any - * @param [response] UserWorkloadsSecret - */ - type UpdateUserWorkloadsSecretCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|deleteUserWorkloadsSecret}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteUserWorkloadsSecretCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|createUserWorkloadsConfigMap}. - * @param error Error, if any - * @param [response] UserWorkloadsConfigMap - */ - type CreateUserWorkloadsConfigMapCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|getUserWorkloadsConfigMap}. - * @param error Error, if any - * @param [response] UserWorkloadsConfigMap - */ - type GetUserWorkloadsConfigMapCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listUserWorkloadsConfigMaps}. - * @param error Error, if any - * @param [response] ListUserWorkloadsConfigMapsResponse - */ - type ListUserWorkloadsConfigMapsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|updateUserWorkloadsConfigMap}. - * @param error Error, if any - * @param [response] UserWorkloadsConfigMap - */ - type UpdateUserWorkloadsConfigMapCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|deleteUserWorkloadsConfigMap}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteUserWorkloadsConfigMapCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|saveSnapshot}. - * @param error Error, if any - * @param [response] Operation - */ - type SaveSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|loadSnapshot}. - * @param error Error, if any - * @param [response] Operation - */ - type LoadSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|databaseFailover}. - * @param error Error, if any - * @param [response] Operation - */ - type DatabaseFailoverCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|fetchDatabaseProperties}. - * @param error Error, if any - * @param [response] FetchDatabasePropertiesResponse - */ - type FetchDatabasePropertiesCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse) => void; - } - - /** Properties of a CreateEnvironmentRequest. */ - interface ICreateEnvironmentRequest { - - /** CreateEnvironmentRequest parent */ - parent?: (string|null); - - /** CreateEnvironmentRequest environment */ - environment?: (google.cloud.orchestration.airflow.service.v1.IEnvironment|null); - } - - /** Represents a CreateEnvironmentRequest. */ - class CreateEnvironmentRequest implements ICreateEnvironmentRequest { - - /** - * Constructs a new CreateEnvironmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest); - - /** CreateEnvironmentRequest parent. */ - public parent: string; - - /** CreateEnvironmentRequest environment. */ - public environment?: (google.cloud.orchestration.airflow.service.v1.IEnvironment|null); - - /** - * Creates a new CreateEnvironmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateEnvironmentRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest): google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest; - - /** - * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.verify|verify} messages. - * @param message CreateEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.verify|verify} messages. - * @param message CreateEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest; - - /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest; - - /** - * Verifies a CreateEnvironmentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateEnvironmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest; - - /** - * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. - * @param message CreateEnvironmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateEnvironmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateEnvironmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetEnvironmentRequest. */ - interface IGetEnvironmentRequest { - - /** GetEnvironmentRequest name */ - name?: (string|null); - } - - /** Represents a GetEnvironmentRequest. */ - class GetEnvironmentRequest implements IGetEnvironmentRequest { - - /** - * Constructs a new GetEnvironmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest); - - /** GetEnvironmentRequest name. */ - public name: string; - - /** - * Creates a new GetEnvironmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEnvironmentRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest): google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest; - - /** - * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.verify|verify} messages. - * @param message GetEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.verify|verify} messages. - * @param message GetEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest; - - /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest; - - /** - * Verifies a GetEnvironmentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetEnvironmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest; - - /** - * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. - * @param message GetEnvironmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetEnvironmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetEnvironmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEnvironmentsRequest. */ - interface IListEnvironmentsRequest { - - /** ListEnvironmentsRequest parent */ - parent?: (string|null); - - /** ListEnvironmentsRequest pageSize */ - pageSize?: (number|null); - - /** ListEnvironmentsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListEnvironmentsRequest. */ - class ListEnvironmentsRequest implements IListEnvironmentsRequest { - - /** - * Constructs a new ListEnvironmentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest); - - /** ListEnvironmentsRequest parent. */ - public parent: string; - - /** ListEnvironmentsRequest pageSize. */ - public pageSize: number; - - /** ListEnvironmentsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListEnvironmentsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEnvironmentsRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest; - - /** - * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.verify|verify} messages. - * @param message ListEnvironmentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.verify|verify} messages. - * @param message ListEnvironmentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEnvironmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest; - - /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEnvironmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest; - - /** - * Verifies a ListEnvironmentsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEnvironmentsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest; - - /** - * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. - * @param message ListEnvironmentsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEnvironmentsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEnvironmentsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEnvironmentsResponse. */ - interface IListEnvironmentsResponse { - - /** ListEnvironmentsResponse environments */ - environments?: (google.cloud.orchestration.airflow.service.v1.IEnvironment[]|null); - - /** ListEnvironmentsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListEnvironmentsResponse. */ - class ListEnvironmentsResponse implements IListEnvironmentsResponse { - - /** - * Constructs a new ListEnvironmentsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse); - - /** ListEnvironmentsResponse environments. */ - public environments: google.cloud.orchestration.airflow.service.v1.IEnvironment[]; - - /** ListEnvironmentsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListEnvironmentsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEnvironmentsResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; - - /** - * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.verify|verify} messages. - * @param message ListEnvironmentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.verify|verify} messages. - * @param message ListEnvironmentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEnvironmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; - - /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEnvironmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; - - /** - * Verifies a ListEnvironmentsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEnvironmentsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse; - - /** - * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. - * @param message ListEnvironmentsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEnvironmentsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEnvironmentsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteEnvironmentRequest. */ - interface IDeleteEnvironmentRequest { - - /** DeleteEnvironmentRequest name */ - name?: (string|null); - } - - /** Represents a DeleteEnvironmentRequest. */ - class DeleteEnvironmentRequest implements IDeleteEnvironmentRequest { - - /** - * Constructs a new DeleteEnvironmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest); - - /** DeleteEnvironmentRequest name. */ - public name: string; - - /** - * Creates a new DeleteEnvironmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteEnvironmentRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest): google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest; - - /** - * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.verify|verify} messages. - * @param message DeleteEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.verify|verify} messages. - * @param message DeleteEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest; - - /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest; - - /** - * Verifies a DeleteEnvironmentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteEnvironmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest; - - /** - * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. - * @param message DeleteEnvironmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteEnvironmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteEnvironmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateEnvironmentRequest. */ - interface IUpdateEnvironmentRequest { - - /** UpdateEnvironmentRequest name */ - name?: (string|null); - - /** UpdateEnvironmentRequest environment */ - environment?: (google.cloud.orchestration.airflow.service.v1.IEnvironment|null); - - /** UpdateEnvironmentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateEnvironmentRequest. */ - class UpdateEnvironmentRequest implements IUpdateEnvironmentRequest { - - /** - * Constructs a new UpdateEnvironmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest); - - /** UpdateEnvironmentRequest name. */ - public name: string; - - /** UpdateEnvironmentRequest environment. */ - public environment?: (google.cloud.orchestration.airflow.service.v1.IEnvironment|null); - - /** UpdateEnvironmentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateEnvironmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateEnvironmentRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest): google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest; - - /** - * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.verify|verify} messages. - * @param message UpdateEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.verify|verify} messages. - * @param message UpdateEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest; - - /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest; - - /** - * Verifies an UpdateEnvironmentRequest message. - * @param message Plain 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 UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateEnvironmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest; - - /** - * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. - * @param message UpdateEnvironmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateEnvironmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateEnvironmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExecuteAirflowCommandRequest. */ - interface IExecuteAirflowCommandRequest { - - /** ExecuteAirflowCommandRequest environment */ - environment?: (string|null); - - /** ExecuteAirflowCommandRequest command */ - command?: (string|null); - - /** ExecuteAirflowCommandRequest subcommand */ - subcommand?: (string|null); - - /** ExecuteAirflowCommandRequest parameters */ - parameters?: (string[]|null); - } - - /** Represents an ExecuteAirflowCommandRequest. */ - class ExecuteAirflowCommandRequest implements IExecuteAirflowCommandRequest { - - /** - * Constructs a new ExecuteAirflowCommandRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest); - - /** ExecuteAirflowCommandRequest environment. */ - public environment: string; - - /** ExecuteAirflowCommandRequest command. */ - public command: string; - - /** ExecuteAirflowCommandRequest subcommand. */ - public subcommand: string; - - /** ExecuteAirflowCommandRequest parameters. */ - public parameters: string[]; - - /** - * Creates a new ExecuteAirflowCommandRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteAirflowCommandRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest): google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest; - - /** - * Encodes the specified ExecuteAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest.verify|verify} messages. - * @param message ExecuteAirflowCommandRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest.verify|verify} messages. - * @param message ExecuteAirflowCommandRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteAirflowCommandRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest; - - /** - * Decodes an ExecuteAirflowCommandRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest; - - /** - * Verifies an ExecuteAirflowCommandRequest message. - * @param message Plain 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 ExecuteAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteAirflowCommandRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest; - - /** - * Creates a plain object from an ExecuteAirflowCommandRequest message. Also converts values to other types if specified. - * @param message ExecuteAirflowCommandRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteAirflowCommandRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecuteAirflowCommandRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExecuteAirflowCommandResponse. */ - interface IExecuteAirflowCommandResponse { - - /** ExecuteAirflowCommandResponse executionId */ - executionId?: (string|null); - - /** ExecuteAirflowCommandResponse pod */ - pod?: (string|null); - - /** ExecuteAirflowCommandResponse podNamespace */ - podNamespace?: (string|null); - - /** ExecuteAirflowCommandResponse error */ - error?: (string|null); - } - - /** Represents an ExecuteAirflowCommandResponse. */ - class ExecuteAirflowCommandResponse implements IExecuteAirflowCommandResponse { - - /** - * Constructs a new ExecuteAirflowCommandResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse); - - /** ExecuteAirflowCommandResponse executionId. */ - public executionId: string; - - /** ExecuteAirflowCommandResponse pod. */ - public pod: string; - - /** ExecuteAirflowCommandResponse podNamespace. */ - public podNamespace: string; - - /** ExecuteAirflowCommandResponse error. */ - public error: string; - - /** - * Creates a new ExecuteAirflowCommandResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteAirflowCommandResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse): google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse; - - /** - * Encodes the specified ExecuteAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse.verify|verify} messages. - * @param message ExecuteAirflowCommandResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse.verify|verify} messages. - * @param message ExecuteAirflowCommandResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteAirflowCommandResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse; - - /** - * Decodes an ExecuteAirflowCommandResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse; - - /** - * Verifies an ExecuteAirflowCommandResponse message. - * @param message Plain 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 ExecuteAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteAirflowCommandResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse; - - /** - * Creates a plain object from an ExecuteAirflowCommandResponse message. Also converts values to other types if specified. - * @param message ExecuteAirflowCommandResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteAirflowCommandResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecuteAirflowCommandResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StopAirflowCommandRequest. */ - interface IStopAirflowCommandRequest { - - /** StopAirflowCommandRequest environment */ - environment?: (string|null); - - /** StopAirflowCommandRequest executionId */ - executionId?: (string|null); - - /** StopAirflowCommandRequest pod */ - pod?: (string|null); - - /** StopAirflowCommandRequest podNamespace */ - podNamespace?: (string|null); - - /** StopAirflowCommandRequest force */ - force?: (boolean|null); - } - - /** Represents a StopAirflowCommandRequest. */ - class StopAirflowCommandRequest implements IStopAirflowCommandRequest { - - /** - * Constructs a new StopAirflowCommandRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest); - - /** StopAirflowCommandRequest environment. */ - public environment: string; - - /** StopAirflowCommandRequest executionId. */ - public executionId: string; - - /** StopAirflowCommandRequest pod. */ - public pod: string; - - /** StopAirflowCommandRequest podNamespace. */ - public podNamespace: string; - - /** StopAirflowCommandRequest force. */ - public force: boolean; - - /** - * Creates a new StopAirflowCommandRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StopAirflowCommandRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest): google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest; - - /** - * Encodes the specified StopAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest.verify|verify} messages. - * @param message StopAirflowCommandRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StopAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest.verify|verify} messages. - * @param message StopAirflowCommandRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StopAirflowCommandRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StopAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest; - - /** - * Decodes a StopAirflowCommandRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StopAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest; - - /** - * Verifies a StopAirflowCommandRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StopAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StopAirflowCommandRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest; - - /** - * Creates a plain object from a StopAirflowCommandRequest message. Also converts values to other types if specified. - * @param message StopAirflowCommandRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StopAirflowCommandRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StopAirflowCommandRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StopAirflowCommandResponse. */ - interface IStopAirflowCommandResponse { - - /** StopAirflowCommandResponse isDone */ - isDone?: (boolean|null); - - /** StopAirflowCommandResponse output */ - output?: (string[]|null); - } - - /** Represents a StopAirflowCommandResponse. */ - class StopAirflowCommandResponse implements IStopAirflowCommandResponse { - - /** - * Constructs a new StopAirflowCommandResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse); - - /** StopAirflowCommandResponse isDone. */ - public isDone: boolean; - - /** StopAirflowCommandResponse output. */ - public output: string[]; - - /** - * Creates a new StopAirflowCommandResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StopAirflowCommandResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse): google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse; - - /** - * Encodes the specified StopAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse.verify|verify} messages. - * @param message StopAirflowCommandResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StopAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse.verify|verify} messages. - * @param message StopAirflowCommandResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StopAirflowCommandResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StopAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse; - - /** - * Decodes a StopAirflowCommandResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StopAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse; - - /** - * Verifies a StopAirflowCommandResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StopAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StopAirflowCommandResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse; - - /** - * Creates a plain object from a StopAirflowCommandResponse message. Also converts values to other types if specified. - * @param message StopAirflowCommandResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StopAirflowCommandResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StopAirflowCommandResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PollAirflowCommandRequest. */ - interface IPollAirflowCommandRequest { - - /** PollAirflowCommandRequest environment */ - environment?: (string|null); - - /** PollAirflowCommandRequest executionId */ - executionId?: (string|null); - - /** PollAirflowCommandRequest pod */ - pod?: (string|null); - - /** PollAirflowCommandRequest podNamespace */ - podNamespace?: (string|null); - - /** PollAirflowCommandRequest nextLineNumber */ - nextLineNumber?: (number|null); - } - - /** Represents a PollAirflowCommandRequest. */ - class PollAirflowCommandRequest implements IPollAirflowCommandRequest { - - /** - * Constructs a new PollAirflowCommandRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest); - - /** PollAirflowCommandRequest environment. */ - public environment: string; - - /** PollAirflowCommandRequest executionId. */ - public executionId: string; - - /** PollAirflowCommandRequest pod. */ - public pod: string; - - /** PollAirflowCommandRequest podNamespace. */ - public podNamespace: string; - - /** PollAirflowCommandRequest nextLineNumber. */ - public nextLineNumber: number; - - /** - * Creates a new PollAirflowCommandRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PollAirflowCommandRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest; - - /** - * Encodes the specified PollAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest.verify|verify} messages. - * @param message PollAirflowCommandRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest.verify|verify} messages. - * @param message PollAirflowCommandRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollAirflowCommandRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest; - - /** - * Decodes a PollAirflowCommandRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest; - - /** - * Verifies a PollAirflowCommandRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PollAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollAirflowCommandRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest; - - /** - * Creates a plain object from a PollAirflowCommandRequest message. Also converts values to other types if specified. - * @param message PollAirflowCommandRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollAirflowCommandRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PollAirflowCommandRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PollAirflowCommandResponse. */ - interface IPollAirflowCommandResponse { - - /** PollAirflowCommandResponse output */ - output?: (google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine[]|null); - - /** PollAirflowCommandResponse outputEnd */ - outputEnd?: (boolean|null); - - /** PollAirflowCommandResponse exitInfo */ - exitInfo?: (google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo|null); - } - - /** Represents a PollAirflowCommandResponse. */ - class PollAirflowCommandResponse implements IPollAirflowCommandResponse { - - /** - * Constructs a new PollAirflowCommandResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse); - - /** PollAirflowCommandResponse output. */ - public output: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine[]; - - /** PollAirflowCommandResponse outputEnd. */ - public outputEnd: boolean; - - /** PollAirflowCommandResponse exitInfo. */ - public exitInfo?: (google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo|null); - - /** - * Creates a new PollAirflowCommandResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PollAirflowCommandResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse; - - /** - * Encodes the specified PollAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.verify|verify} messages. - * @param message PollAirflowCommandResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.verify|verify} messages. - * @param message PollAirflowCommandResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollAirflowCommandResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse; - - /** - * Decodes a PollAirflowCommandResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse; - - /** - * Verifies a PollAirflowCommandResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PollAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollAirflowCommandResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse; - - /** - * Creates a plain object from a PollAirflowCommandResponse message. Also converts values to other types if specified. - * @param message PollAirflowCommandResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollAirflowCommandResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PollAirflowCommandResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PollAirflowCommandResponse { - - /** Properties of a Line. */ - interface ILine { - - /** Line lineNumber */ - lineNumber?: (number|null); - - /** Line content */ - content?: (string|null); - } - - /** Represents a Line. */ - class Line implements ILine { - - /** - * Constructs a new Line. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine); - - /** Line lineNumber. */ - public lineNumber: number; - - /** Line content. */ - public content: string; - - /** - * Creates a new Line instance using the specified properties. - * @param [properties] Properties to set - * @returns Line instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line; - - /** - * Encodes the specified Line message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.verify|verify} messages. - * @param message Line message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Line message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.verify|verify} messages. - * @param message Line message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Line message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Line - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line; - - /** - * Decodes a Line message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Line - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line; - - /** - * Verifies a Line message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Line message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Line - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line; - - /** - * Creates a plain object from a Line message. Also converts values to other types if specified. - * @param message Line - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Line to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Line - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExitInfo. */ - interface IExitInfo { - - /** ExitInfo exitCode */ - exitCode?: (number|null); - - /** ExitInfo error */ - error?: (string|null); - } - - /** Represents an ExitInfo. */ - class ExitInfo implements IExitInfo { - - /** - * Constructs a new ExitInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo); - - /** ExitInfo exitCode. */ - public exitCode: number; - - /** ExitInfo error. */ - public error: string; - - /** - * Creates a new ExitInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ExitInfo instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo; - - /** - * Encodes the specified ExitInfo message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.verify|verify} messages. - * @param message ExitInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExitInfo message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.verify|verify} messages. - * @param message ExitInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExitInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExitInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo; - - /** - * Decodes an ExitInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExitInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo; - - /** - * Verifies an ExitInfo message. - * @param message Plain 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 ExitInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExitInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo; - - /** - * Creates a plain object from an ExitInfo message. Also converts values to other types if specified. - * @param message ExitInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExitInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExitInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CreateUserWorkloadsSecretRequest. */ - interface ICreateUserWorkloadsSecretRequest { - - /** CreateUserWorkloadsSecretRequest parent */ - parent?: (string|null); - - /** CreateUserWorkloadsSecretRequest userWorkloadsSecret */ - userWorkloadsSecret?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null); - } - - /** Represents a CreateUserWorkloadsSecretRequest. */ - class CreateUserWorkloadsSecretRequest implements ICreateUserWorkloadsSecretRequest { - - /** - * Constructs a new CreateUserWorkloadsSecretRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest); - - /** CreateUserWorkloadsSecretRequest parent. */ - public parent: string; - - /** CreateUserWorkloadsSecretRequest userWorkloadsSecret. */ - public userWorkloadsSecret?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null); - - /** - * Creates a new CreateUserWorkloadsSecretRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateUserWorkloadsSecretRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest): google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest; - - /** - * Encodes the specified CreateUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest.verify|verify} messages. - * @param message CreateUserWorkloadsSecretRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest.verify|verify} messages. - * @param message CreateUserWorkloadsSecretRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateUserWorkloadsSecretRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest; - - /** - * Decodes a CreateUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest; - - /** - * Verifies a CreateUserWorkloadsSecretRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateUserWorkloadsSecretRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest; - - /** - * Creates a plain object from a CreateUserWorkloadsSecretRequest message. Also converts values to other types if specified. - * @param message CreateUserWorkloadsSecretRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateUserWorkloadsSecretRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateUserWorkloadsSecretRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetUserWorkloadsSecretRequest. */ - interface IGetUserWorkloadsSecretRequest { - - /** GetUserWorkloadsSecretRequest name */ - name?: (string|null); - } - - /** Represents a GetUserWorkloadsSecretRequest. */ - class GetUserWorkloadsSecretRequest implements IGetUserWorkloadsSecretRequest { - - /** - * Constructs a new GetUserWorkloadsSecretRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest); - - /** GetUserWorkloadsSecretRequest name. */ - public name: string; - - /** - * Creates a new GetUserWorkloadsSecretRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUserWorkloadsSecretRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest): google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest; - - /** - * Encodes the specified GetUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest.verify|verify} messages. - * @param message GetUserWorkloadsSecretRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest.verify|verify} messages. - * @param message GetUserWorkloadsSecretRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUserWorkloadsSecretRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest; - - /** - * Decodes a GetUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest; - - /** - * Verifies a GetUserWorkloadsSecretRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUserWorkloadsSecretRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest; - - /** - * Creates a plain object from a GetUserWorkloadsSecretRequest message. Also converts values to other types if specified. - * @param message GetUserWorkloadsSecretRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUserWorkloadsSecretRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUserWorkloadsSecretRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUserWorkloadsSecretsRequest. */ - interface IListUserWorkloadsSecretsRequest { - - /** ListUserWorkloadsSecretsRequest parent */ - parent?: (string|null); - - /** ListUserWorkloadsSecretsRequest pageSize */ - pageSize?: (number|null); - - /** ListUserWorkloadsSecretsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListUserWorkloadsSecretsRequest. */ - class ListUserWorkloadsSecretsRequest implements IListUserWorkloadsSecretsRequest { - - /** - * Constructs a new ListUserWorkloadsSecretsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest); - - /** ListUserWorkloadsSecretsRequest parent. */ - public parent: string; - - /** ListUserWorkloadsSecretsRequest pageSize. */ - public pageSize: number; - - /** ListUserWorkloadsSecretsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListUserWorkloadsSecretsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUserWorkloadsSecretsRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest; - - /** - * Encodes the specified ListUserWorkloadsSecretsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest.verify|verify} messages. - * @param message ListUserWorkloadsSecretsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUserWorkloadsSecretsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest.verify|verify} messages. - * @param message ListUserWorkloadsSecretsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUserWorkloadsSecretsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUserWorkloadsSecretsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest; - - /** - * Decodes a ListUserWorkloadsSecretsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUserWorkloadsSecretsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest; - - /** - * Verifies a ListUserWorkloadsSecretsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUserWorkloadsSecretsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUserWorkloadsSecretsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest; - - /** - * Creates a plain object from a ListUserWorkloadsSecretsRequest message. Also converts values to other types if specified. - * @param message ListUserWorkloadsSecretsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUserWorkloadsSecretsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUserWorkloadsSecretsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateUserWorkloadsSecretRequest. */ - interface IUpdateUserWorkloadsSecretRequest { - - /** UpdateUserWorkloadsSecretRequest userWorkloadsSecret */ - userWorkloadsSecret?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null); - } - - /** Represents an UpdateUserWorkloadsSecretRequest. */ - class UpdateUserWorkloadsSecretRequest implements IUpdateUserWorkloadsSecretRequest { - - /** - * Constructs a new UpdateUserWorkloadsSecretRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest); - - /** UpdateUserWorkloadsSecretRequest userWorkloadsSecret. */ - public userWorkloadsSecret?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null); - - /** - * Creates a new UpdateUserWorkloadsSecretRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateUserWorkloadsSecretRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest): google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest; - - /** - * Encodes the specified UpdateUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest.verify|verify} messages. - * @param message UpdateUserWorkloadsSecretRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest.verify|verify} messages. - * @param message UpdateUserWorkloadsSecretRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateUserWorkloadsSecretRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest; - - /** - * Decodes an UpdateUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest; - - /** - * Verifies an UpdateUserWorkloadsSecretRequest message. - * @param message Plain 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 UpdateUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateUserWorkloadsSecretRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest; - - /** - * Creates a plain object from an UpdateUserWorkloadsSecretRequest message. Also converts values to other types if specified. - * @param message UpdateUserWorkloadsSecretRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateUserWorkloadsSecretRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateUserWorkloadsSecretRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteUserWorkloadsSecretRequest. */ - interface IDeleteUserWorkloadsSecretRequest { - - /** DeleteUserWorkloadsSecretRequest name */ - name?: (string|null); - } - - /** Represents a DeleteUserWorkloadsSecretRequest. */ - class DeleteUserWorkloadsSecretRequest implements IDeleteUserWorkloadsSecretRequest { - - /** - * Constructs a new DeleteUserWorkloadsSecretRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest); - - /** DeleteUserWorkloadsSecretRequest name. */ - public name: string; - - /** - * Creates a new DeleteUserWorkloadsSecretRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteUserWorkloadsSecretRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest): google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest; - - /** - * Encodes the specified DeleteUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest.verify|verify} messages. - * @param message DeleteUserWorkloadsSecretRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest.verify|verify} messages. - * @param message DeleteUserWorkloadsSecretRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteUserWorkloadsSecretRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest; - - /** - * Decodes a DeleteUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest; - - /** - * Verifies a DeleteUserWorkloadsSecretRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteUserWorkloadsSecretRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest; - - /** - * Creates a plain object from a DeleteUserWorkloadsSecretRequest message. Also converts values to other types if specified. - * @param message DeleteUserWorkloadsSecretRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteUserWorkloadsSecretRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteUserWorkloadsSecretRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateUserWorkloadsConfigMapRequest. */ - interface ICreateUserWorkloadsConfigMapRequest { - - /** CreateUserWorkloadsConfigMapRequest parent */ - parent?: (string|null); - - /** CreateUserWorkloadsConfigMapRequest userWorkloadsConfigMap */ - userWorkloadsConfigMap?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null); - } - - /** Represents a CreateUserWorkloadsConfigMapRequest. */ - class CreateUserWorkloadsConfigMapRequest implements ICreateUserWorkloadsConfigMapRequest { - - /** - * Constructs a new CreateUserWorkloadsConfigMapRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest); - - /** CreateUserWorkloadsConfigMapRequest parent. */ - public parent: string; - - /** CreateUserWorkloadsConfigMapRequest userWorkloadsConfigMap. */ - public userWorkloadsConfigMap?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null); - - /** - * Creates a new CreateUserWorkloadsConfigMapRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateUserWorkloadsConfigMapRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest): google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest; - - /** - * Encodes the specified CreateUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest.verify|verify} messages. - * @param message CreateUserWorkloadsConfigMapRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest.verify|verify} messages. - * @param message CreateUserWorkloadsConfigMapRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateUserWorkloadsConfigMapRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest; - - /** - * Decodes a CreateUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest; - - /** - * Verifies a CreateUserWorkloadsConfigMapRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateUserWorkloadsConfigMapRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest; - - /** - * Creates a plain object from a CreateUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. - * @param message CreateUserWorkloadsConfigMapRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateUserWorkloadsConfigMapRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateUserWorkloadsConfigMapRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetUserWorkloadsConfigMapRequest. */ - interface IGetUserWorkloadsConfigMapRequest { - - /** GetUserWorkloadsConfigMapRequest name */ - name?: (string|null); - } - - /** Represents a GetUserWorkloadsConfigMapRequest. */ - class GetUserWorkloadsConfigMapRequest implements IGetUserWorkloadsConfigMapRequest { - - /** - * Constructs a new GetUserWorkloadsConfigMapRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest); - - /** GetUserWorkloadsConfigMapRequest name. */ - public name: string; - - /** - * Creates a new GetUserWorkloadsConfigMapRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUserWorkloadsConfigMapRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest): google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest; - - /** - * Encodes the specified GetUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest.verify|verify} messages. - * @param message GetUserWorkloadsConfigMapRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest.verify|verify} messages. - * @param message GetUserWorkloadsConfigMapRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUserWorkloadsConfigMapRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest; - - /** - * Decodes a GetUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest; - - /** - * Verifies a GetUserWorkloadsConfigMapRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUserWorkloadsConfigMapRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest; - - /** - * Creates a plain object from a GetUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. - * @param message GetUserWorkloadsConfigMapRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUserWorkloadsConfigMapRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUserWorkloadsConfigMapRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUserWorkloadsConfigMapsRequest. */ - interface IListUserWorkloadsConfigMapsRequest { - - /** ListUserWorkloadsConfigMapsRequest parent */ - parent?: (string|null); - - /** ListUserWorkloadsConfigMapsRequest pageSize */ - pageSize?: (number|null); - - /** ListUserWorkloadsConfigMapsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListUserWorkloadsConfigMapsRequest. */ - class ListUserWorkloadsConfigMapsRequest implements IListUserWorkloadsConfigMapsRequest { - - /** - * Constructs a new ListUserWorkloadsConfigMapsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest); - - /** ListUserWorkloadsConfigMapsRequest parent. */ - public parent: string; - - /** ListUserWorkloadsConfigMapsRequest pageSize. */ - public pageSize: number; - - /** ListUserWorkloadsConfigMapsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListUserWorkloadsConfigMapsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUserWorkloadsConfigMapsRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest; - - /** - * Encodes the specified ListUserWorkloadsConfigMapsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest.verify|verify} messages. - * @param message ListUserWorkloadsConfigMapsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUserWorkloadsConfigMapsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest.verify|verify} messages. - * @param message ListUserWorkloadsConfigMapsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUserWorkloadsConfigMapsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUserWorkloadsConfigMapsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest; - - /** - * Decodes a ListUserWorkloadsConfigMapsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUserWorkloadsConfigMapsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest; - - /** - * Verifies a ListUserWorkloadsConfigMapsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUserWorkloadsConfigMapsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUserWorkloadsConfigMapsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest; - - /** - * Creates a plain object from a ListUserWorkloadsConfigMapsRequest message. Also converts values to other types if specified. - * @param message ListUserWorkloadsConfigMapsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUserWorkloadsConfigMapsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUserWorkloadsConfigMapsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateUserWorkloadsConfigMapRequest. */ - interface IUpdateUserWorkloadsConfigMapRequest { - - /** UpdateUserWorkloadsConfigMapRequest userWorkloadsConfigMap */ - userWorkloadsConfigMap?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null); - } - - /** Represents an UpdateUserWorkloadsConfigMapRequest. */ - class UpdateUserWorkloadsConfigMapRequest implements IUpdateUserWorkloadsConfigMapRequest { - - /** - * Constructs a new UpdateUserWorkloadsConfigMapRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest); - - /** UpdateUserWorkloadsConfigMapRequest userWorkloadsConfigMap. */ - public userWorkloadsConfigMap?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null); - - /** - * Creates a new UpdateUserWorkloadsConfigMapRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateUserWorkloadsConfigMapRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest): google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest; - - /** - * Encodes the specified UpdateUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest.verify|verify} messages. - * @param message UpdateUserWorkloadsConfigMapRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest.verify|verify} messages. - * @param message UpdateUserWorkloadsConfigMapRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateUserWorkloadsConfigMapRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest; - - /** - * Decodes an UpdateUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest; - - /** - * Verifies an UpdateUserWorkloadsConfigMapRequest message. - * @param message Plain 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 UpdateUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateUserWorkloadsConfigMapRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest; - - /** - * Creates a plain object from an UpdateUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. - * @param message UpdateUserWorkloadsConfigMapRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateUserWorkloadsConfigMapRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateUserWorkloadsConfigMapRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteUserWorkloadsConfigMapRequest. */ - interface IDeleteUserWorkloadsConfigMapRequest { - - /** DeleteUserWorkloadsConfigMapRequest name */ - name?: (string|null); - } - - /** Represents a DeleteUserWorkloadsConfigMapRequest. */ - class DeleteUserWorkloadsConfigMapRequest implements IDeleteUserWorkloadsConfigMapRequest { - - /** - * Constructs a new DeleteUserWorkloadsConfigMapRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest); - - /** DeleteUserWorkloadsConfigMapRequest name. */ - public name: string; - - /** - * Creates a new DeleteUserWorkloadsConfigMapRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteUserWorkloadsConfigMapRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest): google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest; - - /** - * Encodes the specified DeleteUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest.verify|verify} messages. - * @param message DeleteUserWorkloadsConfigMapRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest.verify|verify} messages. - * @param message DeleteUserWorkloadsConfigMapRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteUserWorkloadsConfigMapRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest; - - /** - * Decodes a DeleteUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest; - - /** - * Verifies a DeleteUserWorkloadsConfigMapRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteUserWorkloadsConfigMapRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest; - - /** - * Creates a plain object from a DeleteUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. - * @param message DeleteUserWorkloadsConfigMapRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteUserWorkloadsConfigMapRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteUserWorkloadsConfigMapRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserWorkloadsSecret. */ - interface IUserWorkloadsSecret { - - /** UserWorkloadsSecret name */ - name?: (string|null); - - /** UserWorkloadsSecret data */ - data?: ({ [k: string]: string }|null); - } - - /** Represents a UserWorkloadsSecret. */ - class UserWorkloadsSecret implements IUserWorkloadsSecret { - - /** - * Constructs a new UserWorkloadsSecret. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret); - - /** UserWorkloadsSecret name. */ - public name: string; - - /** UserWorkloadsSecret data. */ - public data: { [k: string]: string }; - - /** - * Creates a new UserWorkloadsSecret instance using the specified properties. - * @param [properties] Properties to set - * @returns UserWorkloadsSecret instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret): google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret; - - /** - * Encodes the specified UserWorkloadsSecret message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.verify|verify} messages. - * @param message UserWorkloadsSecret message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserWorkloadsSecret message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.verify|verify} messages. - * @param message UserWorkloadsSecret message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserWorkloadsSecret message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserWorkloadsSecret - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret; - - /** - * Decodes a UserWorkloadsSecret message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserWorkloadsSecret - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret; - - /** - * Verifies a UserWorkloadsSecret message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserWorkloadsSecret message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserWorkloadsSecret - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret; - - /** - * Creates a plain object from a UserWorkloadsSecret message. Also converts values to other types if specified. - * @param message UserWorkloadsSecret - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserWorkloadsSecret to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserWorkloadsSecret - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUserWorkloadsSecretsResponse. */ - interface IListUserWorkloadsSecretsResponse { - - /** ListUserWorkloadsSecretsResponse userWorkloadsSecrets */ - userWorkloadsSecrets?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret[]|null); - - /** ListUserWorkloadsSecretsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListUserWorkloadsSecretsResponse. */ - class ListUserWorkloadsSecretsResponse implements IListUserWorkloadsSecretsResponse { - - /** - * Constructs a new ListUserWorkloadsSecretsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse); - - /** ListUserWorkloadsSecretsResponse userWorkloadsSecrets. */ - public userWorkloadsSecrets: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret[]; - - /** ListUserWorkloadsSecretsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListUserWorkloadsSecretsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUserWorkloadsSecretsResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse; - - /** - * Encodes the specified ListUserWorkloadsSecretsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse.verify|verify} messages. - * @param message ListUserWorkloadsSecretsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUserWorkloadsSecretsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse.verify|verify} messages. - * @param message ListUserWorkloadsSecretsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUserWorkloadsSecretsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUserWorkloadsSecretsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse; - - /** - * Decodes a ListUserWorkloadsSecretsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUserWorkloadsSecretsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse; - - /** - * Verifies a ListUserWorkloadsSecretsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUserWorkloadsSecretsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUserWorkloadsSecretsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse; - - /** - * Creates a plain object from a ListUserWorkloadsSecretsResponse message. Also converts values to other types if specified. - * @param message ListUserWorkloadsSecretsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUserWorkloadsSecretsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUserWorkloadsSecretsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserWorkloadsConfigMap. */ - interface IUserWorkloadsConfigMap { - - /** UserWorkloadsConfigMap name */ - name?: (string|null); - - /** UserWorkloadsConfigMap data */ - data?: ({ [k: string]: string }|null); - } - - /** Represents a UserWorkloadsConfigMap. */ - class UserWorkloadsConfigMap implements IUserWorkloadsConfigMap { - - /** - * Constructs a new UserWorkloadsConfigMap. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap); - - /** UserWorkloadsConfigMap name. */ - public name: string; - - /** UserWorkloadsConfigMap data. */ - public data: { [k: string]: string }; - - /** - * Creates a new UserWorkloadsConfigMap instance using the specified properties. - * @param [properties] Properties to set - * @returns UserWorkloadsConfigMap instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap): google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap; - - /** - * Encodes the specified UserWorkloadsConfigMap message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.verify|verify} messages. - * @param message UserWorkloadsConfigMap message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserWorkloadsConfigMap message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.verify|verify} messages. - * @param message UserWorkloadsConfigMap message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserWorkloadsConfigMap message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserWorkloadsConfigMap - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap; - - /** - * Decodes a UserWorkloadsConfigMap message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserWorkloadsConfigMap - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap; - - /** - * Verifies a UserWorkloadsConfigMap message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserWorkloadsConfigMap message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserWorkloadsConfigMap - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap; - - /** - * Creates a plain object from a UserWorkloadsConfigMap message. Also converts values to other types if specified. - * @param message UserWorkloadsConfigMap - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserWorkloadsConfigMap to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserWorkloadsConfigMap - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUserWorkloadsConfigMapsResponse. */ - interface IListUserWorkloadsConfigMapsResponse { - - /** ListUserWorkloadsConfigMapsResponse userWorkloadsConfigMaps */ - userWorkloadsConfigMaps?: (google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap[]|null); - - /** ListUserWorkloadsConfigMapsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListUserWorkloadsConfigMapsResponse. */ - class ListUserWorkloadsConfigMapsResponse implements IListUserWorkloadsConfigMapsResponse { - - /** - * Constructs a new ListUserWorkloadsConfigMapsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse); - - /** ListUserWorkloadsConfigMapsResponse userWorkloadsConfigMaps. */ - public userWorkloadsConfigMaps: google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap[]; - - /** ListUserWorkloadsConfigMapsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListUserWorkloadsConfigMapsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUserWorkloadsConfigMapsResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse; - - /** - * Encodes the specified ListUserWorkloadsConfigMapsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse.verify|verify} messages. - * @param message ListUserWorkloadsConfigMapsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUserWorkloadsConfigMapsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse.verify|verify} messages. - * @param message ListUserWorkloadsConfigMapsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUserWorkloadsConfigMapsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUserWorkloadsConfigMapsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse; - - /** - * Decodes a ListUserWorkloadsConfigMapsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUserWorkloadsConfigMapsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse; - - /** - * Verifies a ListUserWorkloadsConfigMapsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUserWorkloadsConfigMapsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUserWorkloadsConfigMapsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse; - - /** - * Creates a plain object from a ListUserWorkloadsConfigMapsResponse message. Also converts values to other types if specified. - * @param message ListUserWorkloadsConfigMapsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUserWorkloadsConfigMapsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUserWorkloadsConfigMapsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListWorkloadsRequest. */ - interface IListWorkloadsRequest { - - /** ListWorkloadsRequest parent */ - parent?: (string|null); - - /** ListWorkloadsRequest pageSize */ - pageSize?: (number|null); - - /** ListWorkloadsRequest pageToken */ - pageToken?: (string|null); - - /** ListWorkloadsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListWorkloadsRequest. */ - class ListWorkloadsRequest implements IListWorkloadsRequest { - - /** - * Constructs a new ListWorkloadsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest); - - /** ListWorkloadsRequest parent. */ - public parent: string; - - /** ListWorkloadsRequest pageSize. */ - public pageSize: number; - - /** ListWorkloadsRequest pageToken. */ - public pageToken: string; - - /** ListWorkloadsRequest filter. */ - public filter: string; - - /** - * Creates a new ListWorkloadsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListWorkloadsRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest): google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest; - - /** - * Encodes the specified ListWorkloadsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest.verify|verify} messages. - * @param message ListWorkloadsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListWorkloadsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest.verify|verify} messages. - * @param message ListWorkloadsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListWorkloadsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListWorkloadsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest; - - /** - * Decodes a ListWorkloadsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListWorkloadsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest; - - /** - * Verifies a ListWorkloadsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListWorkloadsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListWorkloadsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest; - - /** - * Creates a plain object from a ListWorkloadsRequest message. Also converts values to other types if specified. - * @param message ListWorkloadsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListWorkloadsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListWorkloadsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListWorkloadsResponse. */ - interface IListWorkloadsResponse { - - /** ListWorkloadsResponse workloads */ - workloads?: (google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload[]|null); - - /** ListWorkloadsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListWorkloadsResponse. */ - class ListWorkloadsResponse implements IListWorkloadsResponse { - - /** - * Constructs a new ListWorkloadsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse); - - /** ListWorkloadsResponse workloads. */ - public workloads: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload[]; - - /** ListWorkloadsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListWorkloadsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListWorkloadsResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse; - - /** - * Encodes the specified ListWorkloadsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.verify|verify} messages. - * @param message ListWorkloadsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListWorkloadsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.verify|verify} messages. - * @param message ListWorkloadsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListWorkloadsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListWorkloadsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse; - - /** - * Decodes a ListWorkloadsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListWorkloadsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse; - - /** - * Verifies a ListWorkloadsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListWorkloadsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListWorkloadsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse; - - /** - * Creates a plain object from a ListWorkloadsResponse message. Also converts values to other types if specified. - * @param message ListWorkloadsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListWorkloadsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListWorkloadsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ListWorkloadsResponse { - - /** Properties of a ComposerWorkload. */ - interface IComposerWorkload { - - /** ComposerWorkload name */ - name?: (string|null); - - /** ComposerWorkload type */ - type?: (google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType|keyof typeof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType|null); - - /** ComposerWorkload status */ - status?: (google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus|null); - } - - /** Represents a ComposerWorkload. */ - class ComposerWorkload implements IComposerWorkload { - - /** - * Constructs a new ComposerWorkload. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload); - - /** ComposerWorkload name. */ - public name: string; - - /** ComposerWorkload type. */ - public type: (google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType|keyof typeof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType); - - /** ComposerWorkload status. */ - public status?: (google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus|null); - - /** - * Creates a new ComposerWorkload instance using the specified properties. - * @param [properties] Properties to set - * @returns ComposerWorkload instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload; - - /** - * Encodes the specified ComposerWorkload message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.verify|verify} messages. - * @param message ComposerWorkload message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComposerWorkload message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.verify|verify} messages. - * @param message ComposerWorkload message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComposerWorkload message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComposerWorkload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload; - - /** - * Decodes a ComposerWorkload message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComposerWorkload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload; - - /** - * Verifies a ComposerWorkload message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComposerWorkload message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComposerWorkload - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload; - - /** - * Creates a plain object from a ComposerWorkload message. Also converts values to other types if specified. - * @param message ComposerWorkload - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComposerWorkload to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComposerWorkload - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** ComposerWorkloadType enum. */ - enum ComposerWorkloadType { - COMPOSER_WORKLOAD_TYPE_UNSPECIFIED = 0, - CELERY_WORKER = 1, - KUBERNETES_WORKER = 2, - KUBERNETES_OPERATOR_POD = 3, - SCHEDULER = 4, - DAG_PROCESSOR = 5, - TRIGGERER = 6, - WEB_SERVER = 7, - REDIS = 8 - } - - /** Properties of a ComposerWorkloadStatus. */ - interface IComposerWorkloadStatus { - - /** ComposerWorkloadStatus state */ - state?: (google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState|keyof typeof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState|null); - - /** ComposerWorkloadStatus statusMessage */ - statusMessage?: (string|null); - - /** ComposerWorkloadStatus detailedStatusMessage */ - detailedStatusMessage?: (string|null); - } - - /** Represents a ComposerWorkloadStatus. */ - class ComposerWorkloadStatus implements IComposerWorkloadStatus { - - /** - * Constructs a new ComposerWorkloadStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus); - - /** ComposerWorkloadStatus state. */ - public state: (google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState|keyof typeof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState); - - /** ComposerWorkloadStatus statusMessage. */ - public statusMessage: string; - - /** ComposerWorkloadStatus detailedStatusMessage. */ - public detailedStatusMessage: string; - - /** - * Creates a new ComposerWorkloadStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns ComposerWorkloadStatus instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus; - - /** - * Encodes the specified ComposerWorkloadStatus message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.verify|verify} messages. - * @param message ComposerWorkloadStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComposerWorkloadStatus message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.verify|verify} messages. - * @param message ComposerWorkloadStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComposerWorkloadStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComposerWorkloadStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus; - - /** - * Decodes a ComposerWorkloadStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComposerWorkloadStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus; - - /** - * Verifies a ComposerWorkloadStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComposerWorkloadStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComposerWorkloadStatus - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus; - - /** - * Creates a plain object from a ComposerWorkloadStatus message. Also converts values to other types if specified. - * @param message ComposerWorkloadStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComposerWorkloadStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComposerWorkloadStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** ComposerWorkloadState enum. */ - enum ComposerWorkloadState { - COMPOSER_WORKLOAD_STATE_UNSPECIFIED = 0, - PENDING = 1, - OK = 2, - WARNING = 3, - ERROR = 4, - SUCCEEDED = 5, - FAILED = 6 - } - } - - /** Properties of a SaveSnapshotRequest. */ - interface ISaveSnapshotRequest { - - /** SaveSnapshotRequest environment */ - environment?: (string|null); - - /** SaveSnapshotRequest snapshotLocation */ - snapshotLocation?: (string|null); - } - - /** Represents a SaveSnapshotRequest. */ - class SaveSnapshotRequest implements ISaveSnapshotRequest { - - /** - * Constructs a new SaveSnapshotRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest); - - /** SaveSnapshotRequest environment. */ - public environment: string; - - /** SaveSnapshotRequest snapshotLocation. */ - public snapshotLocation: string; - - /** - * Creates a new SaveSnapshotRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SaveSnapshotRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest): google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest; - - /** - * Encodes the specified SaveSnapshotRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest.verify|verify} messages. - * @param message SaveSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SaveSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest.verify|verify} messages. - * @param message SaveSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SaveSnapshotRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SaveSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest; - - /** - * Decodes a SaveSnapshotRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SaveSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest; - - /** - * Verifies a SaveSnapshotRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SaveSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SaveSnapshotRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest; - - /** - * Creates a plain object from a SaveSnapshotRequest message. Also converts values to other types if specified. - * @param message SaveSnapshotRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SaveSnapshotRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SaveSnapshotRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SaveSnapshotResponse. */ - interface ISaveSnapshotResponse { - - /** SaveSnapshotResponse snapshotPath */ - snapshotPath?: (string|null); - } - - /** Represents a SaveSnapshotResponse. */ - class SaveSnapshotResponse implements ISaveSnapshotResponse { - - /** - * Constructs a new SaveSnapshotResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse); - - /** SaveSnapshotResponse snapshotPath. */ - public snapshotPath: string; - - /** - * Creates a new SaveSnapshotResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SaveSnapshotResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse): google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse; - - /** - * Encodes the specified SaveSnapshotResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse.verify|verify} messages. - * @param message SaveSnapshotResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SaveSnapshotResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse.verify|verify} messages. - * @param message SaveSnapshotResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SaveSnapshotResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SaveSnapshotResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse; - - /** - * Decodes a SaveSnapshotResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SaveSnapshotResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse; - - /** - * Verifies a SaveSnapshotResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SaveSnapshotResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SaveSnapshotResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse; - - /** - * Creates a plain object from a SaveSnapshotResponse message. Also converts values to other types if specified. - * @param message SaveSnapshotResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SaveSnapshotResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SaveSnapshotResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LoadSnapshotRequest. */ - interface ILoadSnapshotRequest { - - /** LoadSnapshotRequest environment */ - environment?: (string|null); - - /** LoadSnapshotRequest snapshotPath */ - snapshotPath?: (string|null); - - /** LoadSnapshotRequest skipPypiPackagesInstallation */ - skipPypiPackagesInstallation?: (boolean|null); - - /** LoadSnapshotRequest skipEnvironmentVariablesSetting */ - skipEnvironmentVariablesSetting?: (boolean|null); - - /** LoadSnapshotRequest skipAirflowOverridesSetting */ - skipAirflowOverridesSetting?: (boolean|null); - - /** LoadSnapshotRequest skipGcsDataCopying */ - skipGcsDataCopying?: (boolean|null); - } - - /** Represents a LoadSnapshotRequest. */ - class LoadSnapshotRequest implements ILoadSnapshotRequest { - - /** - * Constructs a new LoadSnapshotRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest); - - /** LoadSnapshotRequest environment. */ - public environment: string; - - /** LoadSnapshotRequest snapshotPath. */ - public snapshotPath: string; - - /** LoadSnapshotRequest skipPypiPackagesInstallation. */ - public skipPypiPackagesInstallation: boolean; - - /** LoadSnapshotRequest skipEnvironmentVariablesSetting. */ - public skipEnvironmentVariablesSetting: boolean; - - /** LoadSnapshotRequest skipAirflowOverridesSetting. */ - public skipAirflowOverridesSetting: boolean; - - /** LoadSnapshotRequest skipGcsDataCopying. */ - public skipGcsDataCopying: boolean; - - /** - * Creates a new LoadSnapshotRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadSnapshotRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest): google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest; - - /** - * Encodes the specified LoadSnapshotRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest.verify|verify} messages. - * @param message LoadSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoadSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest.verify|verify} messages. - * @param message LoadSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoadSnapshotRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest; - - /** - * Decodes a LoadSnapshotRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest; - - /** - * Verifies a LoadSnapshotRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoadSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadSnapshotRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest; - - /** - * Creates a plain object from a LoadSnapshotRequest message. Also converts values to other types if specified. - * @param message LoadSnapshotRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoadSnapshotRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoadSnapshotRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LoadSnapshotResponse. */ - interface ILoadSnapshotResponse { - } - - /** Represents a LoadSnapshotResponse. */ - class LoadSnapshotResponse implements ILoadSnapshotResponse { - - /** - * Constructs a new LoadSnapshotResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse); - - /** - * Creates a new LoadSnapshotResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadSnapshotResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse): google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse; - - /** - * Encodes the specified LoadSnapshotResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse.verify|verify} messages. - * @param message LoadSnapshotResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoadSnapshotResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse.verify|verify} messages. - * @param message LoadSnapshotResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoadSnapshotResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadSnapshotResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse; - - /** - * Decodes a LoadSnapshotResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadSnapshotResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse; - - /** - * Verifies a LoadSnapshotResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoadSnapshotResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadSnapshotResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse; - - /** - * Creates a plain object from a LoadSnapshotResponse message. Also converts values to other types if specified. - * @param message LoadSnapshotResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoadSnapshotResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoadSnapshotResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DatabaseFailoverRequest. */ - interface IDatabaseFailoverRequest { - - /** DatabaseFailoverRequest environment */ - environment?: (string|null); - } - - /** Represents a DatabaseFailoverRequest. */ - class DatabaseFailoverRequest implements IDatabaseFailoverRequest { - - /** - * Constructs a new DatabaseFailoverRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest); - - /** DatabaseFailoverRequest environment. */ - public environment: string; - - /** - * Creates a new DatabaseFailoverRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DatabaseFailoverRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest): google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest; - - /** - * Encodes the specified DatabaseFailoverRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest.verify|verify} messages. - * @param message DatabaseFailoverRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DatabaseFailoverRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest.verify|verify} messages. - * @param message DatabaseFailoverRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DatabaseFailoverRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DatabaseFailoverRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest; - - /** - * Decodes a DatabaseFailoverRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DatabaseFailoverRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest; - - /** - * Verifies a DatabaseFailoverRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DatabaseFailoverRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DatabaseFailoverRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest; - - /** - * Creates a plain object from a DatabaseFailoverRequest message. Also converts values to other types if specified. - * @param message DatabaseFailoverRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DatabaseFailoverRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DatabaseFailoverRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DatabaseFailoverResponse. */ - interface IDatabaseFailoverResponse { - } - - /** Represents a DatabaseFailoverResponse. */ - class DatabaseFailoverResponse implements IDatabaseFailoverResponse { - - /** - * Constructs a new DatabaseFailoverResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse); - - /** - * Creates a new DatabaseFailoverResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DatabaseFailoverResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse): google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse; - - /** - * Encodes the specified DatabaseFailoverResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse.verify|verify} messages. - * @param message DatabaseFailoverResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DatabaseFailoverResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse.verify|verify} messages. - * @param message DatabaseFailoverResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DatabaseFailoverResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DatabaseFailoverResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse; - - /** - * Decodes a DatabaseFailoverResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DatabaseFailoverResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse; - - /** - * Verifies a DatabaseFailoverResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DatabaseFailoverResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DatabaseFailoverResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse; - - /** - * Creates a plain object from a DatabaseFailoverResponse message. Also converts values to other types if specified. - * @param message DatabaseFailoverResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DatabaseFailoverResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DatabaseFailoverResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchDatabasePropertiesRequest. */ - interface IFetchDatabasePropertiesRequest { - - /** FetchDatabasePropertiesRequest environment */ - environment?: (string|null); - } - - /** Represents a FetchDatabasePropertiesRequest. */ - class FetchDatabasePropertiesRequest implements IFetchDatabasePropertiesRequest { - - /** - * Constructs a new FetchDatabasePropertiesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest); - - /** FetchDatabasePropertiesRequest environment. */ - public environment: string; - - /** - * Creates a new FetchDatabasePropertiesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchDatabasePropertiesRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest): google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest; - - /** - * Encodes the specified FetchDatabasePropertiesRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest.verify|verify} messages. - * @param message FetchDatabasePropertiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchDatabasePropertiesRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest.verify|verify} messages. - * @param message FetchDatabasePropertiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchDatabasePropertiesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchDatabasePropertiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest; - - /** - * Decodes a FetchDatabasePropertiesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchDatabasePropertiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest; - - /** - * Verifies a FetchDatabasePropertiesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchDatabasePropertiesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchDatabasePropertiesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest; - - /** - * Creates a plain object from a FetchDatabasePropertiesRequest message. Also converts values to other types if specified. - * @param message FetchDatabasePropertiesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchDatabasePropertiesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchDatabasePropertiesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchDatabasePropertiesResponse. */ - interface IFetchDatabasePropertiesResponse { - - /** FetchDatabasePropertiesResponse primaryGceZone */ - primaryGceZone?: (string|null); - - /** FetchDatabasePropertiesResponse secondaryGceZone */ - secondaryGceZone?: (string|null); - - /** FetchDatabasePropertiesResponse isFailoverReplicaAvailable */ - isFailoverReplicaAvailable?: (boolean|null); - } - - /** Represents a FetchDatabasePropertiesResponse. */ - class FetchDatabasePropertiesResponse implements IFetchDatabasePropertiesResponse { - - /** - * Constructs a new FetchDatabasePropertiesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse); - - /** FetchDatabasePropertiesResponse primaryGceZone. */ - public primaryGceZone: string; - - /** FetchDatabasePropertiesResponse secondaryGceZone. */ - public secondaryGceZone: string; - - /** FetchDatabasePropertiesResponse isFailoverReplicaAvailable. */ - public isFailoverReplicaAvailable: boolean; - - /** - * Creates a new FetchDatabasePropertiesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchDatabasePropertiesResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse): google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse; - - /** - * Encodes the specified FetchDatabasePropertiesResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse.verify|verify} messages. - * @param message FetchDatabasePropertiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchDatabasePropertiesResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse.verify|verify} messages. - * @param message FetchDatabasePropertiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchDatabasePropertiesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchDatabasePropertiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse; - - /** - * Decodes a FetchDatabasePropertiesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchDatabasePropertiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse; - - /** - * Verifies a FetchDatabasePropertiesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchDatabasePropertiesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchDatabasePropertiesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse; - - /** - * Creates a plain object from a FetchDatabasePropertiesResponse message. Also converts values to other types if specified. - * @param message FetchDatabasePropertiesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchDatabasePropertiesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchDatabasePropertiesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StorageConfig. */ - interface IStorageConfig { - - /** StorageConfig bucket */ - bucket?: (string|null); - } - - /** Represents a StorageConfig. */ - class StorageConfig implements IStorageConfig { - - /** - * Constructs a new StorageConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IStorageConfig); - - /** StorageConfig bucket. */ - public bucket: string; - - /** - * Creates a new StorageConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns StorageConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IStorageConfig): google.cloud.orchestration.airflow.service.v1.StorageConfig; - - /** - * Encodes the specified StorageConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StorageConfig.verify|verify} messages. - * @param message StorageConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StorageConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StorageConfig.verify|verify} messages. - * @param message StorageConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StorageConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.StorageConfig; - - /** - * Decodes a StorageConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.StorageConfig; - - /** - * Verifies a StorageConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StorageConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StorageConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.StorageConfig; - - /** - * Creates a plain object from a StorageConfig message. Also converts values to other types if specified. - * @param message StorageConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.StorageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StorageConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StorageConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnvironmentConfig. */ - interface IEnvironmentConfig { - - /** EnvironmentConfig gkeCluster */ - gkeCluster?: (string|null); - - /** EnvironmentConfig dagGcsPrefix */ - dagGcsPrefix?: (string|null); - - /** EnvironmentConfig nodeCount */ - nodeCount?: (number|null); - - /** EnvironmentConfig softwareConfig */ - softwareConfig?: (google.cloud.orchestration.airflow.service.v1.ISoftwareConfig|null); - - /** EnvironmentConfig nodeConfig */ - nodeConfig?: (google.cloud.orchestration.airflow.service.v1.INodeConfig|null); - - /** EnvironmentConfig privateEnvironmentConfig */ - privateEnvironmentConfig?: (google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig|null); - - /** EnvironmentConfig webServerNetworkAccessControl */ - webServerNetworkAccessControl?: (google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl|null); - - /** EnvironmentConfig databaseConfig */ - databaseConfig?: (google.cloud.orchestration.airflow.service.v1.IDatabaseConfig|null); - - /** EnvironmentConfig webServerConfig */ - webServerConfig?: (google.cloud.orchestration.airflow.service.v1.IWebServerConfig|null); - - /** EnvironmentConfig encryptionConfig */ - encryptionConfig?: (google.cloud.orchestration.airflow.service.v1.IEncryptionConfig|null); - - /** EnvironmentConfig maintenanceWindow */ - maintenanceWindow?: (google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow|null); - - /** EnvironmentConfig workloadsConfig */ - workloadsConfig?: (google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig|null); - - /** EnvironmentConfig environmentSize */ - environmentSize?: (google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize|keyof typeof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize|null); - - /** EnvironmentConfig airflowUri */ - airflowUri?: (string|null); - - /** EnvironmentConfig airflowByoidUri */ - airflowByoidUri?: (string|null); - - /** EnvironmentConfig masterAuthorizedNetworksConfig */ - masterAuthorizedNetworksConfig?: (google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig|null); - - /** EnvironmentConfig recoveryConfig */ - recoveryConfig?: (google.cloud.orchestration.airflow.service.v1.IRecoveryConfig|null); - - /** EnvironmentConfig resilienceMode */ - resilienceMode?: (google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode|keyof typeof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode|null); - - /** EnvironmentConfig dataRetentionConfig */ - dataRetentionConfig?: (google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig|null); - } - - /** Represents an EnvironmentConfig. */ - class EnvironmentConfig implements IEnvironmentConfig { - - /** - * Constructs a new EnvironmentConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig); - - /** EnvironmentConfig gkeCluster. */ - public gkeCluster: string; - - /** EnvironmentConfig dagGcsPrefix. */ - public dagGcsPrefix: string; - - /** EnvironmentConfig nodeCount. */ - public nodeCount: number; - - /** EnvironmentConfig softwareConfig. */ - public softwareConfig?: (google.cloud.orchestration.airflow.service.v1.ISoftwareConfig|null); - - /** EnvironmentConfig nodeConfig. */ - public nodeConfig?: (google.cloud.orchestration.airflow.service.v1.INodeConfig|null); - - /** EnvironmentConfig privateEnvironmentConfig. */ - public privateEnvironmentConfig?: (google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig|null); - - /** EnvironmentConfig webServerNetworkAccessControl. */ - public webServerNetworkAccessControl?: (google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl|null); - - /** EnvironmentConfig databaseConfig. */ - public databaseConfig?: (google.cloud.orchestration.airflow.service.v1.IDatabaseConfig|null); - - /** EnvironmentConfig webServerConfig. */ - public webServerConfig?: (google.cloud.orchestration.airflow.service.v1.IWebServerConfig|null); - - /** EnvironmentConfig encryptionConfig. */ - public encryptionConfig?: (google.cloud.orchestration.airflow.service.v1.IEncryptionConfig|null); - - /** EnvironmentConfig maintenanceWindow. */ - public maintenanceWindow?: (google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow|null); - - /** EnvironmentConfig workloadsConfig. */ - public workloadsConfig?: (google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig|null); - - /** EnvironmentConfig environmentSize. */ - public environmentSize: (google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize|keyof typeof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize); - - /** EnvironmentConfig airflowUri. */ - public airflowUri: string; - - /** EnvironmentConfig airflowByoidUri. */ - public airflowByoidUri: string; - - /** EnvironmentConfig masterAuthorizedNetworksConfig. */ - public masterAuthorizedNetworksConfig?: (google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig|null); - - /** EnvironmentConfig recoveryConfig. */ - public recoveryConfig?: (google.cloud.orchestration.airflow.service.v1.IRecoveryConfig|null); - - /** EnvironmentConfig resilienceMode. */ - public resilienceMode: (google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode|keyof typeof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode); - - /** EnvironmentConfig dataRetentionConfig. */ - public dataRetentionConfig?: (google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig|null); - - /** - * Creates a new EnvironmentConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns EnvironmentConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig): google.cloud.orchestration.airflow.service.v1.EnvironmentConfig; - - /** - * Encodes the specified EnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.verify|verify} messages. - * @param message EnvironmentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.verify|verify} messages. - * @param message EnvironmentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnvironmentConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnvironmentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.EnvironmentConfig; - - /** - * Decodes an EnvironmentConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnvironmentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.EnvironmentConfig; - - /** - * Verifies an EnvironmentConfig message. - * @param message Plain 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 EnvironmentConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnvironmentConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.EnvironmentConfig; - - /** - * Creates a plain object from an EnvironmentConfig message. Also converts values to other types if specified. - * @param message EnvironmentConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.EnvironmentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnvironmentConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnvironmentConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnvironmentConfig { - - /** EnvironmentSize enum. */ - enum EnvironmentSize { - ENVIRONMENT_SIZE_UNSPECIFIED = 0, - ENVIRONMENT_SIZE_SMALL = 1, - ENVIRONMENT_SIZE_MEDIUM = 2, - ENVIRONMENT_SIZE_LARGE = 3 - } - - /** ResilienceMode enum. */ - enum ResilienceMode { - RESILIENCE_MODE_UNSPECIFIED = 0, - HIGH_RESILIENCE = 1 - } - } - - /** Properties of a WebServerNetworkAccessControl. */ - interface IWebServerNetworkAccessControl { - - /** WebServerNetworkAccessControl allowedIpRanges */ - allowedIpRanges?: (google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange[]|null); - } - - /** Represents a WebServerNetworkAccessControl. */ - class WebServerNetworkAccessControl implements IWebServerNetworkAccessControl { - - /** - * Constructs a new WebServerNetworkAccessControl. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl); - - /** WebServerNetworkAccessControl allowedIpRanges. */ - public allowedIpRanges: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange[]; - - /** - * Creates a new WebServerNetworkAccessControl instance using the specified properties. - * @param [properties] Properties to set - * @returns WebServerNetworkAccessControl instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl; - - /** - * Encodes the specified WebServerNetworkAccessControl message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.verify|verify} messages. - * @param message WebServerNetworkAccessControl message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WebServerNetworkAccessControl message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.verify|verify} messages. - * @param message WebServerNetworkAccessControl message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WebServerNetworkAccessControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl; - - /** - * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WebServerNetworkAccessControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl; - - /** - * Verifies a WebServerNetworkAccessControl message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WebServerNetworkAccessControl message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WebServerNetworkAccessControl - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl; - - /** - * Creates a plain object from a WebServerNetworkAccessControl message. Also converts values to other types if specified. - * @param message WebServerNetworkAccessControl - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WebServerNetworkAccessControl to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WebServerNetworkAccessControl - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WebServerNetworkAccessControl { - - /** Properties of an AllowedIpRange. */ - interface IAllowedIpRange { - - /** AllowedIpRange value */ - value?: (string|null); - - /** AllowedIpRange description */ - description?: (string|null); - } - - /** Represents an AllowedIpRange. */ - class AllowedIpRange implements IAllowedIpRange { - - /** - * Constructs a new AllowedIpRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange); - - /** AllowedIpRange value. */ - public value: string; - - /** AllowedIpRange description. */ - public description: string; - - /** - * Creates a new AllowedIpRange instance using the specified properties. - * @param [properties] Properties to set - * @returns AllowedIpRange instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange; - - /** - * Encodes the specified AllowedIpRange message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. - * @param message AllowedIpRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AllowedIpRange message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. - * @param message AllowedIpRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AllowedIpRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AllowedIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange; - - /** - * Decodes an AllowedIpRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AllowedIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange; - - /** - * Verifies an AllowedIpRange message. - * @param message Plain 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 AllowedIpRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AllowedIpRange - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange; - - /** - * Creates a plain object from an AllowedIpRange message. Also converts values to other types if specified. - * @param message AllowedIpRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AllowedIpRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AllowedIpRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a DatabaseConfig. */ - interface IDatabaseConfig { - - /** DatabaseConfig machineType */ - machineType?: (string|null); - - /** DatabaseConfig zone */ - zone?: (string|null); - } - - /** Represents a DatabaseConfig. */ - class DatabaseConfig implements IDatabaseConfig { - - /** - * Constructs a new DatabaseConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IDatabaseConfig); - - /** DatabaseConfig machineType. */ - public machineType: string; - - /** DatabaseConfig zone. */ - public zone: string; - - /** - * Creates a new DatabaseConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns DatabaseConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IDatabaseConfig): google.cloud.orchestration.airflow.service.v1.DatabaseConfig; - - /** - * Encodes the specified DatabaseConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseConfig.verify|verify} messages. - * @param message DatabaseConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IDatabaseConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DatabaseConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseConfig.verify|verify} messages. - * @param message DatabaseConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IDatabaseConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DatabaseConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DatabaseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.DatabaseConfig; - - /** - * Decodes a DatabaseConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DatabaseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.DatabaseConfig; - - /** - * Verifies a DatabaseConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DatabaseConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DatabaseConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.DatabaseConfig; - - /** - * Creates a plain object from a DatabaseConfig message. Also converts values to other types if specified. - * @param message DatabaseConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.DatabaseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DatabaseConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DatabaseConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WebServerConfig. */ - interface IWebServerConfig { - - /** WebServerConfig machineType */ - machineType?: (string|null); - } - - /** Represents a WebServerConfig. */ - class WebServerConfig implements IWebServerConfig { - - /** - * Constructs a new WebServerConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IWebServerConfig); - - /** WebServerConfig machineType. */ - public machineType: string; - - /** - * Creates a new WebServerConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns WebServerConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IWebServerConfig): google.cloud.orchestration.airflow.service.v1.WebServerConfig; - - /** - * Encodes the specified WebServerConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerConfig.verify|verify} messages. - * @param message WebServerConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IWebServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WebServerConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerConfig.verify|verify} messages. - * @param message WebServerConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IWebServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WebServerConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WebServerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WebServerConfig; - - /** - * Decodes a WebServerConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WebServerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WebServerConfig; - - /** - * Verifies a WebServerConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WebServerConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WebServerConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WebServerConfig; - - /** - * Creates a plain object from a WebServerConfig message. Also converts values to other types if specified. - * @param message WebServerConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.WebServerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WebServerConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WebServerConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EncryptionConfig. */ - interface IEncryptionConfig { - - /** EncryptionConfig kmsKeyName */ - kmsKeyName?: (string|null); - } - - /** Represents an EncryptionConfig. */ - class EncryptionConfig implements IEncryptionConfig { - - /** - * Constructs a new EncryptionConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IEncryptionConfig); - - /** EncryptionConfig kmsKeyName. */ - public kmsKeyName: string; - - /** - * Creates a new EncryptionConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns EncryptionConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IEncryptionConfig): google.cloud.orchestration.airflow.service.v1.EncryptionConfig; - - /** - * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EncryptionConfig.verify|verify} messages. - * @param message EncryptionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EncryptionConfig.verify|verify} messages. - * @param message EncryptionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EncryptionConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EncryptionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.EncryptionConfig; - - /** - * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EncryptionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.EncryptionConfig; - - /** - * Verifies an EncryptionConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EncryptionConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.EncryptionConfig; - - /** - * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. - * @param message EncryptionConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EncryptionConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EncryptionConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MaintenanceWindow. */ - interface IMaintenanceWindow { - - /** MaintenanceWindow startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** MaintenanceWindow endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** MaintenanceWindow recurrence */ - recurrence?: (string|null); - } - - /** Represents a MaintenanceWindow. */ - class MaintenanceWindow implements IMaintenanceWindow { - - /** - * Constructs a new MaintenanceWindow. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow); - - /** MaintenanceWindow startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** MaintenanceWindow endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** MaintenanceWindow recurrence. */ - public recurrence: string; - - /** - * Creates a new MaintenanceWindow instance using the specified properties. - * @param [properties] Properties to set - * @returns MaintenanceWindow instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow): google.cloud.orchestration.airflow.service.v1.MaintenanceWindow; - - /** - * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.verify|verify} messages. - * @param message MaintenanceWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.verify|verify} messages. - * @param message MaintenanceWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MaintenanceWindow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.MaintenanceWindow; - - /** - * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.MaintenanceWindow; - - /** - * Verifies a MaintenanceWindow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MaintenanceWindow - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.MaintenanceWindow; - - /** - * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. - * @param message MaintenanceWindow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.MaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MaintenanceWindow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MaintenanceWindow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SoftwareConfig. */ - interface ISoftwareConfig { - - /** SoftwareConfig imageVersion */ - imageVersion?: (string|null); - - /** SoftwareConfig airflowConfigOverrides */ - airflowConfigOverrides?: ({ [k: string]: string }|null); - - /** SoftwareConfig pypiPackages */ - pypiPackages?: ({ [k: string]: string }|null); - - /** SoftwareConfig envVariables */ - envVariables?: ({ [k: string]: string }|null); - - /** SoftwareConfig pythonVersion */ - pythonVersion?: (string|null); - - /** SoftwareConfig schedulerCount */ - schedulerCount?: (number|null); - - /** SoftwareConfig cloudDataLineageIntegration */ - cloudDataLineageIntegration?: (google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration|null); - - /** SoftwareConfig webServerPluginsMode */ - webServerPluginsMode?: (google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode|keyof typeof google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode|null); - } - - /** Represents a SoftwareConfig. */ - class SoftwareConfig implements ISoftwareConfig { - - /** - * Constructs a new SoftwareConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.ISoftwareConfig); - - /** SoftwareConfig imageVersion. */ - public imageVersion: string; - - /** SoftwareConfig airflowConfigOverrides. */ - public airflowConfigOverrides: { [k: string]: string }; - - /** SoftwareConfig pypiPackages. */ - public pypiPackages: { [k: string]: string }; - - /** SoftwareConfig envVariables. */ - public envVariables: { [k: string]: string }; - - /** SoftwareConfig pythonVersion. */ - public pythonVersion: string; - - /** SoftwareConfig schedulerCount. */ - public schedulerCount: number; - - /** SoftwareConfig cloudDataLineageIntegration. */ - public cloudDataLineageIntegration?: (google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration|null); - - /** SoftwareConfig webServerPluginsMode. */ - public webServerPluginsMode: (google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode|keyof typeof google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode); - - /** - * Creates a new SoftwareConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SoftwareConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.ISoftwareConfig): google.cloud.orchestration.airflow.service.v1.SoftwareConfig; - - /** - * Encodes the specified SoftwareConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SoftwareConfig.verify|verify} messages. - * @param message SoftwareConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.ISoftwareConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SoftwareConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SoftwareConfig.verify|verify} messages. - * @param message SoftwareConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ISoftwareConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SoftwareConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SoftwareConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.SoftwareConfig; - - /** - * Decodes a SoftwareConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SoftwareConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.SoftwareConfig; - - /** - * Verifies a SoftwareConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SoftwareConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SoftwareConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.SoftwareConfig; - - /** - * Creates a plain object from a SoftwareConfig message. Also converts values to other types if specified. - * @param message SoftwareConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.SoftwareConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SoftwareConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SoftwareConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SoftwareConfig { - - /** WebServerPluginsMode enum. */ - enum WebServerPluginsMode { - WEB_SERVER_PLUGINS_MODE_UNSPECIFIED = 0, - PLUGINS_DISABLED = 1, - PLUGINS_ENABLED = 2 - } - } - - /** Properties of a IPAllocationPolicy. */ - interface IIPAllocationPolicy { - - /** IPAllocationPolicy useIpAliases */ - useIpAliases?: (boolean|null); - - /** IPAllocationPolicy clusterSecondaryRangeName */ - clusterSecondaryRangeName?: (string|null); - - /** IPAllocationPolicy clusterIpv4CidrBlock */ - clusterIpv4CidrBlock?: (string|null); - - /** IPAllocationPolicy servicesSecondaryRangeName */ - servicesSecondaryRangeName?: (string|null); - - /** IPAllocationPolicy servicesIpv4CidrBlock */ - servicesIpv4CidrBlock?: (string|null); - } - - /** Represents a IPAllocationPolicy. */ - class IPAllocationPolicy implements IIPAllocationPolicy { - - /** - * Constructs a new IPAllocationPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy); - - /** IPAllocationPolicy useIpAliases. */ - public useIpAliases: boolean; - - /** IPAllocationPolicy clusterSecondaryRangeName. */ - public clusterSecondaryRangeName?: (string|null); - - /** IPAllocationPolicy clusterIpv4CidrBlock. */ - public clusterIpv4CidrBlock?: (string|null); - - /** IPAllocationPolicy servicesSecondaryRangeName. */ - public servicesSecondaryRangeName?: (string|null); - - /** IPAllocationPolicy servicesIpv4CidrBlock. */ - public servicesIpv4CidrBlock?: (string|null); - - /** IPAllocationPolicy clusterIpAllocation. */ - public clusterIpAllocation?: ("clusterSecondaryRangeName"|"clusterIpv4CidrBlock"); - - /** IPAllocationPolicy servicesIpAllocation. */ - public servicesIpAllocation?: ("servicesSecondaryRangeName"|"servicesIpv4CidrBlock"); - - /** - * Creates a new IPAllocationPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns IPAllocationPolicy instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy): google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy; - - /** - * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.verify|verify} messages. - * @param message IPAllocationPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.verify|verify} messages. - * @param message IPAllocationPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a IPAllocationPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IPAllocationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy; - - /** - * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IPAllocationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy; - - /** - * Verifies a IPAllocationPolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IPAllocationPolicy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy; - - /** - * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. - * @param message IPAllocationPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IPAllocationPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IPAllocationPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeConfig. */ - interface INodeConfig { - - /** NodeConfig location */ - location?: (string|null); - - /** NodeConfig machineType */ - machineType?: (string|null); - - /** NodeConfig network */ - network?: (string|null); - - /** NodeConfig subnetwork */ - subnetwork?: (string|null); - - /** NodeConfig diskSizeGb */ - diskSizeGb?: (number|null); - - /** NodeConfig oauthScopes */ - oauthScopes?: (string[]|null); - - /** NodeConfig serviceAccount */ - serviceAccount?: (string|null); - - /** NodeConfig tags */ - tags?: (string[]|null); - - /** NodeConfig ipAllocationPolicy */ - ipAllocationPolicy?: (google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy|null); - - /** NodeConfig enableIpMasqAgent */ - enableIpMasqAgent?: (boolean|null); - - /** NodeConfig composerNetworkAttachment */ - composerNetworkAttachment?: (string|null); - - /** NodeConfig composerInternalIpv4CidrBlock */ - composerInternalIpv4CidrBlock?: (string|null); - } - - /** Represents a NodeConfig. */ - class NodeConfig implements INodeConfig { - - /** - * Constructs a new NodeConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.INodeConfig); - - /** NodeConfig location. */ - public location: string; - - /** NodeConfig machineType. */ - public machineType: string; - - /** NodeConfig network. */ - public network: string; - - /** NodeConfig subnetwork. */ - public subnetwork: string; - - /** NodeConfig diskSizeGb. */ - public diskSizeGb: number; - - /** NodeConfig oauthScopes. */ - public oauthScopes: string[]; - - /** NodeConfig serviceAccount. */ - public serviceAccount: string; - - /** NodeConfig tags. */ - public tags: string[]; - - /** NodeConfig ipAllocationPolicy. */ - public ipAllocationPolicy?: (google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy|null); - - /** NodeConfig enableIpMasqAgent. */ - public enableIpMasqAgent: boolean; - - /** NodeConfig composerNetworkAttachment. */ - public composerNetworkAttachment: string; - - /** NodeConfig composerInternalIpv4CidrBlock. */ - public composerInternalIpv4CidrBlock: string; - - /** - * Creates a new NodeConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.INodeConfig): google.cloud.orchestration.airflow.service.v1.NodeConfig; - - /** - * Encodes the specified NodeConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NodeConfig.verify|verify} messages. - * @param message NodeConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NodeConfig.verify|verify} messages. - * @param message NodeConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.NodeConfig; - - /** - * Decodes a NodeConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.NodeConfig; - - /** - * Verifies a NodeConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.NodeConfig; - - /** - * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. - * @param message NodeConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.NodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PrivateClusterConfig. */ - interface IPrivateClusterConfig { - - /** PrivateClusterConfig enablePrivateEndpoint */ - enablePrivateEndpoint?: (boolean|null); - - /** PrivateClusterConfig masterIpv4CidrBlock */ - masterIpv4CidrBlock?: (string|null); - - /** PrivateClusterConfig masterIpv4ReservedRange */ - masterIpv4ReservedRange?: (string|null); - } - - /** Represents a PrivateClusterConfig. */ - class PrivateClusterConfig implements IPrivateClusterConfig { - - /** - * Constructs a new PrivateClusterConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig); - - /** PrivateClusterConfig enablePrivateEndpoint. */ - public enablePrivateEndpoint: boolean; - - /** PrivateClusterConfig masterIpv4CidrBlock. */ - public masterIpv4CidrBlock: string; - - /** PrivateClusterConfig masterIpv4ReservedRange. */ - public masterIpv4ReservedRange: string; - - /** - * Creates a new PrivateClusterConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateClusterConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig): google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig; - - /** - * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.verify|verify} messages. - * @param message PrivateClusterConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.verify|verify} messages. - * @param message PrivateClusterConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrivateClusterConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateClusterConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig; - - /** - * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateClusterConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig; - - /** - * Verifies a PrivateClusterConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateClusterConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig; - - /** - * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. - * @param message PrivateClusterConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrivateClusterConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrivateClusterConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkingConfig. */ - interface INetworkingConfig { - - /** NetworkingConfig connectionType */ - connectionType?: (google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType|keyof typeof google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType|null); - } - - /** Represents a NetworkingConfig. */ - class NetworkingConfig implements INetworkingConfig { - - /** - * Constructs a new NetworkingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.INetworkingConfig); - - /** NetworkingConfig connectionType. */ - public connectionType: (google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType|keyof typeof google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType); - - /** - * Creates a new NetworkingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkingConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.INetworkingConfig): google.cloud.orchestration.airflow.service.v1.NetworkingConfig; - - /** - * Encodes the specified NetworkingConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NetworkingConfig.verify|verify} messages. - * @param message NetworkingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.INetworkingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkingConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NetworkingConfig.verify|verify} messages. - * @param message NetworkingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.INetworkingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.NetworkingConfig; - - /** - * Decodes a NetworkingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.NetworkingConfig; - - /** - * Verifies a NetworkingConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkingConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.NetworkingConfig; - - /** - * Creates a plain object from a NetworkingConfig message. Also converts values to other types if specified. - * @param message NetworkingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.NetworkingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkingConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkingConfig { - - /** ConnectionType enum. */ - enum ConnectionType { - CONNECTION_TYPE_UNSPECIFIED = 0, - VPC_PEERING = 1, - PRIVATE_SERVICE_CONNECT = 2 - } - } - - /** Properties of a PrivateEnvironmentConfig. */ - interface IPrivateEnvironmentConfig { - - /** PrivateEnvironmentConfig enablePrivateEnvironment */ - enablePrivateEnvironment?: (boolean|null); - - /** PrivateEnvironmentConfig enablePrivateBuildsOnly */ - enablePrivateBuildsOnly?: (boolean|null); - - /** PrivateEnvironmentConfig privateClusterConfig */ - privateClusterConfig?: (google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig|null); - - /** PrivateEnvironmentConfig webServerIpv4CidrBlock */ - webServerIpv4CidrBlock?: (string|null); - - /** PrivateEnvironmentConfig cloudSqlIpv4CidrBlock */ - cloudSqlIpv4CidrBlock?: (string|null); - - /** PrivateEnvironmentConfig webServerIpv4ReservedRange */ - webServerIpv4ReservedRange?: (string|null); - - /** PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock */ - cloudComposerNetworkIpv4CidrBlock?: (string|null); - - /** PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange */ - cloudComposerNetworkIpv4ReservedRange?: (string|null); - - /** PrivateEnvironmentConfig enablePrivatelyUsedPublicIps */ - enablePrivatelyUsedPublicIps?: (boolean|null); - - /** PrivateEnvironmentConfig cloudComposerConnectionSubnetwork */ - cloudComposerConnectionSubnetwork?: (string|null); - - /** PrivateEnvironmentConfig networkingConfig */ - networkingConfig?: (google.cloud.orchestration.airflow.service.v1.INetworkingConfig|null); - } - - /** Represents a PrivateEnvironmentConfig. */ - class PrivateEnvironmentConfig implements IPrivateEnvironmentConfig { - - /** - * Constructs a new PrivateEnvironmentConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig); - - /** PrivateEnvironmentConfig enablePrivateEnvironment. */ - public enablePrivateEnvironment: boolean; - - /** PrivateEnvironmentConfig enablePrivateBuildsOnly. */ - public enablePrivateBuildsOnly: boolean; - - /** PrivateEnvironmentConfig privateClusterConfig. */ - public privateClusterConfig?: (google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig|null); - - /** PrivateEnvironmentConfig webServerIpv4CidrBlock. */ - public webServerIpv4CidrBlock: string; - - /** PrivateEnvironmentConfig cloudSqlIpv4CidrBlock. */ - public cloudSqlIpv4CidrBlock: string; - - /** PrivateEnvironmentConfig webServerIpv4ReservedRange. */ - public webServerIpv4ReservedRange: string; - - /** PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock. */ - public cloudComposerNetworkIpv4CidrBlock: string; - - /** PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange. */ - public cloudComposerNetworkIpv4ReservedRange: string; - - /** PrivateEnvironmentConfig enablePrivatelyUsedPublicIps. */ - public enablePrivatelyUsedPublicIps: boolean; - - /** PrivateEnvironmentConfig cloudComposerConnectionSubnetwork. */ - public cloudComposerConnectionSubnetwork: string; - - /** PrivateEnvironmentConfig networkingConfig. */ - public networkingConfig?: (google.cloud.orchestration.airflow.service.v1.INetworkingConfig|null); - - /** - * Creates a new PrivateEnvironmentConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateEnvironmentConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig): google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig; - - /** - * Encodes the specified PrivateEnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.verify|verify} messages. - * @param message PrivateEnvironmentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrivateEnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.verify|verify} messages. - * @param message PrivateEnvironmentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateEnvironmentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig; - - /** - * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateEnvironmentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig; - - /** - * Verifies a PrivateEnvironmentConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrivateEnvironmentConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateEnvironmentConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig; - - /** - * Creates a plain object from a PrivateEnvironmentConfig message. Also converts values to other types if specified. - * @param message PrivateEnvironmentConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrivateEnvironmentConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrivateEnvironmentConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkloadsConfig. */ - interface IWorkloadsConfig { - - /** WorkloadsConfig scheduler */ - scheduler?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource|null); - - /** WorkloadsConfig webServer */ - webServer?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource|null); - - /** WorkloadsConfig worker */ - worker?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource|null); - - /** WorkloadsConfig triggerer */ - triggerer?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource|null); - - /** WorkloadsConfig dagProcessor */ - dagProcessor?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource|null); - } - - /** Represents a WorkloadsConfig. */ - class WorkloadsConfig implements IWorkloadsConfig { - - /** - * Constructs a new WorkloadsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig); - - /** WorkloadsConfig scheduler. */ - public scheduler?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource|null); - - /** WorkloadsConfig webServer. */ - public webServer?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource|null); - - /** WorkloadsConfig worker. */ - public worker?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource|null); - - /** WorkloadsConfig triggerer. */ - public triggerer?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource|null); - - /** WorkloadsConfig dagProcessor. */ - public dagProcessor?: (google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource|null); - - /** - * Creates a new WorkloadsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkloadsConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig; - - /** - * Encodes the specified WorkloadsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.verify|verify} messages. - * @param message WorkloadsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkloadsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.verify|verify} messages. - * @param message WorkloadsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkloadsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkloadsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig; - - /** - * Decodes a WorkloadsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkloadsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig; - - /** - * Verifies a WorkloadsConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkloadsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkloadsConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig; - - /** - * Creates a plain object from a WorkloadsConfig message. Also converts values to other types if specified. - * @param message WorkloadsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkloadsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkloadsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WorkloadsConfig { - - /** Properties of a SchedulerResource. */ - interface ISchedulerResource { - - /** SchedulerResource cpu */ - cpu?: (number|null); - - /** SchedulerResource memoryGb */ - memoryGb?: (number|null); - - /** SchedulerResource storageGb */ - storageGb?: (number|null); - - /** SchedulerResource count */ - count?: (number|null); - } - - /** Represents a SchedulerResource. */ - class SchedulerResource implements ISchedulerResource { - - /** - * Constructs a new SchedulerResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource); - - /** SchedulerResource cpu. */ - public cpu: number; - - /** SchedulerResource memoryGb. */ - public memoryGb: number; - - /** SchedulerResource storageGb. */ - public storageGb: number; - - /** SchedulerResource count. */ - public count: number; - - /** - * Creates a new SchedulerResource instance using the specified properties. - * @param [properties] Properties to set - * @returns SchedulerResource instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource; - - /** - * Encodes the specified SchedulerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.verify|verify} messages. - * @param message SchedulerResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SchedulerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.verify|verify} messages. - * @param message SchedulerResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SchedulerResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchedulerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource; - - /** - * Decodes a SchedulerResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchedulerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource; - - /** - * Verifies a SchedulerResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SchedulerResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchedulerResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource; - - /** - * Creates a plain object from a SchedulerResource message. Also converts values to other types if specified. - * @param message SchedulerResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SchedulerResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SchedulerResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WebServerResource. */ - interface IWebServerResource { - - /** WebServerResource cpu */ - cpu?: (number|null); - - /** WebServerResource memoryGb */ - memoryGb?: (number|null); - - /** WebServerResource storageGb */ - storageGb?: (number|null); - } - - /** Represents a WebServerResource. */ - class WebServerResource implements IWebServerResource { - - /** - * Constructs a new WebServerResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource); - - /** WebServerResource cpu. */ - public cpu: number; - - /** WebServerResource memoryGb. */ - public memoryGb: number; - - /** WebServerResource storageGb. */ - public storageGb: number; - - /** - * Creates a new WebServerResource instance using the specified properties. - * @param [properties] Properties to set - * @returns WebServerResource instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource; - - /** - * Encodes the specified WebServerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.verify|verify} messages. - * @param message WebServerResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WebServerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.verify|verify} messages. - * @param message WebServerResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WebServerResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WebServerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource; - - /** - * Decodes a WebServerResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WebServerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource; - - /** - * Verifies a WebServerResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WebServerResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WebServerResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource; - - /** - * Creates a plain object from a WebServerResource message. Also converts values to other types if specified. - * @param message WebServerResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WebServerResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WebServerResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkerResource. */ - interface IWorkerResource { - - /** WorkerResource cpu */ - cpu?: (number|null); - - /** WorkerResource memoryGb */ - memoryGb?: (number|null); - - /** WorkerResource storageGb */ - storageGb?: (number|null); - - /** WorkerResource minCount */ - minCount?: (number|null); - - /** WorkerResource maxCount */ - maxCount?: (number|null); - } - - /** Represents a WorkerResource. */ - class WorkerResource implements IWorkerResource { - - /** - * Constructs a new WorkerResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource); - - /** WorkerResource cpu. */ - public cpu: number; - - /** WorkerResource memoryGb. */ - public memoryGb: number; - - /** WorkerResource storageGb. */ - public storageGb: number; - - /** WorkerResource minCount. */ - public minCount: number; - - /** WorkerResource maxCount. */ - public maxCount: number; - - /** - * Creates a new WorkerResource instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerResource instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource; - - /** - * Encodes the specified WorkerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.verify|verify} messages. - * @param message WorkerResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.verify|verify} messages. - * @param message WorkerResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource; - - /** - * Decodes a WorkerResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource; - - /** - * Verifies a WorkerResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkerResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource; - - /** - * Creates a plain object from a WorkerResource message. Also converts values to other types if specified. - * @param message WorkerResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TriggererResource. */ - interface ITriggererResource { - - /** TriggererResource count */ - count?: (number|null); - - /** TriggererResource cpu */ - cpu?: (number|null); - - /** TriggererResource memoryGb */ - memoryGb?: (number|null); - } - - /** Represents a TriggererResource. */ - class TriggererResource implements ITriggererResource { - - /** - * Constructs a new TriggererResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource); - - /** TriggererResource count. */ - public count: number; - - /** TriggererResource cpu. */ - public cpu: number; - - /** TriggererResource memoryGb. */ - public memoryGb: number; - - /** - * Creates a new TriggererResource instance using the specified properties. - * @param [properties] Properties to set - * @returns TriggererResource instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource; - - /** - * Encodes the specified TriggererResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.verify|verify} messages. - * @param message TriggererResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TriggererResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.verify|verify} messages. - * @param message TriggererResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TriggererResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TriggererResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource; - - /** - * Decodes a TriggererResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TriggererResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource; - - /** - * Verifies a TriggererResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TriggererResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TriggererResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource; - - /** - * Creates a plain object from a TriggererResource message. Also converts values to other types if specified. - * @param message TriggererResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TriggererResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TriggererResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DagProcessorResource. */ - interface IDagProcessorResource { - - /** DagProcessorResource cpu */ - cpu?: (number|null); - - /** DagProcessorResource memoryGb */ - memoryGb?: (number|null); - - /** DagProcessorResource storageGb */ - storageGb?: (number|null); - - /** DagProcessorResource count */ - count?: (number|null); - } - - /** Represents a DagProcessorResource. */ - class DagProcessorResource implements IDagProcessorResource { - - /** - * Constructs a new DagProcessorResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource); - - /** DagProcessorResource cpu. */ - public cpu: number; - - /** DagProcessorResource memoryGb. */ - public memoryGb: number; - - /** DagProcessorResource storageGb. */ - public storageGb: number; - - /** DagProcessorResource count. */ - public count: number; - - /** - * Creates a new DagProcessorResource instance using the specified properties. - * @param [properties] Properties to set - * @returns DagProcessorResource instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource; - - /** - * Encodes the specified DagProcessorResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.verify|verify} messages. - * @param message DagProcessorResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DagProcessorResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.verify|verify} messages. - * @param message DagProcessorResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DagProcessorResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DagProcessorResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource; - - /** - * Decodes a DagProcessorResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DagProcessorResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource; - - /** - * Verifies a DagProcessorResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DagProcessorResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DagProcessorResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource; - - /** - * Creates a plain object from a DagProcessorResource message. Also converts values to other types if specified. - * @param message DagProcessorResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DagProcessorResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DagProcessorResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a RecoveryConfig. */ - interface IRecoveryConfig { - - /** RecoveryConfig scheduledSnapshotsConfig */ - scheduledSnapshotsConfig?: (google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig|null); - } - - /** Represents a RecoveryConfig. */ - class RecoveryConfig implements IRecoveryConfig { - - /** - * Constructs a new RecoveryConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IRecoveryConfig); - - /** RecoveryConfig scheduledSnapshotsConfig. */ - public scheduledSnapshotsConfig?: (google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig|null); - - /** - * Creates a new RecoveryConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns RecoveryConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IRecoveryConfig): google.cloud.orchestration.airflow.service.v1.RecoveryConfig; - - /** - * Encodes the specified RecoveryConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.RecoveryConfig.verify|verify} messages. - * @param message RecoveryConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IRecoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecoveryConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.RecoveryConfig.verify|verify} messages. - * @param message RecoveryConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IRecoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecoveryConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecoveryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.RecoveryConfig; - - /** - * Decodes a RecoveryConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecoveryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.RecoveryConfig; - - /** - * Verifies a RecoveryConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RecoveryConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecoveryConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.RecoveryConfig; - - /** - * Creates a plain object from a RecoveryConfig message. Also converts values to other types if specified. - * @param message RecoveryConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.RecoveryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecoveryConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RecoveryConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ScheduledSnapshotsConfig. */ - interface IScheduledSnapshotsConfig { - - /** ScheduledSnapshotsConfig enabled */ - enabled?: (boolean|null); - - /** ScheduledSnapshotsConfig snapshotLocation */ - snapshotLocation?: (string|null); - - /** ScheduledSnapshotsConfig snapshotCreationSchedule */ - snapshotCreationSchedule?: (string|null); - - /** ScheduledSnapshotsConfig timeZone */ - timeZone?: (string|null); - } - - /** Represents a ScheduledSnapshotsConfig. */ - class ScheduledSnapshotsConfig implements IScheduledSnapshotsConfig { - - /** - * Constructs a new ScheduledSnapshotsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig); - - /** ScheduledSnapshotsConfig enabled. */ - public enabled: boolean; - - /** ScheduledSnapshotsConfig snapshotLocation. */ - public snapshotLocation: string; - - /** ScheduledSnapshotsConfig snapshotCreationSchedule. */ - public snapshotCreationSchedule: string; - - /** ScheduledSnapshotsConfig timeZone. */ - public timeZone: string; - - /** - * Creates a new ScheduledSnapshotsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ScheduledSnapshotsConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig): google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig; - - /** - * Encodes the specified ScheduledSnapshotsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.verify|verify} messages. - * @param message ScheduledSnapshotsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScheduledSnapshotsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.verify|verify} messages. - * @param message ScheduledSnapshotsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScheduledSnapshotsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScheduledSnapshotsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig; - - /** - * Decodes a ScheduledSnapshotsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScheduledSnapshotsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig; - - /** - * Verifies a ScheduledSnapshotsConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ScheduledSnapshotsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScheduledSnapshotsConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig; - - /** - * Creates a plain object from a ScheduledSnapshotsConfig message. Also converts values to other types if specified. - * @param message ScheduledSnapshotsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScheduledSnapshotsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScheduledSnapshotsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MasterAuthorizedNetworksConfig. */ - interface IMasterAuthorizedNetworksConfig { - - /** MasterAuthorizedNetworksConfig enabled */ - enabled?: (boolean|null); - - /** MasterAuthorizedNetworksConfig cidrBlocks */ - cidrBlocks?: (google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock[]|null); - } - - /** Represents a MasterAuthorizedNetworksConfig. */ - class MasterAuthorizedNetworksConfig implements IMasterAuthorizedNetworksConfig { - - /** - * Constructs a new MasterAuthorizedNetworksConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig); - - /** MasterAuthorizedNetworksConfig enabled. */ - public enabled: boolean; - - /** MasterAuthorizedNetworksConfig cidrBlocks. */ - public cidrBlocks: google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock[]; - - /** - * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MasterAuthorizedNetworksConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig): google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig; - - /** - * Encodes the specified MasterAuthorizedNetworksConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.verify|verify} messages. - * @param message MasterAuthorizedNetworksConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MasterAuthorizedNetworksConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.verify|verify} messages. - * @param message MasterAuthorizedNetworksConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MasterAuthorizedNetworksConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig; - - /** - * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MasterAuthorizedNetworksConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig; - - /** - * Verifies a MasterAuthorizedNetworksConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MasterAuthorizedNetworksConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MasterAuthorizedNetworksConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig; - - /** - * Creates a plain object from a MasterAuthorizedNetworksConfig message. Also converts values to other types if specified. - * @param message MasterAuthorizedNetworksConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MasterAuthorizedNetworksConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MasterAuthorizedNetworksConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MasterAuthorizedNetworksConfig { - - /** Properties of a CidrBlock. */ - interface ICidrBlock { - - /** CidrBlock displayName */ - displayName?: (string|null); - - /** CidrBlock cidrBlock */ - cidrBlock?: (string|null); - } - - /** Represents a CidrBlock. */ - class CidrBlock implements ICidrBlock { - - /** - * Constructs a new CidrBlock. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock); - - /** CidrBlock displayName. */ - public displayName: string; - - /** CidrBlock cidrBlock. */ - public cidrBlock: string; - - /** - * Creates a new CidrBlock instance using the specified properties. - * @param [properties] Properties to set - * @returns CidrBlock instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock): google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock; - - /** - * Encodes the specified CidrBlock message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. - * @param message CidrBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CidrBlock message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. - * @param message CidrBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CidrBlock message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CidrBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock; - - /** - * Decodes a CidrBlock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CidrBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock; - - /** - * Verifies a CidrBlock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CidrBlock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CidrBlock - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock; - - /** - * Creates a plain object from a CidrBlock message. Also converts values to other types if specified. - * @param message CidrBlock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CidrBlock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CidrBlock - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CloudDataLineageIntegration. */ - interface ICloudDataLineageIntegration { - - /** CloudDataLineageIntegration enabled */ - enabled?: (boolean|null); - } - - /** Represents a CloudDataLineageIntegration. */ - class CloudDataLineageIntegration implements ICloudDataLineageIntegration { - - /** - * Constructs a new CloudDataLineageIntegration. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration); - - /** CloudDataLineageIntegration enabled. */ - public enabled: boolean; - - /** - * Creates a new CloudDataLineageIntegration instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudDataLineageIntegration instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration): google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration; - - /** - * Encodes the specified CloudDataLineageIntegration message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.verify|verify} messages. - * @param message CloudDataLineageIntegration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudDataLineageIntegration message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.verify|verify} messages. - * @param message CloudDataLineageIntegration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudDataLineageIntegration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudDataLineageIntegration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration; - - /** - * Decodes a CloudDataLineageIntegration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudDataLineageIntegration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration; - - /** - * Verifies a CloudDataLineageIntegration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudDataLineageIntegration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudDataLineageIntegration - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration; - - /** - * Creates a plain object from a CloudDataLineageIntegration message. Also converts values to other types if specified. - * @param message CloudDataLineageIntegration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudDataLineageIntegration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudDataLineageIntegration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Environment. */ - interface IEnvironment { - - /** Environment name */ - name?: (string|null); - - /** Environment config */ - config?: (google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig|null); - - /** Environment uuid */ - uuid?: (string|null); - - /** Environment state */ - state?: (google.cloud.orchestration.airflow.service.v1.Environment.State|keyof typeof google.cloud.orchestration.airflow.service.v1.Environment.State|null); - - /** Environment createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Environment updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Environment labels */ - labels?: ({ [k: string]: string }|null); - - /** Environment satisfiesPzs */ - satisfiesPzs?: (boolean|null); - - /** Environment satisfiesPzi */ - satisfiesPzi?: (boolean|null); - - /** Environment storageConfig */ - storageConfig?: (google.cloud.orchestration.airflow.service.v1.IStorageConfig|null); - } - - /** Represents an Environment. */ - class Environment implements IEnvironment { - - /** - * Constructs a new Environment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IEnvironment); - - /** Environment name. */ - public name: string; - - /** Environment config. */ - public config?: (google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig|null); - - /** Environment uuid. */ - public uuid: string; - - /** Environment state. */ - public state: (google.cloud.orchestration.airflow.service.v1.Environment.State|keyof typeof google.cloud.orchestration.airflow.service.v1.Environment.State); - - /** Environment createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Environment updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Environment labels. */ - public labels: { [k: string]: string }; - - /** Environment satisfiesPzs. */ - public satisfiesPzs: boolean; - - /** Environment satisfiesPzi. */ - public satisfiesPzi: boolean; - - /** Environment storageConfig. */ - public storageConfig?: (google.cloud.orchestration.airflow.service.v1.IStorageConfig|null); - - /** - * Creates a new Environment instance using the specified properties. - * @param [properties] Properties to set - * @returns Environment instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IEnvironment): google.cloud.orchestration.airflow.service.v1.Environment; - - /** - * Encodes the specified Environment message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.Environment.verify|verify} messages. - * @param message Environment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.Environment.verify|verify} messages. - * @param message Environment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Environment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Environment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.Environment; - - /** - * Decodes an Environment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Environment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.Environment; - - /** - * Verifies an Environment message. - * @param message Plain 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 Environment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Environment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.Environment; - - /** - * Creates a plain object from an Environment message. Also converts values to other types if specified. - * @param message Environment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.Environment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Environment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Environment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Environment { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - RUNNING = 2, - UPDATING = 3, - DELETING = 4, - ERROR = 5 - } - } - - /** Properties of a CheckUpgradeRequest. */ - interface ICheckUpgradeRequest { - - /** CheckUpgradeRequest environment */ - environment?: (string|null); - - /** CheckUpgradeRequest imageVersion */ - imageVersion?: (string|null); - } - - /** Represents a CheckUpgradeRequest. */ - class CheckUpgradeRequest implements ICheckUpgradeRequest { - - /** - * Constructs a new CheckUpgradeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest); - - /** CheckUpgradeRequest environment. */ - public environment: string; - - /** CheckUpgradeRequest imageVersion. */ - public imageVersion: string; - - /** - * Creates a new CheckUpgradeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CheckUpgradeRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest): google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest; - - /** - * Encodes the specified CheckUpgradeRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest.verify|verify} messages. - * @param message CheckUpgradeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CheckUpgradeRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest.verify|verify} messages. - * @param message CheckUpgradeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CheckUpgradeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CheckUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest; - - /** - * Decodes a CheckUpgradeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CheckUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest; - - /** - * Verifies a CheckUpgradeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CheckUpgradeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CheckUpgradeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest; - - /** - * Creates a plain object from a CheckUpgradeRequest message. Also converts values to other types if specified. - * @param message CheckUpgradeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CheckUpgradeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CheckUpgradeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CheckUpgradeResponse. */ - interface ICheckUpgradeResponse { - - /** CheckUpgradeResponse buildLogUri */ - buildLogUri?: (string|null); - - /** CheckUpgradeResponse containsPypiModulesConflict */ - containsPypiModulesConflict?: (google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult|keyof typeof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult|null); - - /** CheckUpgradeResponse pypiConflictBuildLogExtract */ - pypiConflictBuildLogExtract?: (string|null); - - /** CheckUpgradeResponse imageVersion */ - imageVersion?: (string|null); - - /** CheckUpgradeResponse pypiDependencies */ - pypiDependencies?: ({ [k: string]: string }|null); - } - - /** Represents a CheckUpgradeResponse. */ - class CheckUpgradeResponse implements ICheckUpgradeResponse { - - /** - * Constructs a new CheckUpgradeResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse); - - /** CheckUpgradeResponse buildLogUri. */ - public buildLogUri: string; - - /** CheckUpgradeResponse containsPypiModulesConflict. */ - public containsPypiModulesConflict: (google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult|keyof typeof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult); - - /** CheckUpgradeResponse pypiConflictBuildLogExtract. */ - public pypiConflictBuildLogExtract: string; - - /** CheckUpgradeResponse imageVersion. */ - public imageVersion: string; - - /** CheckUpgradeResponse pypiDependencies. */ - public pypiDependencies: { [k: string]: string }; - - /** - * Creates a new CheckUpgradeResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CheckUpgradeResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse): google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse; - - /** - * Encodes the specified CheckUpgradeResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.verify|verify} messages. - * @param message CheckUpgradeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CheckUpgradeResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.verify|verify} messages. - * @param message CheckUpgradeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CheckUpgradeResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CheckUpgradeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse; - - /** - * Decodes a CheckUpgradeResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CheckUpgradeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse; - - /** - * Verifies a CheckUpgradeResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CheckUpgradeResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CheckUpgradeResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse; - - /** - * Creates a plain object from a CheckUpgradeResponse message. Also converts values to other types if specified. - * @param message CheckUpgradeResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CheckUpgradeResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CheckUpgradeResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CheckUpgradeResponse { - - /** ConflictResult enum. */ - enum ConflictResult { - CONFLICT_RESULT_UNSPECIFIED = 0, - CONFLICT = 1, - NO_CONFLICT = 2 - } - } - - /** Properties of a DataRetentionConfig. */ - interface IDataRetentionConfig { - - /** DataRetentionConfig airflowMetadataRetentionConfig */ - airflowMetadataRetentionConfig?: (google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig|null); - - /** DataRetentionConfig taskLogsRetentionConfig */ - taskLogsRetentionConfig?: (google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig|null); - } - - /** Represents a DataRetentionConfig. */ - class DataRetentionConfig implements IDataRetentionConfig { - - /** - * Constructs a new DataRetentionConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig); - - /** DataRetentionConfig airflowMetadataRetentionConfig. */ - public airflowMetadataRetentionConfig?: (google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig|null); - - /** DataRetentionConfig taskLogsRetentionConfig. */ - public taskLogsRetentionConfig?: (google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig|null); - - /** - * Creates a new DataRetentionConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns DataRetentionConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig): google.cloud.orchestration.airflow.service.v1.DataRetentionConfig; - - /** - * Encodes the specified DataRetentionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.verify|verify} messages. - * @param message DataRetentionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataRetentionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.verify|verify} messages. - * @param message DataRetentionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataRetentionConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataRetentionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.DataRetentionConfig; - - /** - * Decodes a DataRetentionConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataRetentionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.DataRetentionConfig; - - /** - * Verifies a DataRetentionConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataRetentionConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataRetentionConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.DataRetentionConfig; - - /** - * Creates a plain object from a DataRetentionConfig message. Also converts values to other types if specified. - * @param message DataRetentionConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.DataRetentionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataRetentionConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataRetentionConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TaskLogsRetentionConfig. */ - interface ITaskLogsRetentionConfig { - - /** TaskLogsRetentionConfig storageMode */ - storageMode?: (google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode|keyof typeof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode|null); - } - - /** Represents a TaskLogsRetentionConfig. */ - class TaskLogsRetentionConfig implements ITaskLogsRetentionConfig { - - /** - * Constructs a new TaskLogsRetentionConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig); - - /** TaskLogsRetentionConfig storageMode. */ - public storageMode: (google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode|keyof typeof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode); - - /** - * Creates a new TaskLogsRetentionConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskLogsRetentionConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig): google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig; - - /** - * Encodes the specified TaskLogsRetentionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.verify|verify} messages. - * @param message TaskLogsRetentionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskLogsRetentionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.verify|verify} messages. - * @param message TaskLogsRetentionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskLogsRetentionConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskLogsRetentionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig; - - /** - * Decodes a TaskLogsRetentionConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskLogsRetentionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig; - - /** - * Verifies a TaskLogsRetentionConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TaskLogsRetentionConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskLogsRetentionConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig; - - /** - * Creates a plain object from a TaskLogsRetentionConfig message. Also converts values to other types if specified. - * @param message TaskLogsRetentionConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskLogsRetentionConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskLogsRetentionConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace TaskLogsRetentionConfig { - - /** TaskLogsStorageMode enum. */ - enum TaskLogsStorageMode { - TASK_LOGS_STORAGE_MODE_UNSPECIFIED = 0, - CLOUD_LOGGING_AND_CLOUD_STORAGE = 1, - CLOUD_LOGGING_ONLY = 2 - } - } - - /** Properties of an AirflowMetadataRetentionPolicyConfig. */ - interface IAirflowMetadataRetentionPolicyConfig { - - /** AirflowMetadataRetentionPolicyConfig retentionMode */ - retentionMode?: (google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode|keyof typeof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode|null); - - /** AirflowMetadataRetentionPolicyConfig retentionDays */ - retentionDays?: (number|null); - } - - /** Represents an AirflowMetadataRetentionPolicyConfig. */ - class AirflowMetadataRetentionPolicyConfig implements IAirflowMetadataRetentionPolicyConfig { - - /** - * Constructs a new AirflowMetadataRetentionPolicyConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig); - - /** AirflowMetadataRetentionPolicyConfig retentionMode. */ - public retentionMode: (google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode|keyof typeof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode); - - /** AirflowMetadataRetentionPolicyConfig retentionDays. */ - public retentionDays: number; - - /** - * Creates a new AirflowMetadataRetentionPolicyConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AirflowMetadataRetentionPolicyConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig): google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig; - - /** - * Encodes the specified AirflowMetadataRetentionPolicyConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.verify|verify} messages. - * @param message AirflowMetadataRetentionPolicyConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AirflowMetadataRetentionPolicyConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.verify|verify} messages. - * @param message AirflowMetadataRetentionPolicyConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AirflowMetadataRetentionPolicyConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AirflowMetadataRetentionPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig; - - /** - * Decodes an AirflowMetadataRetentionPolicyConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AirflowMetadataRetentionPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig; - - /** - * Verifies an AirflowMetadataRetentionPolicyConfig message. - * @param message Plain 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 AirflowMetadataRetentionPolicyConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AirflowMetadataRetentionPolicyConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig; - - /** - * Creates a plain object from an AirflowMetadataRetentionPolicyConfig message. Also converts values to other types if specified. - * @param message AirflowMetadataRetentionPolicyConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AirflowMetadataRetentionPolicyConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AirflowMetadataRetentionPolicyConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AirflowMetadataRetentionPolicyConfig { - - /** RetentionMode enum. */ - enum RetentionMode { - RETENTION_MODE_UNSPECIFIED = 0, - RETENTION_MODE_ENABLED = 1, - RETENTION_MODE_DISABLED = 2 - } - } - - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { - - /** OperationMetadata state */ - state?: (google.cloud.orchestration.airflow.service.v1.OperationMetadata.State|keyof typeof google.cloud.orchestration.airflow.service.v1.OperationMetadata.State|null); - - /** OperationMetadata operationType */ - operationType?: (google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type|keyof typeof google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type|null); - - /** OperationMetadata resource */ - resource?: (string|null); - - /** OperationMetadata resourceUuid */ - resourceUuid?: (string|null); - - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { - - /** - * Constructs a new OperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IOperationMetadata); - - /** OperationMetadata state. */ - public state: (google.cloud.orchestration.airflow.service.v1.OperationMetadata.State|keyof typeof google.cloud.orchestration.airflow.service.v1.OperationMetadata.State); - - /** OperationMetadata operationType. */ - public operationType: (google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type|keyof typeof google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type); - - /** OperationMetadata resource. */ - public resource: string; - - /** OperationMetadata resourceUuid. */ - public resourceUuid: string; - - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationMetadata instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IOperationMetadata): google.cloud.orchestration.airflow.service.v1.OperationMetadata; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.v1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.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.orchestration.airflow.service.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.orchestration.airflow.service.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.orchestration.airflow.service.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.orchestration.airflow.service.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; - } - - namespace OperationMetadata { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - PENDING = 1, - RUNNING = 2, - SUCCEEDED = 3, - SUCCESSFUL = 3, - FAILED = 4 - } - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - CREATE = 1, - DELETE = 2, - UPDATE = 3, - CHECK = 4, - SAVE_SNAPSHOT = 5, - LOAD_SNAPSHOT = 6, - DATABASE_FAILOVER = 7 - } - } - - /** Represents an ImageVersions */ - class ImageVersions extends $protobuf.rpc.Service { - - /** - * Constructs a new ImageVersions 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 ImageVersions 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): ImageVersions; - - /** - * Calls ListImageVersions. - * @param request ListImageVersionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListImageVersionsResponse - */ - public listImageVersions(request: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, callback: google.cloud.orchestration.airflow.service.v1.ImageVersions.ListImageVersionsCallback): void; - - /** - * Calls ListImageVersions. - * @param request ListImageVersionsRequest message or plain object - * @returns Promise - */ - public listImageVersions(request: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest): Promise; - } - - namespace ImageVersions { - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.ImageVersions|listImageVersions}. - * @param error Error, if any - * @param [response] ListImageVersionsResponse - */ - type ListImageVersionsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse) => void; - } - - /** Properties of a ListImageVersionsRequest. */ - interface IListImageVersionsRequest { - - /** ListImageVersionsRequest parent */ - parent?: (string|null); - - /** ListImageVersionsRequest pageSize */ - pageSize?: (number|null); - - /** ListImageVersionsRequest pageToken */ - pageToken?: (string|null); - - /** ListImageVersionsRequest includePastReleases */ - includePastReleases?: (boolean|null); - } - - /** Represents a ListImageVersionsRequest. */ - class ListImageVersionsRequest implements IListImageVersionsRequest { - - /** - * Constructs a new ListImageVersionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest); - - /** ListImageVersionsRequest parent. */ - public parent: string; - - /** ListImageVersionsRequest pageSize. */ - public pageSize: number; - - /** ListImageVersionsRequest pageToken. */ - public pageToken: string; - - /** ListImageVersionsRequest includePastReleases. */ - public includePastReleases: boolean; - - /** - * Creates a new ListImageVersionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListImageVersionsRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest): google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest; - - /** - * Encodes the specified ListImageVersionsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.verify|verify} messages. - * @param message ListImageVersionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListImageVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.verify|verify} messages. - * @param message ListImageVersionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListImageVersionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListImageVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest; - - /** - * Decodes a ListImageVersionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListImageVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest; - - /** - * Verifies a ListImageVersionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListImageVersionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListImageVersionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest; - - /** - * Creates a plain object from a ListImageVersionsRequest message. Also converts values to other types if specified. - * @param message ListImageVersionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListImageVersionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListImageVersionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListImageVersionsResponse. */ - interface IListImageVersionsResponse { - - /** ListImageVersionsResponse imageVersions */ - imageVersions?: (google.cloud.orchestration.airflow.service.v1.IImageVersion[]|null); - - /** ListImageVersionsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListImageVersionsResponse. */ - class ListImageVersionsResponse implements IListImageVersionsResponse { - - /** - * Constructs a new ListImageVersionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse); - - /** ListImageVersionsResponse imageVersions. */ - public imageVersions: google.cloud.orchestration.airflow.service.v1.IImageVersion[]; - - /** ListImageVersionsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListImageVersionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListImageVersionsResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse): google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse; - - /** - * Encodes the specified ListImageVersionsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.verify|verify} messages. - * @param message ListImageVersionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListImageVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.verify|verify} messages. - * @param message ListImageVersionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListImageVersionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListImageVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse; - - /** - * Decodes a ListImageVersionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListImageVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse; - - /** - * Verifies a ListImageVersionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListImageVersionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListImageVersionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse; - - /** - * Creates a plain object from a ListImageVersionsResponse message. Also converts values to other types if specified. - * @param message ListImageVersionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListImageVersionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListImageVersionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImageVersion. */ - interface IImageVersion { - - /** ImageVersion imageVersionId */ - imageVersionId?: (string|null); - - /** ImageVersion isDefault */ - isDefault?: (boolean|null); - - /** ImageVersion supportedPythonVersions */ - supportedPythonVersions?: (string[]|null); - - /** ImageVersion releaseDate */ - releaseDate?: (google.type.IDate|null); - - /** ImageVersion creationDisabled */ - creationDisabled?: (boolean|null); - - /** ImageVersion upgradeDisabled */ - upgradeDisabled?: (boolean|null); - } - - /** Represents an ImageVersion. */ - class ImageVersion implements IImageVersion { - - /** - * Constructs a new ImageVersion. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1.IImageVersion); - - /** ImageVersion imageVersionId. */ - public imageVersionId: string; - - /** ImageVersion isDefault. */ - public isDefault: boolean; - - /** ImageVersion supportedPythonVersions. */ - public supportedPythonVersions: string[]; - - /** ImageVersion releaseDate. */ - public releaseDate?: (google.type.IDate|null); - - /** ImageVersion creationDisabled. */ - public creationDisabled: boolean; - - /** ImageVersion upgradeDisabled. */ - public upgradeDisabled: boolean; - - /** - * Creates a new ImageVersion instance using the specified properties. - * @param [properties] Properties to set - * @returns ImageVersion instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1.IImageVersion): google.cloud.orchestration.airflow.service.v1.ImageVersion; - - /** - * Encodes the specified ImageVersion message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ImageVersion.verify|verify} messages. - * @param message ImageVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1.IImageVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImageVersion message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ImageVersion.verify|verify} messages. - * @param message ImageVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1.IImageVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImageVersion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImageVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1.ImageVersion; - - /** - * Decodes an ImageVersion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImageVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1.ImageVersion; - - /** - * Verifies an ImageVersion message. - * @param message Plain 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 ImageVersion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImageVersion - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1.ImageVersion; - - /** - * Creates a plain object from an ImageVersion message. Also converts values to other types if specified. - * @param message ImageVersion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1.ImageVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImageVersion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImageVersion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** 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 - } - - /** 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; - } - } - - /** 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); - } - - /** 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|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|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 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 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 an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|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|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; - } - - /** 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; - } - } - - /** 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; - } - } - - /** Namespace type. */ - namespace type { - - /** Properties of a Date. */ - interface IDate { - - /** Date year */ - year?: (number|null); - - /** Date month */ - month?: (number|null); - - /** Date day */ - day?: (number|null); - } - - /** Represents a Date. */ - class Date implements IDate { - - /** - * Constructs a new Date. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.IDate); - - /** Date year. */ - public year: number; - - /** Date month. */ - public month: number; - - /** Date day. */ - public day: number; - - /** - * Creates a new Date instance using the specified properties. - * @param [properties] Properties to set - * @returns Date instance - */ - public static create(properties?: google.type.IDate): google.type.Date; - - /** - * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @param message Date message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @param message Date message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Date message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; - - /** - * Decodes a Date message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; - - /** - * Verifies a Date message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Date message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Date - */ - public static fromObject(object: { [k: string]: any }): google.type.Date; - - /** - * Creates a plain object from a Date message. Also converts values to other types if specified. - * @param message Date - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Date to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Date - * @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-orchestration-airflow-service/v1/protos/protos.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.js deleted file mode 100644 index 510419b44a5..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.js +++ /dev/null @@ -1,42770 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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_orchestration_airflow_protos || ($protobuf.roots._google_cloud_orchestration_airflow_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.orchestration = (function() { - - /** - * Namespace orchestration. - * @memberof google.cloud - * @namespace - */ - var orchestration = {}; - - orchestration.airflow = (function() { - - /** - * Namespace airflow. - * @memberof google.cloud.orchestration - * @namespace - */ - var airflow = {}; - - airflow.service = (function() { - - /** - * Namespace service. - * @memberof google.cloud.orchestration.airflow - * @namespace - */ - var service = {}; - - service.v1 = (function() { - - /** - * Namespace v1. - * @memberof google.cloud.orchestration.airflow.service - * @namespace - */ - var v1 = {}; - - v1.Environments = (function() { - - /** - * Constructs a new Environments service. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents an Environments - * @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 Environments(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Environments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Environments; - - /** - * Creates new Environments service using the specified rpc implementation. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @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 {Environments} RPC service. Useful where requests and/or responses are streamed. - */ - Environments.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|createEnvironment}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef CreateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.createEnvironment = function createEnvironment(request, callback) { - return this.rpcCall(createEnvironment, $root.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateEnvironment" }); - - /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|getEnvironment}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef GetEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1.Environment} [response] Environment - */ - - /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.getEnvironment = function getEnvironment(request, callback) { - return this.rpcCall(getEnvironment, $root.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest, $root.google.cloud.orchestration.airflow.service.v1.Environment, request, callback); - }, "name", { value: "GetEnvironment" }); - - /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listEnvironments}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef ListEnvironmentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse - */ - - /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.listEnvironments = function listEnvironments(request, callback) { - return this.rpcCall(listEnvironments, $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest, $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse, request, callback); - }, "name", { value: "ListEnvironments" }); - - /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|updateEnvironment}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef UpdateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.updateEnvironment = function updateEnvironment(request, callback) { - return this.rpcCall(updateEnvironment, $root.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateEnvironment" }); - - /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|deleteEnvironment}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef DeleteEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { - return this.rpcCall(deleteEnvironment, $root.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteEnvironment" }); - - /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|executeAirflowCommand}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef ExecuteAirflowCommandCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse} [response] ExecuteAirflowCommandResponse - */ - - /** - * Calls ExecuteAirflowCommand. - * @function executeAirflowCommand - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest} request ExecuteAirflowCommandRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.ExecuteAirflowCommandCallback} callback Node-style callback called with the error, if any, and ExecuteAirflowCommandResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.executeAirflowCommand = function executeAirflowCommand(request, callback) { - return this.rpcCall(executeAirflowCommand, $root.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest, $root.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse, request, callback); - }, "name", { value: "ExecuteAirflowCommand" }); - - /** - * Calls ExecuteAirflowCommand. - * @function executeAirflowCommand - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest} request ExecuteAirflowCommandRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|stopAirflowCommand}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef StopAirflowCommandCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse} [response] StopAirflowCommandResponse - */ - - /** - * Calls StopAirflowCommand. - * @function stopAirflowCommand - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest} request StopAirflowCommandRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.StopAirflowCommandCallback} callback Node-style callback called with the error, if any, and StopAirflowCommandResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.stopAirflowCommand = function stopAirflowCommand(request, callback) { - return this.rpcCall(stopAirflowCommand, $root.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest, $root.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse, request, callback); - }, "name", { value: "StopAirflowCommand" }); - - /** - * Calls StopAirflowCommand. - * @function stopAirflowCommand - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest} request StopAirflowCommandRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|pollAirflowCommand}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef PollAirflowCommandCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse} [response] PollAirflowCommandResponse - */ - - /** - * Calls PollAirflowCommand. - * @function pollAirflowCommand - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest} request PollAirflowCommandRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.PollAirflowCommandCallback} callback Node-style callback called with the error, if any, and PollAirflowCommandResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.pollAirflowCommand = function pollAirflowCommand(request, callback) { - return this.rpcCall(pollAirflowCommand, $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest, $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse, request, callback); - }, "name", { value: "PollAirflowCommand" }); - - /** - * Calls PollAirflowCommand. - * @function pollAirflowCommand - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest} request PollAirflowCommandRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listWorkloads}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef ListWorkloadsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse} [response] ListWorkloadsResponse - */ - - /** - * Calls ListWorkloads. - * @function listWorkloads - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest} request ListWorkloadsRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.ListWorkloadsCallback} callback Node-style callback called with the error, if any, and ListWorkloadsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.listWorkloads = function listWorkloads(request, callback) { - return this.rpcCall(listWorkloads, $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest, $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse, request, callback); - }, "name", { value: "ListWorkloads" }); - - /** - * Calls ListWorkloads. - * @function listWorkloads - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest} request ListWorkloadsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|checkUpgrade}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef CheckUpgradeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CheckUpgrade. - * @function checkUpgrade - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest} request CheckUpgradeRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.CheckUpgradeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.checkUpgrade = function checkUpgrade(request, callback) { - return this.rpcCall(checkUpgrade, $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CheckUpgrade" }); - - /** - * Calls CheckUpgrade. - * @function checkUpgrade - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest} request CheckUpgradeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|createUserWorkloadsSecret}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef CreateUserWorkloadsSecretCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} [response] UserWorkloadsSecret - */ - - /** - * Calls CreateUserWorkloadsSecret. - * @function createUserWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest} request CreateUserWorkloadsSecretRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.CreateUserWorkloadsSecretCallback} callback Node-style callback called with the error, if any, and UserWorkloadsSecret - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.createUserWorkloadsSecret = function createUserWorkloadsSecret(request, callback) { - return this.rpcCall(createUserWorkloadsSecret, $root.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest, $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret, request, callback); - }, "name", { value: "CreateUserWorkloadsSecret" }); - - /** - * Calls CreateUserWorkloadsSecret. - * @function createUserWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest} request CreateUserWorkloadsSecretRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|getUserWorkloadsSecret}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef GetUserWorkloadsSecretCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} [response] UserWorkloadsSecret - */ - - /** - * Calls GetUserWorkloadsSecret. - * @function getUserWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest} request GetUserWorkloadsSecretRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.GetUserWorkloadsSecretCallback} callback Node-style callback called with the error, if any, and UserWorkloadsSecret - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.getUserWorkloadsSecret = function getUserWorkloadsSecret(request, callback) { - return this.rpcCall(getUserWorkloadsSecret, $root.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest, $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret, request, callback); - }, "name", { value: "GetUserWorkloadsSecret" }); - - /** - * Calls GetUserWorkloadsSecret. - * @function getUserWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest} request GetUserWorkloadsSecretRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listUserWorkloadsSecrets}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef ListUserWorkloadsSecretsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse} [response] ListUserWorkloadsSecretsResponse - */ - - /** - * Calls ListUserWorkloadsSecrets. - * @function listUserWorkloadsSecrets - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest} request ListUserWorkloadsSecretsRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.ListUserWorkloadsSecretsCallback} callback Node-style callback called with the error, if any, and ListUserWorkloadsSecretsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.listUserWorkloadsSecrets = function listUserWorkloadsSecrets(request, callback) { - return this.rpcCall(listUserWorkloadsSecrets, $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest, $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse, request, callback); - }, "name", { value: "ListUserWorkloadsSecrets" }); - - /** - * Calls ListUserWorkloadsSecrets. - * @function listUserWorkloadsSecrets - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest} request ListUserWorkloadsSecretsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|updateUserWorkloadsSecret}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef UpdateUserWorkloadsSecretCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} [response] UserWorkloadsSecret - */ - - /** - * Calls UpdateUserWorkloadsSecret. - * @function updateUserWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest} request UpdateUserWorkloadsSecretRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.UpdateUserWorkloadsSecretCallback} callback Node-style callback called with the error, if any, and UserWorkloadsSecret - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.updateUserWorkloadsSecret = function updateUserWorkloadsSecret(request, callback) { - return this.rpcCall(updateUserWorkloadsSecret, $root.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest, $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret, request, callback); - }, "name", { value: "UpdateUserWorkloadsSecret" }); - - /** - * Calls UpdateUserWorkloadsSecret. - * @function updateUserWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest} request UpdateUserWorkloadsSecretRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|deleteUserWorkloadsSecret}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef DeleteUserWorkloadsSecretCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteUserWorkloadsSecret. - * @function deleteUserWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest} request DeleteUserWorkloadsSecretRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.DeleteUserWorkloadsSecretCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.deleteUserWorkloadsSecret = function deleteUserWorkloadsSecret(request, callback) { - return this.rpcCall(deleteUserWorkloadsSecret, $root.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteUserWorkloadsSecret" }); - - /** - * Calls DeleteUserWorkloadsSecret. - * @function deleteUserWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest} request DeleteUserWorkloadsSecretRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|createUserWorkloadsConfigMap}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef CreateUserWorkloadsConfigMapCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} [response] UserWorkloadsConfigMap - */ - - /** - * Calls CreateUserWorkloadsConfigMap. - * @function createUserWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest} request CreateUserWorkloadsConfigMapRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.CreateUserWorkloadsConfigMapCallback} callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.createUserWorkloadsConfigMap = function createUserWorkloadsConfigMap(request, callback) { - return this.rpcCall(createUserWorkloadsConfigMap, $root.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest, $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap, request, callback); - }, "name", { value: "CreateUserWorkloadsConfigMap" }); - - /** - * Calls CreateUserWorkloadsConfigMap. - * @function createUserWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest} request CreateUserWorkloadsConfigMapRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|getUserWorkloadsConfigMap}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef GetUserWorkloadsConfigMapCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} [response] UserWorkloadsConfigMap - */ - - /** - * Calls GetUserWorkloadsConfigMap. - * @function getUserWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest} request GetUserWorkloadsConfigMapRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.GetUserWorkloadsConfigMapCallback} callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.getUserWorkloadsConfigMap = function getUserWorkloadsConfigMap(request, callback) { - return this.rpcCall(getUserWorkloadsConfigMap, $root.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest, $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap, request, callback); - }, "name", { value: "GetUserWorkloadsConfigMap" }); - - /** - * Calls GetUserWorkloadsConfigMap. - * @function getUserWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest} request GetUserWorkloadsConfigMapRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|listUserWorkloadsConfigMaps}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef ListUserWorkloadsConfigMapsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse} [response] ListUserWorkloadsConfigMapsResponse - */ - - /** - * Calls ListUserWorkloadsConfigMaps. - * @function listUserWorkloadsConfigMaps - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest} request ListUserWorkloadsConfigMapsRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.ListUserWorkloadsConfigMapsCallback} callback Node-style callback called with the error, if any, and ListUserWorkloadsConfigMapsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.listUserWorkloadsConfigMaps = function listUserWorkloadsConfigMaps(request, callback) { - return this.rpcCall(listUserWorkloadsConfigMaps, $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest, $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse, request, callback); - }, "name", { value: "ListUserWorkloadsConfigMaps" }); - - /** - * Calls ListUserWorkloadsConfigMaps. - * @function listUserWorkloadsConfigMaps - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest} request ListUserWorkloadsConfigMapsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|updateUserWorkloadsConfigMap}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef UpdateUserWorkloadsConfigMapCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} [response] UserWorkloadsConfigMap - */ - - /** - * Calls UpdateUserWorkloadsConfigMap. - * @function updateUserWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest} request UpdateUserWorkloadsConfigMapRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.UpdateUserWorkloadsConfigMapCallback} callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.updateUserWorkloadsConfigMap = function updateUserWorkloadsConfigMap(request, callback) { - return this.rpcCall(updateUserWorkloadsConfigMap, $root.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest, $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap, request, callback); - }, "name", { value: "UpdateUserWorkloadsConfigMap" }); - - /** - * Calls UpdateUserWorkloadsConfigMap. - * @function updateUserWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest} request UpdateUserWorkloadsConfigMapRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|deleteUserWorkloadsConfigMap}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef DeleteUserWorkloadsConfigMapCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteUserWorkloadsConfigMap. - * @function deleteUserWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest} request DeleteUserWorkloadsConfigMapRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.DeleteUserWorkloadsConfigMapCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.deleteUserWorkloadsConfigMap = function deleteUserWorkloadsConfigMap(request, callback) { - return this.rpcCall(deleteUserWorkloadsConfigMap, $root.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteUserWorkloadsConfigMap" }); - - /** - * Calls DeleteUserWorkloadsConfigMap. - * @function deleteUserWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest} request DeleteUserWorkloadsConfigMapRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|saveSnapshot}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef SaveSnapshotCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls SaveSnapshot. - * @function saveSnapshot - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest} request SaveSnapshotRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.SaveSnapshotCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.saveSnapshot = function saveSnapshot(request, callback) { - return this.rpcCall(saveSnapshot, $root.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "SaveSnapshot" }); - - /** - * Calls SaveSnapshot. - * @function saveSnapshot - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest} request SaveSnapshotRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|loadSnapshot}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef LoadSnapshotCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls LoadSnapshot. - * @function loadSnapshot - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest} request LoadSnapshotRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.LoadSnapshotCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.loadSnapshot = function loadSnapshot(request, callback) { - return this.rpcCall(loadSnapshot, $root.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "LoadSnapshot" }); - - /** - * Calls LoadSnapshot. - * @function loadSnapshot - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest} request LoadSnapshotRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|databaseFailover}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef DatabaseFailoverCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DatabaseFailover. - * @function databaseFailover - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest} request DatabaseFailoverRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.DatabaseFailoverCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.databaseFailover = function databaseFailover(request, callback) { - return this.rpcCall(databaseFailover, $root.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DatabaseFailover" }); - - /** - * Calls DatabaseFailover. - * @function databaseFailover - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest} request DatabaseFailoverRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.Environments|fetchDatabaseProperties}. - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @typedef FetchDatabasePropertiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse} [response] FetchDatabasePropertiesResponse - */ - - /** - * Calls FetchDatabaseProperties. - * @function fetchDatabaseProperties - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest} request FetchDatabasePropertiesRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.Environments.FetchDatabasePropertiesCallback} callback Node-style callback called with the error, if any, and FetchDatabasePropertiesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.fetchDatabaseProperties = function fetchDatabaseProperties(request, callback) { - return this.rpcCall(fetchDatabaseProperties, $root.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest, $root.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse, request, callback); - }, "name", { value: "FetchDatabaseProperties" }); - - /** - * Calls FetchDatabaseProperties. - * @function fetchDatabaseProperties - * @memberof google.cloud.orchestration.airflow.service.v1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest} request FetchDatabasePropertiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Environments; - })(); - - v1.CreateEnvironmentRequest = (function() { - - /** - * Properties of a CreateEnvironmentRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface ICreateEnvironmentRequest - * @property {string|null} [parent] CreateEnvironmentRequest parent - * @property {google.cloud.orchestration.airflow.service.v1.IEnvironment|null} [environment] CreateEnvironmentRequest environment - */ - - /** - * Constructs a new CreateEnvironmentRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a CreateEnvironmentRequest. - * @implements ICreateEnvironmentRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest=} [properties] Properties to set - */ - function CreateEnvironmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateEnvironmentRequest parent. - * @member {string} parent - * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest - * @instance - */ - CreateEnvironmentRequest.prototype.parent = ""; - - /** - * CreateEnvironmentRequest environment. - * @member {google.cloud.orchestration.airflow.service.v1.IEnvironment|null|undefined} environment - * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest - * @instance - */ - CreateEnvironmentRequest.prototype.environment = null; - - /** - * Creates a new CreateEnvironmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} CreateEnvironmentRequest instance - */ - CreateEnvironmentRequest.create = function create(properties) { - return new CreateEnvironmentRequest(properties); - }; - - /** - * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEnvironmentRequest.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.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.orchestration.airflow.service.v1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} CreateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEnvironmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} CreateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateEnvironmentRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateEnvironmentRequest.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.environment != null && message.hasOwnProperty("environment")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.Environment.verify(message.environment); - if (error) - return "environment." + error; - } - return null; - }; - - /** - * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} CreateEnvironmentRequest - */ - CreateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.fromObject(object.environment); - } - return message; - }; - - /** - * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest} message CreateEnvironmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateEnvironmentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.environment = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.toObject(message.environment, options); - return object; - }; - - /** - * Converts this CreateEnvironmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest - * @instance - * @returns {Object.} JSON object - */ - CreateEnvironmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateEnvironmentRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest"; - }; - - return CreateEnvironmentRequest; - })(); - - v1.GetEnvironmentRequest = (function() { - - /** - * Properties of a GetEnvironmentRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IGetEnvironmentRequest - * @property {string|null} [name] GetEnvironmentRequest name - */ - - /** - * Constructs a new GetEnvironmentRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a GetEnvironmentRequest. - * @implements IGetEnvironmentRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest=} [properties] Properties to set - */ - function GetEnvironmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetEnvironmentRequest name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest - * @instance - */ - GetEnvironmentRequest.prototype.name = ""; - - /** - * Creates a new GetEnvironmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} GetEnvironmentRequest instance - */ - GetEnvironmentRequest.create = function create(properties) { - return new GetEnvironmentRequest(properties); - }; - - /** - * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEnvironmentRequest.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 GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} GetEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEnvironmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} GetEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetEnvironmentRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetEnvironmentRequest.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 GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} GetEnvironmentRequest - */ - GetEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest} message GetEnvironmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetEnvironmentRequest.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 GetEnvironmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest - * @instance - * @returns {Object.} JSON object - */ - GetEnvironmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetEnvironmentRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest"; - }; - - return GetEnvironmentRequest; - })(); - - v1.ListEnvironmentsRequest = (function() { - - /** - * Properties of a ListEnvironmentsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IListEnvironmentsRequest - * @property {string|null} [parent] ListEnvironmentsRequest parent - * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize - * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken - */ - - /** - * Constructs a new ListEnvironmentsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a ListEnvironmentsRequest. - * @implements IListEnvironmentsRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest=} [properties] Properties to set - */ - function ListEnvironmentsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEnvironmentsRequest parent. - * @member {string} parent - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest - * @instance - */ - ListEnvironmentsRequest.prototype.parent = ""; - - /** - * ListEnvironmentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest - * @instance - */ - ListEnvironmentsRequest.prototype.pageSize = 0; - - /** - * ListEnvironmentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest - * @instance - */ - ListEnvironmentsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListEnvironmentsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} ListEnvironmentsRequest instance - */ - ListEnvironmentsRequest.create = function create(properties) { - return new ListEnvironmentsRequest(properties); - }; - - /** - * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEnvironmentsRequest.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); - return writer; - }; - - /** - * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} ListEnvironmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEnvironmentsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} ListEnvironmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEnvironmentsRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEnvironmentsRequest.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"; - return null; - }; - - /** - * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} ListEnvironmentsRequest - */ - ListEnvironmentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest} message ListEnvironmentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEnvironmentsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListEnvironmentsRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest - * @instance - * @returns {Object.} JSON object - */ - ListEnvironmentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEnvironmentsRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEnvironmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest"; - }; - - return ListEnvironmentsRequest; - })(); - - v1.ListEnvironmentsResponse = (function() { - - /** - * Properties of a ListEnvironmentsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IListEnvironmentsResponse - * @property {Array.|null} [environments] ListEnvironmentsResponse environments - * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken - */ - - /** - * Constructs a new ListEnvironmentsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a ListEnvironmentsResponse. - * @implements IListEnvironmentsResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse=} [properties] Properties to set - */ - function ListEnvironmentsResponse(properties) { - this.environments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEnvironmentsResponse environments. - * @member {Array.} environments - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse - * @instance - */ - ListEnvironmentsResponse.prototype.environments = $util.emptyArray; - - /** - * ListEnvironmentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse - * @instance - */ - ListEnvironmentsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListEnvironmentsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} ListEnvironmentsResponse instance - */ - ListEnvironmentsResponse.create = function create(properties) { - return new ListEnvironmentsResponse(properties); - }; - - /** - * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEnvironmentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environments != null && message.environments.length) - for (var i = 0; i < message.environments.length; ++i) - $root.google.cloud.orchestration.airflow.service.v1.Environment.encode(message.environments[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 ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} ListEnvironmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEnvironmentsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.environments && message.environments.length)) - message.environments = []; - message.environments.push($root.google.cloud.orchestration.airflow.service.v1.Environment.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} ListEnvironmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEnvironmentsResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEnvironmentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environments != null && message.hasOwnProperty("environments")) { - if (!Array.isArray(message.environments)) - return "environments: array expected"; - for (var i = 0; i < message.environments.length; ++i) { - var error = $root.google.cloud.orchestration.airflow.service.v1.Environment.verify(message.environments[i]); - if (error) - return "environments." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} ListEnvironmentsResponse - */ - ListEnvironmentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse(); - if (object.environments) { - if (!Array.isArray(object.environments)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.environments: array expected"); - message.environments = []; - for (var i = 0; i < object.environments.length; ++i) { - if (typeof object.environments[i] !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse.environments: object expected"); - message.environments[i] = $root.google.cloud.orchestration.airflow.service.v1.Environment.fromObject(object.environments[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse} message ListEnvironmentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEnvironmentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.environments = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.environments && message.environments.length) { - object.environments = []; - for (var j = 0; j < message.environments.length; ++j) - object.environments[j] = $root.google.cloud.orchestration.airflow.service.v1.Environment.toObject(message.environments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListEnvironmentsResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse - * @instance - * @returns {Object.} JSON object - */ - ListEnvironmentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEnvironmentsResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEnvironmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse"; - }; - - return ListEnvironmentsResponse; - })(); - - v1.DeleteEnvironmentRequest = (function() { - - /** - * Properties of a DeleteEnvironmentRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IDeleteEnvironmentRequest - * @property {string|null} [name] DeleteEnvironmentRequest name - */ - - /** - * Constructs a new DeleteEnvironmentRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a DeleteEnvironmentRequest. - * @implements IDeleteEnvironmentRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest=} [properties] Properties to set - */ - function DeleteEnvironmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteEnvironmentRequest name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest - * @instance - */ - DeleteEnvironmentRequest.prototype.name = ""; - - /** - * Creates a new DeleteEnvironmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance - */ - DeleteEnvironmentRequest.create = function create(properties) { - return new DeleteEnvironmentRequest(properties); - }; - - /** - * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEnvironmentRequest.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 DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEnvironmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteEnvironmentRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteEnvironmentRequest.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 DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} DeleteEnvironmentRequest - */ - DeleteEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteEnvironmentRequest.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 DeleteEnvironmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteEnvironmentRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest"; - }; - - return DeleteEnvironmentRequest; - })(); - - v1.UpdateEnvironmentRequest = (function() { - - /** - * Properties of an UpdateEnvironmentRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IUpdateEnvironmentRequest - * @property {string|null} [name] UpdateEnvironmentRequest name - * @property {google.cloud.orchestration.airflow.service.v1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask - */ - - /** - * Constructs a new UpdateEnvironmentRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents an UpdateEnvironmentRequest. - * @implements IUpdateEnvironmentRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest=} [properties] Properties to set - */ - function UpdateEnvironmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateEnvironmentRequest name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest - * @instance - */ - UpdateEnvironmentRequest.prototype.name = ""; - - /** - * UpdateEnvironmentRequest environment. - * @member {google.cloud.orchestration.airflow.service.v1.IEnvironment|null|undefined} environment - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest - * @instance - */ - UpdateEnvironmentRequest.prototype.environment = null; - - /** - * UpdateEnvironmentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest - * @instance - */ - UpdateEnvironmentRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateEnvironmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance - */ - UpdateEnvironmentRequest.create = function create(properties) { - return new UpdateEnvironmentRequest(properties); - }; - - /** - * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEnvironmentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.orchestration.airflow.service.v1.Environment.encode(message.environment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEnvironmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.name = reader.string(); - break; - } - case 1: { - message.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateEnvironmentRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateEnvironmentRequest.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.environment != null && message.hasOwnProperty("environment")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.Environment.verify(message.environment); - if (error) - return "environment." + 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 UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} UpdateEnvironmentRequest - */ - UpdateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.fromObject(object.environment); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateEnvironmentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.environment = null; - object.name = ""; - object.updateMask = null; - } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.cloud.orchestration.airflow.service.v1.Environment.toObject(message.environment, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateEnvironmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateEnvironmentRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest"; - }; - - return UpdateEnvironmentRequest; - })(); - - v1.ExecuteAirflowCommandRequest = (function() { - - /** - * Properties of an ExecuteAirflowCommandRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IExecuteAirflowCommandRequest - * @property {string|null} [environment] ExecuteAirflowCommandRequest environment - * @property {string|null} [command] ExecuteAirflowCommandRequest command - * @property {string|null} [subcommand] ExecuteAirflowCommandRequest subcommand - * @property {Array.|null} [parameters] ExecuteAirflowCommandRequest parameters - */ - - /** - * Constructs a new ExecuteAirflowCommandRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents an ExecuteAirflowCommandRequest. - * @implements IExecuteAirflowCommandRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest=} [properties] Properties to set - */ - function ExecuteAirflowCommandRequest(properties) { - this.parameters = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteAirflowCommandRequest environment. - * @member {string} environment - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest - * @instance - */ - ExecuteAirflowCommandRequest.prototype.environment = ""; - - /** - * ExecuteAirflowCommandRequest command. - * @member {string} command - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest - * @instance - */ - ExecuteAirflowCommandRequest.prototype.command = ""; - - /** - * ExecuteAirflowCommandRequest subcommand. - * @member {string} subcommand - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest - * @instance - */ - ExecuteAirflowCommandRequest.prototype.subcommand = ""; - - /** - * ExecuteAirflowCommandRequest parameters. - * @member {Array.} parameters - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest - * @instance - */ - ExecuteAirflowCommandRequest.prototype.parameters = $util.emptyArray; - - /** - * Creates a new ExecuteAirflowCommandRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest} ExecuteAirflowCommandRequest instance - */ - ExecuteAirflowCommandRequest.create = function create(properties) { - return new ExecuteAirflowCommandRequest(properties); - }; - - /** - * Encodes the specified ExecuteAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest} message ExecuteAirflowCommandRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteAirflowCommandRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - if (message.command != null && Object.hasOwnProperty.call(message, "command")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.command); - if (message.subcommand != null && Object.hasOwnProperty.call(message, "subcommand")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.subcommand); - if (message.parameters != null && message.parameters.length) - for (var i = 0; i < message.parameters.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.parameters[i]); - return writer; - }; - - /** - * Encodes the specified ExecuteAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest} message ExecuteAirflowCommandRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteAirflowCommandRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteAirflowCommandRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest} ExecuteAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteAirflowCommandRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - case 2: { - message.command = reader.string(); - break; - } - case 3: { - message.subcommand = reader.string(); - break; - } - case 4: { - if (!(message.parameters && message.parameters.length)) - message.parameters = []; - message.parameters.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteAirflowCommandRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest} ExecuteAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteAirflowCommandRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteAirflowCommandRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteAirflowCommandRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - if (message.command != null && message.hasOwnProperty("command")) - if (!$util.isString(message.command)) - return "command: string expected"; - if (message.subcommand != null && message.hasOwnProperty("subcommand")) - if (!$util.isString(message.subcommand)) - return "subcommand: string expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!Array.isArray(message.parameters)) - return "parameters: array expected"; - for (var i = 0; i < message.parameters.length; ++i) - if (!$util.isString(message.parameters[i])) - return "parameters: string[] expected"; - } - return null; - }; - - /** - * Creates an ExecuteAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest} ExecuteAirflowCommandRequest - */ - ExecuteAirflowCommandRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest(); - if (object.environment != null) - message.environment = String(object.environment); - if (object.command != null) - message.command = String(object.command); - if (object.subcommand != null) - message.subcommand = String(object.subcommand); - if (object.parameters) { - if (!Array.isArray(object.parameters)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest.parameters: array expected"); - message.parameters = []; - for (var i = 0; i < object.parameters.length; ++i) - message.parameters[i] = String(object.parameters[i]); - } - return message; - }; - - /** - * Creates a plain object from an ExecuteAirflowCommandRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest} message ExecuteAirflowCommandRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteAirflowCommandRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.parameters = []; - if (options.defaults) { - object.environment = ""; - object.command = ""; - object.subcommand = ""; - } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.command != null && message.hasOwnProperty("command")) - object.command = message.command; - if (message.subcommand != null && message.hasOwnProperty("subcommand")) - object.subcommand = message.subcommand; - if (message.parameters && message.parameters.length) { - object.parameters = []; - for (var j = 0; j < message.parameters.length; ++j) - object.parameters[j] = message.parameters[j]; - } - return object; - }; - - /** - * Converts this ExecuteAirflowCommandRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest - * @instance - * @returns {Object.} JSON object - */ - ExecuteAirflowCommandRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecuteAirflowCommandRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecuteAirflowCommandRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest"; - }; - - return ExecuteAirflowCommandRequest; - })(); - - v1.ExecuteAirflowCommandResponse = (function() { - - /** - * Properties of an ExecuteAirflowCommandResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IExecuteAirflowCommandResponse - * @property {string|null} [executionId] ExecuteAirflowCommandResponse executionId - * @property {string|null} [pod] ExecuteAirflowCommandResponse pod - * @property {string|null} [podNamespace] ExecuteAirflowCommandResponse podNamespace - * @property {string|null} [error] ExecuteAirflowCommandResponse error - */ - - /** - * Constructs a new ExecuteAirflowCommandResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents an ExecuteAirflowCommandResponse. - * @implements IExecuteAirflowCommandResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse=} [properties] Properties to set - */ - function ExecuteAirflowCommandResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteAirflowCommandResponse executionId. - * @member {string} executionId - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse - * @instance - */ - ExecuteAirflowCommandResponse.prototype.executionId = ""; - - /** - * ExecuteAirflowCommandResponse pod. - * @member {string} pod - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse - * @instance - */ - ExecuteAirflowCommandResponse.prototype.pod = ""; - - /** - * ExecuteAirflowCommandResponse podNamespace. - * @member {string} podNamespace - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse - * @instance - */ - ExecuteAirflowCommandResponse.prototype.podNamespace = ""; - - /** - * ExecuteAirflowCommandResponse error. - * @member {string} error - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse - * @instance - */ - ExecuteAirflowCommandResponse.prototype.error = ""; - - /** - * Creates a new ExecuteAirflowCommandResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse} ExecuteAirflowCommandResponse instance - */ - ExecuteAirflowCommandResponse.create = function create(properties) { - return new ExecuteAirflowCommandResponse(properties); - }; - - /** - * Encodes the specified ExecuteAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse} message ExecuteAirflowCommandResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteAirflowCommandResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.executionId != null && Object.hasOwnProperty.call(message, "executionId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.executionId); - if (message.pod != null && Object.hasOwnProperty.call(message, "pod")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pod); - if (message.podNamespace != null && Object.hasOwnProperty.call(message, "podNamespace")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.podNamespace); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.error); - return writer; - }; - - /** - * Encodes the specified ExecuteAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse} message ExecuteAirflowCommandResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteAirflowCommandResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteAirflowCommandResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse} ExecuteAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteAirflowCommandResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.executionId = reader.string(); - break; - } - case 2: { - message.pod = reader.string(); - break; - } - case 3: { - message.podNamespace = reader.string(); - break; - } - case 4: { - message.error = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteAirflowCommandResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse} ExecuteAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteAirflowCommandResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteAirflowCommandResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteAirflowCommandResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.executionId != null && message.hasOwnProperty("executionId")) - if (!$util.isString(message.executionId)) - return "executionId: string expected"; - if (message.pod != null && message.hasOwnProperty("pod")) - if (!$util.isString(message.pod)) - return "pod: string expected"; - if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) - if (!$util.isString(message.podNamespace)) - return "podNamespace: string expected"; - if (message.error != null && message.hasOwnProperty("error")) - if (!$util.isString(message.error)) - return "error: string expected"; - return null; - }; - - /** - * Creates an ExecuteAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse} ExecuteAirflowCommandResponse - */ - ExecuteAirflowCommandResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse(); - if (object.executionId != null) - message.executionId = String(object.executionId); - if (object.pod != null) - message.pod = String(object.pod); - if (object.podNamespace != null) - message.podNamespace = String(object.podNamespace); - if (object.error != null) - message.error = String(object.error); - return message; - }; - - /** - * Creates a plain object from an ExecuteAirflowCommandResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse} message ExecuteAirflowCommandResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteAirflowCommandResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.executionId = ""; - object.pod = ""; - object.podNamespace = ""; - object.error = ""; - } - if (message.executionId != null && message.hasOwnProperty("executionId")) - object.executionId = message.executionId; - if (message.pod != null && message.hasOwnProperty("pod")) - object.pod = message.pod; - if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) - object.podNamespace = message.podNamespace; - if (message.error != null && message.hasOwnProperty("error")) - object.error = message.error; - return object; - }; - - /** - * Converts this ExecuteAirflowCommandResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse - * @instance - * @returns {Object.} JSON object - */ - ExecuteAirflowCommandResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecuteAirflowCommandResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecuteAirflowCommandResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse"; - }; - - return ExecuteAirflowCommandResponse; - })(); - - v1.StopAirflowCommandRequest = (function() { - - /** - * Properties of a StopAirflowCommandRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IStopAirflowCommandRequest - * @property {string|null} [environment] StopAirflowCommandRequest environment - * @property {string|null} [executionId] StopAirflowCommandRequest executionId - * @property {string|null} [pod] StopAirflowCommandRequest pod - * @property {string|null} [podNamespace] StopAirflowCommandRequest podNamespace - * @property {boolean|null} [force] StopAirflowCommandRequest force - */ - - /** - * Constructs a new StopAirflowCommandRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a StopAirflowCommandRequest. - * @implements IStopAirflowCommandRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest=} [properties] Properties to set - */ - function StopAirflowCommandRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StopAirflowCommandRequest environment. - * @member {string} environment - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest - * @instance - */ - StopAirflowCommandRequest.prototype.environment = ""; - - /** - * StopAirflowCommandRequest executionId. - * @member {string} executionId - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest - * @instance - */ - StopAirflowCommandRequest.prototype.executionId = ""; - - /** - * StopAirflowCommandRequest pod. - * @member {string} pod - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest - * @instance - */ - StopAirflowCommandRequest.prototype.pod = ""; - - /** - * StopAirflowCommandRequest podNamespace. - * @member {string} podNamespace - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest - * @instance - */ - StopAirflowCommandRequest.prototype.podNamespace = ""; - - /** - * StopAirflowCommandRequest force. - * @member {boolean} force - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest - * @instance - */ - StopAirflowCommandRequest.prototype.force = false; - - /** - * Creates a new StopAirflowCommandRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest} StopAirflowCommandRequest instance - */ - StopAirflowCommandRequest.create = function create(properties) { - return new StopAirflowCommandRequest(properties); - }; - - /** - * Encodes the specified StopAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest} message StopAirflowCommandRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopAirflowCommandRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - if (message.executionId != null && Object.hasOwnProperty.call(message, "executionId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.executionId); - if (message.pod != null && Object.hasOwnProperty.call(message, "pod")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pod); - if (message.podNamespace != null && Object.hasOwnProperty.call(message, "podNamespace")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.podNamespace); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); - return writer; - }; - - /** - * Encodes the specified StopAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest} message StopAirflowCommandRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopAirflowCommandRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StopAirflowCommandRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest} StopAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopAirflowCommandRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - case 2: { - message.executionId = reader.string(); - break; - } - case 3: { - message.pod = reader.string(); - break; - } - case 4: { - message.podNamespace = reader.string(); - break; - } - case 5: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StopAirflowCommandRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest} StopAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopAirflowCommandRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StopAirflowCommandRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StopAirflowCommandRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - if (message.executionId != null && message.hasOwnProperty("executionId")) - if (!$util.isString(message.executionId)) - return "executionId: string expected"; - if (message.pod != null && message.hasOwnProperty("pod")) - if (!$util.isString(message.pod)) - return "pod: string expected"; - if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) - if (!$util.isString(message.podNamespace)) - return "podNamespace: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a StopAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest} StopAirflowCommandRequest - */ - StopAirflowCommandRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest(); - if (object.environment != null) - message.environment = String(object.environment); - if (object.executionId != null) - message.executionId = String(object.executionId); - if (object.pod != null) - message.pod = String(object.pod); - if (object.podNamespace != null) - message.podNamespace = String(object.podNamespace); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a StopAirflowCommandRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest} message StopAirflowCommandRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StopAirflowCommandRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.environment = ""; - object.executionId = ""; - object.pod = ""; - object.podNamespace = ""; - object.force = false; - } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.executionId != null && message.hasOwnProperty("executionId")) - object.executionId = message.executionId; - if (message.pod != null && message.hasOwnProperty("pod")) - object.pod = message.pod; - if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) - object.podNamespace = message.podNamespace; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this StopAirflowCommandRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest - * @instance - * @returns {Object.} JSON object - */ - StopAirflowCommandRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StopAirflowCommandRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StopAirflowCommandRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest"; - }; - - return StopAirflowCommandRequest; - })(); - - v1.StopAirflowCommandResponse = (function() { - - /** - * Properties of a StopAirflowCommandResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IStopAirflowCommandResponse - * @property {boolean|null} [isDone] StopAirflowCommandResponse isDone - * @property {Array.|null} [output] StopAirflowCommandResponse output - */ - - /** - * Constructs a new StopAirflowCommandResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a StopAirflowCommandResponse. - * @implements IStopAirflowCommandResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse=} [properties] Properties to set - */ - function StopAirflowCommandResponse(properties) { - this.output = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StopAirflowCommandResponse isDone. - * @member {boolean} isDone - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse - * @instance - */ - StopAirflowCommandResponse.prototype.isDone = false; - - /** - * StopAirflowCommandResponse output. - * @member {Array.} output - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse - * @instance - */ - StopAirflowCommandResponse.prototype.output = $util.emptyArray; - - /** - * Creates a new StopAirflowCommandResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse} StopAirflowCommandResponse instance - */ - StopAirflowCommandResponse.create = function create(properties) { - return new StopAirflowCommandResponse(properties); - }; - - /** - * Encodes the specified StopAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse} message StopAirflowCommandResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopAirflowCommandResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.isDone != null && Object.hasOwnProperty.call(message, "isDone")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isDone); - if (message.output != null && message.output.length) - for (var i = 0; i < message.output.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.output[i]); - return writer; - }; - - /** - * Encodes the specified StopAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse} message StopAirflowCommandResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopAirflowCommandResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StopAirflowCommandResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse} StopAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopAirflowCommandResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.isDone = reader.bool(); - break; - } - case 2: { - if (!(message.output && message.output.length)) - message.output = []; - message.output.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StopAirflowCommandResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse} StopAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopAirflowCommandResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StopAirflowCommandResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StopAirflowCommandResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.isDone != null && message.hasOwnProperty("isDone")) - if (typeof message.isDone !== "boolean") - return "isDone: boolean expected"; - if (message.output != null && message.hasOwnProperty("output")) { - if (!Array.isArray(message.output)) - return "output: array expected"; - for (var i = 0; i < message.output.length; ++i) - if (!$util.isString(message.output[i])) - return "output: string[] expected"; - } - return null; - }; - - /** - * Creates a StopAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse} StopAirflowCommandResponse - */ - StopAirflowCommandResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse(); - if (object.isDone != null) - message.isDone = Boolean(object.isDone); - if (object.output) { - if (!Array.isArray(object.output)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse.output: array expected"); - message.output = []; - for (var i = 0; i < object.output.length; ++i) - message.output[i] = String(object.output[i]); - } - return message; - }; - - /** - * Creates a plain object from a StopAirflowCommandResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse} message StopAirflowCommandResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StopAirflowCommandResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.output = []; - if (options.defaults) - object.isDone = false; - if (message.isDone != null && message.hasOwnProperty("isDone")) - object.isDone = message.isDone; - if (message.output && message.output.length) { - object.output = []; - for (var j = 0; j < message.output.length; ++j) - object.output[j] = message.output[j]; - } - return object; - }; - - /** - * Converts this StopAirflowCommandResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse - * @instance - * @returns {Object.} JSON object - */ - StopAirflowCommandResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StopAirflowCommandResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StopAirflowCommandResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse"; - }; - - return StopAirflowCommandResponse; - })(); - - v1.PollAirflowCommandRequest = (function() { - - /** - * Properties of a PollAirflowCommandRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IPollAirflowCommandRequest - * @property {string|null} [environment] PollAirflowCommandRequest environment - * @property {string|null} [executionId] PollAirflowCommandRequest executionId - * @property {string|null} [pod] PollAirflowCommandRequest pod - * @property {string|null} [podNamespace] PollAirflowCommandRequest podNamespace - * @property {number|null} [nextLineNumber] PollAirflowCommandRequest nextLineNumber - */ - - /** - * Constructs a new PollAirflowCommandRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a PollAirflowCommandRequest. - * @implements IPollAirflowCommandRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest=} [properties] Properties to set - */ - function PollAirflowCommandRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PollAirflowCommandRequest environment. - * @member {string} environment - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest - * @instance - */ - PollAirflowCommandRequest.prototype.environment = ""; - - /** - * PollAirflowCommandRequest executionId. - * @member {string} executionId - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest - * @instance - */ - PollAirflowCommandRequest.prototype.executionId = ""; - - /** - * PollAirflowCommandRequest pod. - * @member {string} pod - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest - * @instance - */ - PollAirflowCommandRequest.prototype.pod = ""; - - /** - * PollAirflowCommandRequest podNamespace. - * @member {string} podNamespace - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest - * @instance - */ - PollAirflowCommandRequest.prototype.podNamespace = ""; - - /** - * PollAirflowCommandRequest nextLineNumber. - * @member {number} nextLineNumber - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest - * @instance - */ - PollAirflowCommandRequest.prototype.nextLineNumber = 0; - - /** - * Creates a new PollAirflowCommandRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest} PollAirflowCommandRequest instance - */ - PollAirflowCommandRequest.create = function create(properties) { - return new PollAirflowCommandRequest(properties); - }; - - /** - * Encodes the specified PollAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest} message PollAirflowCommandRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollAirflowCommandRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - if (message.executionId != null && Object.hasOwnProperty.call(message, "executionId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.executionId); - if (message.pod != null && Object.hasOwnProperty.call(message, "pod")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pod); - if (message.podNamespace != null && Object.hasOwnProperty.call(message, "podNamespace")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.podNamespace); - if (message.nextLineNumber != null && Object.hasOwnProperty.call(message, "nextLineNumber")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.nextLineNumber); - return writer; - }; - - /** - * Encodes the specified PollAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest} message PollAirflowCommandRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollAirflowCommandRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PollAirflowCommandRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest} PollAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollAirflowCommandRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - case 2: { - message.executionId = reader.string(); - break; - } - case 3: { - message.pod = reader.string(); - break; - } - case 4: { - message.podNamespace = reader.string(); - break; - } - case 5: { - message.nextLineNumber = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PollAirflowCommandRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest} PollAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollAirflowCommandRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PollAirflowCommandRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PollAirflowCommandRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - if (message.executionId != null && message.hasOwnProperty("executionId")) - if (!$util.isString(message.executionId)) - return "executionId: string expected"; - if (message.pod != null && message.hasOwnProperty("pod")) - if (!$util.isString(message.pod)) - return "pod: string expected"; - if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) - if (!$util.isString(message.podNamespace)) - return "podNamespace: string expected"; - if (message.nextLineNumber != null && message.hasOwnProperty("nextLineNumber")) - if (!$util.isInteger(message.nextLineNumber)) - return "nextLineNumber: integer expected"; - return null; - }; - - /** - * Creates a PollAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest} PollAirflowCommandRequest - */ - PollAirflowCommandRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest(); - if (object.environment != null) - message.environment = String(object.environment); - if (object.executionId != null) - message.executionId = String(object.executionId); - if (object.pod != null) - message.pod = String(object.pod); - if (object.podNamespace != null) - message.podNamespace = String(object.podNamespace); - if (object.nextLineNumber != null) - message.nextLineNumber = object.nextLineNumber | 0; - return message; - }; - - /** - * Creates a plain object from a PollAirflowCommandRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest} message PollAirflowCommandRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PollAirflowCommandRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.environment = ""; - object.executionId = ""; - object.pod = ""; - object.podNamespace = ""; - object.nextLineNumber = 0; - } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.executionId != null && message.hasOwnProperty("executionId")) - object.executionId = message.executionId; - if (message.pod != null && message.hasOwnProperty("pod")) - object.pod = message.pod; - if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) - object.podNamespace = message.podNamespace; - if (message.nextLineNumber != null && message.hasOwnProperty("nextLineNumber")) - object.nextLineNumber = message.nextLineNumber; - return object; - }; - - /** - * Converts this PollAirflowCommandRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest - * @instance - * @returns {Object.} JSON object - */ - PollAirflowCommandRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PollAirflowCommandRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PollAirflowCommandRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest"; - }; - - return PollAirflowCommandRequest; - })(); - - v1.PollAirflowCommandResponse = (function() { - - /** - * Properties of a PollAirflowCommandResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IPollAirflowCommandResponse - * @property {Array.|null} [output] PollAirflowCommandResponse output - * @property {boolean|null} [outputEnd] PollAirflowCommandResponse outputEnd - * @property {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo|null} [exitInfo] PollAirflowCommandResponse exitInfo - */ - - /** - * Constructs a new PollAirflowCommandResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a PollAirflowCommandResponse. - * @implements IPollAirflowCommandResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse=} [properties] Properties to set - */ - function PollAirflowCommandResponse(properties) { - this.output = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PollAirflowCommandResponse output. - * @member {Array.} output - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @instance - */ - PollAirflowCommandResponse.prototype.output = $util.emptyArray; - - /** - * PollAirflowCommandResponse outputEnd. - * @member {boolean} outputEnd - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @instance - */ - PollAirflowCommandResponse.prototype.outputEnd = false; - - /** - * PollAirflowCommandResponse exitInfo. - * @member {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo|null|undefined} exitInfo - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @instance - */ - PollAirflowCommandResponse.prototype.exitInfo = null; - - /** - * Creates a new PollAirflowCommandResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse} PollAirflowCommandResponse instance - */ - PollAirflowCommandResponse.create = function create(properties) { - return new PollAirflowCommandResponse(properties); - }; - - /** - * Encodes the specified PollAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse} message PollAirflowCommandResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollAirflowCommandResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.output != null && message.output.length) - for (var i = 0; i < message.output.length; ++i) - $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.encode(message.output[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.outputEnd != null && Object.hasOwnProperty.call(message, "outputEnd")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.outputEnd); - if (message.exitInfo != null && Object.hasOwnProperty.call(message, "exitInfo")) - $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.encode(message.exitInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PollAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse} message PollAirflowCommandResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollAirflowCommandResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PollAirflowCommandResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse} PollAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollAirflowCommandResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.output && message.output.length)) - message.output = []; - message.output.push($root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.decode(reader, reader.uint32())); - break; - } - case 2: { - message.outputEnd = reader.bool(); - break; - } - case 3: { - message.exitInfo = $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PollAirflowCommandResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse} PollAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollAirflowCommandResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PollAirflowCommandResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PollAirflowCommandResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.output != null && message.hasOwnProperty("output")) { - if (!Array.isArray(message.output)) - return "output: array expected"; - for (var i = 0; i < message.output.length; ++i) { - var error = $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.verify(message.output[i]); - if (error) - return "output." + error; - } - } - if (message.outputEnd != null && message.hasOwnProperty("outputEnd")) - if (typeof message.outputEnd !== "boolean") - return "outputEnd: boolean expected"; - if (message.exitInfo != null && message.hasOwnProperty("exitInfo")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.verify(message.exitInfo); - if (error) - return "exitInfo." + error; - } - return null; - }; - - /** - * Creates a PollAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse} PollAirflowCommandResponse - */ - PollAirflowCommandResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse(); - if (object.output) { - if (!Array.isArray(object.output)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.output: array expected"); - message.output = []; - for (var i = 0; i < object.output.length; ++i) { - if (typeof object.output[i] !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.output: object expected"); - message.output[i] = $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.fromObject(object.output[i]); - } - } - if (object.outputEnd != null) - message.outputEnd = Boolean(object.outputEnd); - if (object.exitInfo != null) { - if (typeof object.exitInfo !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.exitInfo: object expected"); - message.exitInfo = $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.fromObject(object.exitInfo); - } - return message; - }; - - /** - * Creates a plain object from a PollAirflowCommandResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse} message PollAirflowCommandResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PollAirflowCommandResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.output = []; - if (options.defaults) { - object.outputEnd = false; - object.exitInfo = null; - } - if (message.output && message.output.length) { - object.output = []; - for (var j = 0; j < message.output.length; ++j) - object.output[j] = $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.toObject(message.output[j], options); - } - if (message.outputEnd != null && message.hasOwnProperty("outputEnd")) - object.outputEnd = message.outputEnd; - if (message.exitInfo != null && message.hasOwnProperty("exitInfo")) - object.exitInfo = $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.toObject(message.exitInfo, options); - return object; - }; - - /** - * Converts this PollAirflowCommandResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @instance - * @returns {Object.} JSON object - */ - PollAirflowCommandResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PollAirflowCommandResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PollAirflowCommandResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse"; - }; - - PollAirflowCommandResponse.Line = (function() { - - /** - * Properties of a Line. - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @interface ILine - * @property {number|null} [lineNumber] Line lineNumber - * @property {string|null} [content] Line content - */ - - /** - * Constructs a new Line. - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @classdesc Represents a Line. - * @implements ILine - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine=} [properties] Properties to set - */ - function Line(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Line lineNumber. - * @member {number} lineNumber - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line - * @instance - */ - Line.prototype.lineNumber = 0; - - /** - * Line content. - * @member {string} content - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line - * @instance - */ - Line.prototype.content = ""; - - /** - * Creates a new Line instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line - * @static - * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line} Line instance - */ - Line.create = function create(properties) { - return new Line(properties); - }; - - /** - * Encodes the specified Line message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line - * @static - * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine} message Line message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Line.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lineNumber != null && Object.hasOwnProperty.call(message, "lineNumber")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.lineNumber); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); - return writer; - }; - - /** - * Encodes the specified Line message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line - * @static - * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ILine} message Line message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Line.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Line message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line} Line - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Line.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.lineNumber = reader.int32(); - break; - } - case 2: { - message.content = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Line message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line} Line - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Line.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Line message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Line.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lineNumber != null && message.hasOwnProperty("lineNumber")) - if (!$util.isInteger(message.lineNumber)) - return "lineNumber: integer expected"; - if (message.content != null && message.hasOwnProperty("content")) - if (!$util.isString(message.content)) - return "content: string expected"; - return null; - }; - - /** - * Creates a Line message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line} Line - */ - Line.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line(); - if (object.lineNumber != null) - message.lineNumber = object.lineNumber | 0; - if (object.content != null) - message.content = String(object.content); - return message; - }; - - /** - * Creates a plain object from a Line message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line - * @static - * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line} message Line - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Line.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lineNumber = 0; - object.content = ""; - } - if (message.lineNumber != null && message.hasOwnProperty("lineNumber")) - object.lineNumber = message.lineNumber; - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; - return object; - }; - - /** - * Converts this Line to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line - * @instance - * @returns {Object.} JSON object - */ - Line.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Line - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Line.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.Line"; - }; - - return Line; - })(); - - PollAirflowCommandResponse.ExitInfo = (function() { - - /** - * Properties of an ExitInfo. - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @interface IExitInfo - * @property {number|null} [exitCode] ExitInfo exitCode - * @property {string|null} [error] ExitInfo error - */ - - /** - * Constructs a new ExitInfo. - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse - * @classdesc Represents an ExitInfo. - * @implements IExitInfo - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo=} [properties] Properties to set - */ - function ExitInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExitInfo exitCode. - * @member {number} exitCode - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo - * @instance - */ - ExitInfo.prototype.exitCode = 0; - - /** - * ExitInfo error. - * @member {string} error - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo - * @instance - */ - ExitInfo.prototype.error = ""; - - /** - * Creates a new ExitInfo instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo} ExitInfo instance - */ - ExitInfo.create = function create(properties) { - return new ExitInfo(properties); - }; - - /** - * Encodes the specified ExitInfo message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo} message ExitInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExitInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exitCode != null && Object.hasOwnProperty.call(message, "exitCode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.exitCode); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.error); - return writer; - }; - - /** - * Encodes the specified ExitInfo message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.IExitInfo} message ExitInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExitInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExitInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo} ExitInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExitInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.exitCode = reader.int32(); - break; - } - case 2: { - message.error = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExitInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo} ExitInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExitInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExitInfo message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExitInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.exitCode != null && message.hasOwnProperty("exitCode")) - if (!$util.isInteger(message.exitCode)) - return "exitCode: integer expected"; - if (message.error != null && message.hasOwnProperty("error")) - if (!$util.isString(message.error)) - return "error: string expected"; - return null; - }; - - /** - * Creates an ExitInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo} ExitInfo - */ - ExitInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo(); - if (object.exitCode != null) - message.exitCode = object.exitCode | 0; - if (object.error != null) - message.error = String(object.error); - return message; - }; - - /** - * Creates a plain object from an ExitInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo} message ExitInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExitInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.exitCode = 0; - object.error = ""; - } - if (message.exitCode != null && message.hasOwnProperty("exitCode")) - object.exitCode = message.exitCode; - if (message.error != null && message.hasOwnProperty("error")) - object.error = message.error; - return object; - }; - - /** - * Converts this ExitInfo to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo - * @instance - * @returns {Object.} JSON object - */ - ExitInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExitInfo - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExitInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse.ExitInfo"; - }; - - return ExitInfo; - })(); - - return PollAirflowCommandResponse; - })(); - - v1.CreateUserWorkloadsSecretRequest = (function() { - - /** - * Properties of a CreateUserWorkloadsSecretRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface ICreateUserWorkloadsSecretRequest - * @property {string|null} [parent] CreateUserWorkloadsSecretRequest parent - * @property {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null} [userWorkloadsSecret] CreateUserWorkloadsSecretRequest userWorkloadsSecret - */ - - /** - * Constructs a new CreateUserWorkloadsSecretRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a CreateUserWorkloadsSecretRequest. - * @implements ICreateUserWorkloadsSecretRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest=} [properties] Properties to set - */ - function CreateUserWorkloadsSecretRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateUserWorkloadsSecretRequest parent. - * @member {string} parent - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest - * @instance - */ - CreateUserWorkloadsSecretRequest.prototype.parent = ""; - - /** - * CreateUserWorkloadsSecretRequest userWorkloadsSecret. - * @member {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null|undefined} userWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest - * @instance - */ - CreateUserWorkloadsSecretRequest.prototype.userWorkloadsSecret = null; - - /** - * Creates a new CreateUserWorkloadsSecretRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest} CreateUserWorkloadsSecretRequest instance - */ - CreateUserWorkloadsSecretRequest.create = function create(properties) { - return new CreateUserWorkloadsSecretRequest(properties); - }; - - /** - * Encodes the specified CreateUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest} message CreateUserWorkloadsSecretRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateUserWorkloadsSecretRequest.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.userWorkloadsSecret != null && Object.hasOwnProperty.call(message, "userWorkloadsSecret")) - $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.encode(message.userWorkloadsSecret, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest} message CreateUserWorkloadsSecretRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateUserWorkloadsSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateUserWorkloadsSecretRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest} CreateUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateUserWorkloadsSecretRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest} CreateUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateUserWorkloadsSecretRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateUserWorkloadsSecretRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateUserWorkloadsSecretRequest.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.userWorkloadsSecret != null && message.hasOwnProperty("userWorkloadsSecret")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.verify(message.userWorkloadsSecret); - if (error) - return "userWorkloadsSecret." + error; - } - return null; - }; - - /** - * Creates a CreateUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest} CreateUserWorkloadsSecretRequest - */ - CreateUserWorkloadsSecretRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.userWorkloadsSecret != null) { - if (typeof object.userWorkloadsSecret !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest.userWorkloadsSecret: object expected"); - message.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.fromObject(object.userWorkloadsSecret); - } - return message; - }; - - /** - * Creates a plain object from a CreateUserWorkloadsSecretRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest} message CreateUserWorkloadsSecretRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateUserWorkloadsSecretRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.userWorkloadsSecret = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.userWorkloadsSecret != null && message.hasOwnProperty("userWorkloadsSecret")) - object.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.toObject(message.userWorkloadsSecret, options); - return object; - }; - - /** - * Converts this CreateUserWorkloadsSecretRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest - * @instance - * @returns {Object.} JSON object - */ - CreateUserWorkloadsSecretRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateUserWorkloadsSecretRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateUserWorkloadsSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest"; - }; - - return CreateUserWorkloadsSecretRequest; - })(); - - v1.GetUserWorkloadsSecretRequest = (function() { - - /** - * Properties of a GetUserWorkloadsSecretRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IGetUserWorkloadsSecretRequest - * @property {string|null} [name] GetUserWorkloadsSecretRequest name - */ - - /** - * Constructs a new GetUserWorkloadsSecretRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a GetUserWorkloadsSecretRequest. - * @implements IGetUserWorkloadsSecretRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest=} [properties] Properties to set - */ - function GetUserWorkloadsSecretRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetUserWorkloadsSecretRequest name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest - * @instance - */ - GetUserWorkloadsSecretRequest.prototype.name = ""; - - /** - * Creates a new GetUserWorkloadsSecretRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest} GetUserWorkloadsSecretRequest instance - */ - GetUserWorkloadsSecretRequest.create = function create(properties) { - return new GetUserWorkloadsSecretRequest(properties); - }; - - /** - * Encodes the specified GetUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest} message GetUserWorkloadsSecretRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetUserWorkloadsSecretRequest.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 GetUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest} message GetUserWorkloadsSecretRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetUserWorkloadsSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetUserWorkloadsSecretRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest} GetUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetUserWorkloadsSecretRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest} GetUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetUserWorkloadsSecretRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetUserWorkloadsSecretRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetUserWorkloadsSecretRequest.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 GetUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest} GetUserWorkloadsSecretRequest - */ - GetUserWorkloadsSecretRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetUserWorkloadsSecretRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest} message GetUserWorkloadsSecretRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetUserWorkloadsSecretRequest.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 GetUserWorkloadsSecretRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest - * @instance - * @returns {Object.} JSON object - */ - GetUserWorkloadsSecretRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetUserWorkloadsSecretRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetUserWorkloadsSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest"; - }; - - return GetUserWorkloadsSecretRequest; - })(); - - v1.ListUserWorkloadsSecretsRequest = (function() { - - /** - * Properties of a ListUserWorkloadsSecretsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IListUserWorkloadsSecretsRequest - * @property {string|null} [parent] ListUserWorkloadsSecretsRequest parent - * @property {number|null} [pageSize] ListUserWorkloadsSecretsRequest pageSize - * @property {string|null} [pageToken] ListUserWorkloadsSecretsRequest pageToken - */ - - /** - * Constructs a new ListUserWorkloadsSecretsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a ListUserWorkloadsSecretsRequest. - * @implements IListUserWorkloadsSecretsRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest=} [properties] Properties to set - */ - function ListUserWorkloadsSecretsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUserWorkloadsSecretsRequest parent. - * @member {string} parent - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest - * @instance - */ - ListUserWorkloadsSecretsRequest.prototype.parent = ""; - - /** - * ListUserWorkloadsSecretsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest - * @instance - */ - ListUserWorkloadsSecretsRequest.prototype.pageSize = 0; - - /** - * ListUserWorkloadsSecretsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest - * @instance - */ - ListUserWorkloadsSecretsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListUserWorkloadsSecretsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest} ListUserWorkloadsSecretsRequest instance - */ - ListUserWorkloadsSecretsRequest.create = function create(properties) { - return new ListUserWorkloadsSecretsRequest(properties); - }; - - /** - * Encodes the specified ListUserWorkloadsSecretsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest} message ListUserWorkloadsSecretsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserWorkloadsSecretsRequest.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); - return writer; - }; - - /** - * Encodes the specified ListUserWorkloadsSecretsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest} message ListUserWorkloadsSecretsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserWorkloadsSecretsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUserWorkloadsSecretsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest} ListUserWorkloadsSecretsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserWorkloadsSecretsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUserWorkloadsSecretsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest} ListUserWorkloadsSecretsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserWorkloadsSecretsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUserWorkloadsSecretsRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUserWorkloadsSecretsRequest.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"; - return null; - }; - - /** - * Creates a ListUserWorkloadsSecretsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest} ListUserWorkloadsSecretsRequest - */ - ListUserWorkloadsSecretsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListUserWorkloadsSecretsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest} message ListUserWorkloadsSecretsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUserWorkloadsSecretsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListUserWorkloadsSecretsRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest - * @instance - * @returns {Object.} JSON object - */ - ListUserWorkloadsSecretsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUserWorkloadsSecretsRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUserWorkloadsSecretsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest"; - }; - - return ListUserWorkloadsSecretsRequest; - })(); - - v1.UpdateUserWorkloadsSecretRequest = (function() { - - /** - * Properties of an UpdateUserWorkloadsSecretRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IUpdateUserWorkloadsSecretRequest - * @property {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null} [userWorkloadsSecret] UpdateUserWorkloadsSecretRequest userWorkloadsSecret - */ - - /** - * Constructs a new UpdateUserWorkloadsSecretRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents an UpdateUserWorkloadsSecretRequest. - * @implements IUpdateUserWorkloadsSecretRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest=} [properties] Properties to set - */ - function UpdateUserWorkloadsSecretRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateUserWorkloadsSecretRequest userWorkloadsSecret. - * @member {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null|undefined} userWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest - * @instance - */ - UpdateUserWorkloadsSecretRequest.prototype.userWorkloadsSecret = null; - - /** - * Creates a new UpdateUserWorkloadsSecretRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest} UpdateUserWorkloadsSecretRequest instance - */ - UpdateUserWorkloadsSecretRequest.create = function create(properties) { - return new UpdateUserWorkloadsSecretRequest(properties); - }; - - /** - * Encodes the specified UpdateUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest} message UpdateUserWorkloadsSecretRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateUserWorkloadsSecretRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userWorkloadsSecret != null && Object.hasOwnProperty.call(message, "userWorkloadsSecret")) - $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.encode(message.userWorkloadsSecret, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest} message UpdateUserWorkloadsSecretRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateUserWorkloadsSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateUserWorkloadsSecretRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest} UpdateUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateUserWorkloadsSecretRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest} UpdateUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateUserWorkloadsSecretRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateUserWorkloadsSecretRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateUserWorkloadsSecretRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userWorkloadsSecret != null && message.hasOwnProperty("userWorkloadsSecret")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.verify(message.userWorkloadsSecret); - if (error) - return "userWorkloadsSecret." + error; - } - return null; - }; - - /** - * Creates an UpdateUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest} UpdateUserWorkloadsSecretRequest - */ - UpdateUserWorkloadsSecretRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest(); - if (object.userWorkloadsSecret != null) { - if (typeof object.userWorkloadsSecret !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest.userWorkloadsSecret: object expected"); - message.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.fromObject(object.userWorkloadsSecret); - } - return message; - }; - - /** - * Creates a plain object from an UpdateUserWorkloadsSecretRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest} message UpdateUserWorkloadsSecretRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateUserWorkloadsSecretRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.userWorkloadsSecret = null; - if (message.userWorkloadsSecret != null && message.hasOwnProperty("userWorkloadsSecret")) - object.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.toObject(message.userWorkloadsSecret, options); - return object; - }; - - /** - * Converts this UpdateUserWorkloadsSecretRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateUserWorkloadsSecretRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateUserWorkloadsSecretRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateUserWorkloadsSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest"; - }; - - return UpdateUserWorkloadsSecretRequest; - })(); - - v1.DeleteUserWorkloadsSecretRequest = (function() { - - /** - * Properties of a DeleteUserWorkloadsSecretRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IDeleteUserWorkloadsSecretRequest - * @property {string|null} [name] DeleteUserWorkloadsSecretRequest name - */ - - /** - * Constructs a new DeleteUserWorkloadsSecretRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a DeleteUserWorkloadsSecretRequest. - * @implements IDeleteUserWorkloadsSecretRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest=} [properties] Properties to set - */ - function DeleteUserWorkloadsSecretRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteUserWorkloadsSecretRequest name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest - * @instance - */ - DeleteUserWorkloadsSecretRequest.prototype.name = ""; - - /** - * Creates a new DeleteUserWorkloadsSecretRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest} DeleteUserWorkloadsSecretRequest instance - */ - DeleteUserWorkloadsSecretRequest.create = function create(properties) { - return new DeleteUserWorkloadsSecretRequest(properties); - }; - - /** - * Encodes the specified DeleteUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest} message DeleteUserWorkloadsSecretRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteUserWorkloadsSecretRequest.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 DeleteUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest} message DeleteUserWorkloadsSecretRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteUserWorkloadsSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteUserWorkloadsSecretRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest} DeleteUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteUserWorkloadsSecretRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest} DeleteUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteUserWorkloadsSecretRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteUserWorkloadsSecretRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteUserWorkloadsSecretRequest.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 DeleteUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest} DeleteUserWorkloadsSecretRequest - */ - DeleteUserWorkloadsSecretRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteUserWorkloadsSecretRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest} message DeleteUserWorkloadsSecretRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteUserWorkloadsSecretRequest.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 DeleteUserWorkloadsSecretRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteUserWorkloadsSecretRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteUserWorkloadsSecretRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteUserWorkloadsSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest"; - }; - - return DeleteUserWorkloadsSecretRequest; - })(); - - v1.CreateUserWorkloadsConfigMapRequest = (function() { - - /** - * Properties of a CreateUserWorkloadsConfigMapRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface ICreateUserWorkloadsConfigMapRequest - * @property {string|null} [parent] CreateUserWorkloadsConfigMapRequest parent - * @property {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null} [userWorkloadsConfigMap] CreateUserWorkloadsConfigMapRequest userWorkloadsConfigMap - */ - - /** - * Constructs a new CreateUserWorkloadsConfigMapRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a CreateUserWorkloadsConfigMapRequest. - * @implements ICreateUserWorkloadsConfigMapRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest=} [properties] Properties to set - */ - function CreateUserWorkloadsConfigMapRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateUserWorkloadsConfigMapRequest parent. - * @member {string} parent - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest - * @instance - */ - CreateUserWorkloadsConfigMapRequest.prototype.parent = ""; - - /** - * CreateUserWorkloadsConfigMapRequest userWorkloadsConfigMap. - * @member {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null|undefined} userWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest - * @instance - */ - CreateUserWorkloadsConfigMapRequest.prototype.userWorkloadsConfigMap = null; - - /** - * Creates a new CreateUserWorkloadsConfigMapRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest} CreateUserWorkloadsConfigMapRequest instance - */ - CreateUserWorkloadsConfigMapRequest.create = function create(properties) { - return new CreateUserWorkloadsConfigMapRequest(properties); - }; - - /** - * Encodes the specified CreateUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest} message CreateUserWorkloadsConfigMapRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateUserWorkloadsConfigMapRequest.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.userWorkloadsConfigMap != null && Object.hasOwnProperty.call(message, "userWorkloadsConfigMap")) - $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.encode(message.userWorkloadsConfigMap, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest} message CreateUserWorkloadsConfigMapRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateUserWorkloadsConfigMapRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateUserWorkloadsConfigMapRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest} CreateUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateUserWorkloadsConfigMapRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest} CreateUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateUserWorkloadsConfigMapRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateUserWorkloadsConfigMapRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateUserWorkloadsConfigMapRequest.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.userWorkloadsConfigMap != null && message.hasOwnProperty("userWorkloadsConfigMap")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.verify(message.userWorkloadsConfigMap); - if (error) - return "userWorkloadsConfigMap." + error; - } - return null; - }; - - /** - * Creates a CreateUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest} CreateUserWorkloadsConfigMapRequest - */ - CreateUserWorkloadsConfigMapRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.userWorkloadsConfigMap != null) { - if (typeof object.userWorkloadsConfigMap !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest.userWorkloadsConfigMap: object expected"); - message.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.fromObject(object.userWorkloadsConfigMap); - } - return message; - }; - - /** - * Creates a plain object from a CreateUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest} message CreateUserWorkloadsConfigMapRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateUserWorkloadsConfigMapRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.userWorkloadsConfigMap = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.userWorkloadsConfigMap != null && message.hasOwnProperty("userWorkloadsConfigMap")) - object.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.toObject(message.userWorkloadsConfigMap, options); - return object; - }; - - /** - * Converts this CreateUserWorkloadsConfigMapRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest - * @instance - * @returns {Object.} JSON object - */ - CreateUserWorkloadsConfigMapRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateUserWorkloadsConfigMapRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateUserWorkloadsConfigMapRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest"; - }; - - return CreateUserWorkloadsConfigMapRequest; - })(); - - v1.GetUserWorkloadsConfigMapRequest = (function() { - - /** - * Properties of a GetUserWorkloadsConfigMapRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IGetUserWorkloadsConfigMapRequest - * @property {string|null} [name] GetUserWorkloadsConfigMapRequest name - */ - - /** - * Constructs a new GetUserWorkloadsConfigMapRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a GetUserWorkloadsConfigMapRequest. - * @implements IGetUserWorkloadsConfigMapRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest=} [properties] Properties to set - */ - function GetUserWorkloadsConfigMapRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetUserWorkloadsConfigMapRequest name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest - * @instance - */ - GetUserWorkloadsConfigMapRequest.prototype.name = ""; - - /** - * Creates a new GetUserWorkloadsConfigMapRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest} GetUserWorkloadsConfigMapRequest instance - */ - GetUserWorkloadsConfigMapRequest.create = function create(properties) { - return new GetUserWorkloadsConfigMapRequest(properties); - }; - - /** - * Encodes the specified GetUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest} message GetUserWorkloadsConfigMapRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetUserWorkloadsConfigMapRequest.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 GetUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest} message GetUserWorkloadsConfigMapRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetUserWorkloadsConfigMapRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetUserWorkloadsConfigMapRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest} GetUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetUserWorkloadsConfigMapRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest} GetUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetUserWorkloadsConfigMapRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetUserWorkloadsConfigMapRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetUserWorkloadsConfigMapRequest.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 GetUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest} GetUserWorkloadsConfigMapRequest - */ - GetUserWorkloadsConfigMapRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest} message GetUserWorkloadsConfigMapRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetUserWorkloadsConfigMapRequest.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 GetUserWorkloadsConfigMapRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest - * @instance - * @returns {Object.} JSON object - */ - GetUserWorkloadsConfigMapRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetUserWorkloadsConfigMapRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetUserWorkloadsConfigMapRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest"; - }; - - return GetUserWorkloadsConfigMapRequest; - })(); - - v1.ListUserWorkloadsConfigMapsRequest = (function() { - - /** - * Properties of a ListUserWorkloadsConfigMapsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IListUserWorkloadsConfigMapsRequest - * @property {string|null} [parent] ListUserWorkloadsConfigMapsRequest parent - * @property {number|null} [pageSize] ListUserWorkloadsConfigMapsRequest pageSize - * @property {string|null} [pageToken] ListUserWorkloadsConfigMapsRequest pageToken - */ - - /** - * Constructs a new ListUserWorkloadsConfigMapsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a ListUserWorkloadsConfigMapsRequest. - * @implements IListUserWorkloadsConfigMapsRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest=} [properties] Properties to set - */ - function ListUserWorkloadsConfigMapsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUserWorkloadsConfigMapsRequest parent. - * @member {string} parent - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest - * @instance - */ - ListUserWorkloadsConfigMapsRequest.prototype.parent = ""; - - /** - * ListUserWorkloadsConfigMapsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest - * @instance - */ - ListUserWorkloadsConfigMapsRequest.prototype.pageSize = 0; - - /** - * ListUserWorkloadsConfigMapsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest - * @instance - */ - ListUserWorkloadsConfigMapsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListUserWorkloadsConfigMapsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest} ListUserWorkloadsConfigMapsRequest instance - */ - ListUserWorkloadsConfigMapsRequest.create = function create(properties) { - return new ListUserWorkloadsConfigMapsRequest(properties); - }; - - /** - * Encodes the specified ListUserWorkloadsConfigMapsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest} message ListUserWorkloadsConfigMapsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserWorkloadsConfigMapsRequest.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); - return writer; - }; - - /** - * Encodes the specified ListUserWorkloadsConfigMapsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest} message ListUserWorkloadsConfigMapsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserWorkloadsConfigMapsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUserWorkloadsConfigMapsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest} ListUserWorkloadsConfigMapsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserWorkloadsConfigMapsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUserWorkloadsConfigMapsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest} ListUserWorkloadsConfigMapsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserWorkloadsConfigMapsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUserWorkloadsConfigMapsRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUserWorkloadsConfigMapsRequest.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"; - return null; - }; - - /** - * Creates a ListUserWorkloadsConfigMapsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest} ListUserWorkloadsConfigMapsRequest - */ - ListUserWorkloadsConfigMapsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListUserWorkloadsConfigMapsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest} message ListUserWorkloadsConfigMapsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUserWorkloadsConfigMapsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListUserWorkloadsConfigMapsRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest - * @instance - * @returns {Object.} JSON object - */ - ListUserWorkloadsConfigMapsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUserWorkloadsConfigMapsRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUserWorkloadsConfigMapsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest"; - }; - - return ListUserWorkloadsConfigMapsRequest; - })(); - - v1.UpdateUserWorkloadsConfigMapRequest = (function() { - - /** - * Properties of an UpdateUserWorkloadsConfigMapRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IUpdateUserWorkloadsConfigMapRequest - * @property {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null} [userWorkloadsConfigMap] UpdateUserWorkloadsConfigMapRequest userWorkloadsConfigMap - */ - - /** - * Constructs a new UpdateUserWorkloadsConfigMapRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents an UpdateUserWorkloadsConfigMapRequest. - * @implements IUpdateUserWorkloadsConfigMapRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest=} [properties] Properties to set - */ - function UpdateUserWorkloadsConfigMapRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateUserWorkloadsConfigMapRequest userWorkloadsConfigMap. - * @member {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null|undefined} userWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest - * @instance - */ - UpdateUserWorkloadsConfigMapRequest.prototype.userWorkloadsConfigMap = null; - - /** - * Creates a new UpdateUserWorkloadsConfigMapRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest} UpdateUserWorkloadsConfigMapRequest instance - */ - UpdateUserWorkloadsConfigMapRequest.create = function create(properties) { - return new UpdateUserWorkloadsConfigMapRequest(properties); - }; - - /** - * Encodes the specified UpdateUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest} message UpdateUserWorkloadsConfigMapRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateUserWorkloadsConfigMapRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userWorkloadsConfigMap != null && Object.hasOwnProperty.call(message, "userWorkloadsConfigMap")) - $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.encode(message.userWorkloadsConfigMap, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest} message UpdateUserWorkloadsConfigMapRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateUserWorkloadsConfigMapRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateUserWorkloadsConfigMapRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest} UpdateUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateUserWorkloadsConfigMapRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest} UpdateUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateUserWorkloadsConfigMapRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateUserWorkloadsConfigMapRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateUserWorkloadsConfigMapRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userWorkloadsConfigMap != null && message.hasOwnProperty("userWorkloadsConfigMap")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.verify(message.userWorkloadsConfigMap); - if (error) - return "userWorkloadsConfigMap." + error; - } - return null; - }; - - /** - * Creates an UpdateUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest} UpdateUserWorkloadsConfigMapRequest - */ - UpdateUserWorkloadsConfigMapRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest(); - if (object.userWorkloadsConfigMap != null) { - if (typeof object.userWorkloadsConfigMap !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest.userWorkloadsConfigMap: object expected"); - message.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.fromObject(object.userWorkloadsConfigMap); - } - return message; - }; - - /** - * Creates a plain object from an UpdateUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest} message UpdateUserWorkloadsConfigMapRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateUserWorkloadsConfigMapRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.userWorkloadsConfigMap = null; - if (message.userWorkloadsConfigMap != null && message.hasOwnProperty("userWorkloadsConfigMap")) - object.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.toObject(message.userWorkloadsConfigMap, options); - return object; - }; - - /** - * Converts this UpdateUserWorkloadsConfigMapRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateUserWorkloadsConfigMapRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateUserWorkloadsConfigMapRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateUserWorkloadsConfigMapRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest"; - }; - - return UpdateUserWorkloadsConfigMapRequest; - })(); - - v1.DeleteUserWorkloadsConfigMapRequest = (function() { - - /** - * Properties of a DeleteUserWorkloadsConfigMapRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IDeleteUserWorkloadsConfigMapRequest - * @property {string|null} [name] DeleteUserWorkloadsConfigMapRequest name - */ - - /** - * Constructs a new DeleteUserWorkloadsConfigMapRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a DeleteUserWorkloadsConfigMapRequest. - * @implements IDeleteUserWorkloadsConfigMapRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest=} [properties] Properties to set - */ - function DeleteUserWorkloadsConfigMapRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteUserWorkloadsConfigMapRequest name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest - * @instance - */ - DeleteUserWorkloadsConfigMapRequest.prototype.name = ""; - - /** - * Creates a new DeleteUserWorkloadsConfigMapRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest} DeleteUserWorkloadsConfigMapRequest instance - */ - DeleteUserWorkloadsConfigMapRequest.create = function create(properties) { - return new DeleteUserWorkloadsConfigMapRequest(properties); - }; - - /** - * Encodes the specified DeleteUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest} message DeleteUserWorkloadsConfigMapRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteUserWorkloadsConfigMapRequest.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 DeleteUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest} message DeleteUserWorkloadsConfigMapRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteUserWorkloadsConfigMapRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteUserWorkloadsConfigMapRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest} DeleteUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteUserWorkloadsConfigMapRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest} DeleteUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteUserWorkloadsConfigMapRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteUserWorkloadsConfigMapRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteUserWorkloadsConfigMapRequest.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 DeleteUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest} DeleteUserWorkloadsConfigMapRequest - */ - DeleteUserWorkloadsConfigMapRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest} message DeleteUserWorkloadsConfigMapRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteUserWorkloadsConfigMapRequest.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 DeleteUserWorkloadsConfigMapRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteUserWorkloadsConfigMapRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteUserWorkloadsConfigMapRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteUserWorkloadsConfigMapRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest"; - }; - - return DeleteUserWorkloadsConfigMapRequest; - })(); - - v1.UserWorkloadsSecret = (function() { - - /** - * Properties of a UserWorkloadsSecret. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IUserWorkloadsSecret - * @property {string|null} [name] UserWorkloadsSecret name - * @property {Object.|null} [data] UserWorkloadsSecret data - */ - - /** - * Constructs a new UserWorkloadsSecret. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a UserWorkloadsSecret. - * @implements IUserWorkloadsSecret - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret=} [properties] Properties to set - */ - function UserWorkloadsSecret(properties) { - this.data = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserWorkloadsSecret name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret - * @instance - */ - UserWorkloadsSecret.prototype.name = ""; - - /** - * UserWorkloadsSecret data. - * @member {Object.} data - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret - * @instance - */ - UserWorkloadsSecret.prototype.data = $util.emptyObject; - - /** - * Creates a new UserWorkloadsSecret instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} UserWorkloadsSecret instance - */ - UserWorkloadsSecret.create = function create(properties) { - return new UserWorkloadsSecret(properties); - }; - - /** - * Encodes the specified UserWorkloadsSecret message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret} message UserWorkloadsSecret message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserWorkloadsSecret.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.data != null && Object.hasOwnProperty.call(message, "data")) - for (var keys = Object.keys(message.data), 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.data[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified UserWorkloadsSecret message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret} message UserWorkloadsSecret message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserWorkloadsSecret.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserWorkloadsSecret message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} UserWorkloadsSecret - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserWorkloadsSecret.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (message.data === $util.emptyObject) - message.data = {}; - 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.data[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserWorkloadsSecret message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} UserWorkloadsSecret - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserWorkloadsSecret.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserWorkloadsSecret message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserWorkloadsSecret.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.data != null && message.hasOwnProperty("data")) { - if (!$util.isObject(message.data)) - return "data: object expected"; - var key = Object.keys(message.data); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.data[key[i]])) - return "data: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a UserWorkloadsSecret message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} UserWorkloadsSecret - */ - UserWorkloadsSecret.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret(); - if (object.name != null) - message.name = String(object.name); - if (object.data) { - if (typeof object.data !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.data: object expected"); - message.data = {}; - for (var keys = Object.keys(object.data), i = 0; i < keys.length; ++i) - message.data[keys[i]] = String(object.data[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a UserWorkloadsSecret message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret - * @static - * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} message UserWorkloadsSecret - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserWorkloadsSecret.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.data = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - var keys2; - if (message.data && (keys2 = Object.keys(message.data)).length) { - object.data = {}; - for (var j = 0; j < keys2.length; ++j) - object.data[keys2[j]] = message.data[keys2[j]]; - } - return object; - }; - - /** - * Converts this UserWorkloadsSecret to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret - * @instance - * @returns {Object.} JSON object - */ - UserWorkloadsSecret.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserWorkloadsSecret - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserWorkloadsSecret.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret"; - }; - - return UserWorkloadsSecret; - })(); - - v1.ListUserWorkloadsSecretsResponse = (function() { - - /** - * Properties of a ListUserWorkloadsSecretsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IListUserWorkloadsSecretsResponse - * @property {Array.|null} [userWorkloadsSecrets] ListUserWorkloadsSecretsResponse userWorkloadsSecrets - * @property {string|null} [nextPageToken] ListUserWorkloadsSecretsResponse nextPageToken - */ - - /** - * Constructs a new ListUserWorkloadsSecretsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a ListUserWorkloadsSecretsResponse. - * @implements IListUserWorkloadsSecretsResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse=} [properties] Properties to set - */ - function ListUserWorkloadsSecretsResponse(properties) { - this.userWorkloadsSecrets = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUserWorkloadsSecretsResponse userWorkloadsSecrets. - * @member {Array.} userWorkloadsSecrets - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse - * @instance - */ - ListUserWorkloadsSecretsResponse.prototype.userWorkloadsSecrets = $util.emptyArray; - - /** - * ListUserWorkloadsSecretsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse - * @instance - */ - ListUserWorkloadsSecretsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListUserWorkloadsSecretsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse} ListUserWorkloadsSecretsResponse instance - */ - ListUserWorkloadsSecretsResponse.create = function create(properties) { - return new ListUserWorkloadsSecretsResponse(properties); - }; - - /** - * Encodes the specified ListUserWorkloadsSecretsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse} message ListUserWorkloadsSecretsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserWorkloadsSecretsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userWorkloadsSecrets != null && message.userWorkloadsSecrets.length) - for (var i = 0; i < message.userWorkloadsSecrets.length; ++i) - $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.encode(message.userWorkloadsSecrets[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 ListUserWorkloadsSecretsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse} message ListUserWorkloadsSecretsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserWorkloadsSecretsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUserWorkloadsSecretsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse} ListUserWorkloadsSecretsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserWorkloadsSecretsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.userWorkloadsSecrets && message.userWorkloadsSecrets.length)) - message.userWorkloadsSecrets = []; - message.userWorkloadsSecrets.push($root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUserWorkloadsSecretsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse} ListUserWorkloadsSecretsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserWorkloadsSecretsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUserWorkloadsSecretsResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUserWorkloadsSecretsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userWorkloadsSecrets != null && message.hasOwnProperty("userWorkloadsSecrets")) { - if (!Array.isArray(message.userWorkloadsSecrets)) - return "userWorkloadsSecrets: array expected"; - for (var i = 0; i < message.userWorkloadsSecrets.length; ++i) { - var error = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.verify(message.userWorkloadsSecrets[i]); - if (error) - return "userWorkloadsSecrets." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListUserWorkloadsSecretsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse} ListUserWorkloadsSecretsResponse - */ - ListUserWorkloadsSecretsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse(); - if (object.userWorkloadsSecrets) { - if (!Array.isArray(object.userWorkloadsSecrets)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse.userWorkloadsSecrets: array expected"); - message.userWorkloadsSecrets = []; - for (var i = 0; i < object.userWorkloadsSecrets.length; ++i) { - if (typeof object.userWorkloadsSecrets[i] !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse.userWorkloadsSecrets: object expected"); - message.userWorkloadsSecrets[i] = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.fromObject(object.userWorkloadsSecrets[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListUserWorkloadsSecretsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse} message ListUserWorkloadsSecretsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUserWorkloadsSecretsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.userWorkloadsSecrets = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.userWorkloadsSecrets && message.userWorkloadsSecrets.length) { - object.userWorkloadsSecrets = []; - for (var j = 0; j < message.userWorkloadsSecrets.length; ++j) - object.userWorkloadsSecrets[j] = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret.toObject(message.userWorkloadsSecrets[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListUserWorkloadsSecretsResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse - * @instance - * @returns {Object.} JSON object - */ - ListUserWorkloadsSecretsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUserWorkloadsSecretsResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUserWorkloadsSecretsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse"; - }; - - return ListUserWorkloadsSecretsResponse; - })(); - - v1.UserWorkloadsConfigMap = (function() { - - /** - * Properties of a UserWorkloadsConfigMap. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IUserWorkloadsConfigMap - * @property {string|null} [name] UserWorkloadsConfigMap name - * @property {Object.|null} [data] UserWorkloadsConfigMap data - */ - - /** - * Constructs a new UserWorkloadsConfigMap. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a UserWorkloadsConfigMap. - * @implements IUserWorkloadsConfigMap - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap=} [properties] Properties to set - */ - function UserWorkloadsConfigMap(properties) { - this.data = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserWorkloadsConfigMap name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap - * @instance - */ - UserWorkloadsConfigMap.prototype.name = ""; - - /** - * UserWorkloadsConfigMap data. - * @member {Object.} data - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap - * @instance - */ - UserWorkloadsConfigMap.prototype.data = $util.emptyObject; - - /** - * Creates a new UserWorkloadsConfigMap instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} UserWorkloadsConfigMap instance - */ - UserWorkloadsConfigMap.create = function create(properties) { - return new UserWorkloadsConfigMap(properties); - }; - - /** - * Encodes the specified UserWorkloadsConfigMap message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap} message UserWorkloadsConfigMap message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserWorkloadsConfigMap.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.data != null && Object.hasOwnProperty.call(message, "data")) - for (var keys = Object.keys(message.data), 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.data[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified UserWorkloadsConfigMap message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap} message UserWorkloadsConfigMap message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserWorkloadsConfigMap.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserWorkloadsConfigMap message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} UserWorkloadsConfigMap - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserWorkloadsConfigMap.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (message.data === $util.emptyObject) - message.data = {}; - 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.data[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserWorkloadsConfigMap message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} UserWorkloadsConfigMap - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserWorkloadsConfigMap.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserWorkloadsConfigMap message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserWorkloadsConfigMap.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.data != null && message.hasOwnProperty("data")) { - if (!$util.isObject(message.data)) - return "data: object expected"; - var key = Object.keys(message.data); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.data[key[i]])) - return "data: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a UserWorkloadsConfigMap message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} UserWorkloadsConfigMap - */ - UserWorkloadsConfigMap.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap(); - if (object.name != null) - message.name = String(object.name); - if (object.data) { - if (typeof object.data !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.data: object expected"); - message.data = {}; - for (var keys = Object.keys(object.data), i = 0; i < keys.length; ++i) - message.data[keys[i]] = String(object.data[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a UserWorkloadsConfigMap message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap - * @static - * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} message UserWorkloadsConfigMap - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserWorkloadsConfigMap.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.data = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - var keys2; - if (message.data && (keys2 = Object.keys(message.data)).length) { - object.data = {}; - for (var j = 0; j < keys2.length; ++j) - object.data[keys2[j]] = message.data[keys2[j]]; - } - return object; - }; - - /** - * Converts this UserWorkloadsConfigMap to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap - * @instance - * @returns {Object.} JSON object - */ - UserWorkloadsConfigMap.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserWorkloadsConfigMap - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserWorkloadsConfigMap.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap"; - }; - - return UserWorkloadsConfigMap; - })(); - - v1.ListUserWorkloadsConfigMapsResponse = (function() { - - /** - * Properties of a ListUserWorkloadsConfigMapsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IListUserWorkloadsConfigMapsResponse - * @property {Array.|null} [userWorkloadsConfigMaps] ListUserWorkloadsConfigMapsResponse userWorkloadsConfigMaps - * @property {string|null} [nextPageToken] ListUserWorkloadsConfigMapsResponse nextPageToken - */ - - /** - * Constructs a new ListUserWorkloadsConfigMapsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a ListUserWorkloadsConfigMapsResponse. - * @implements IListUserWorkloadsConfigMapsResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse=} [properties] Properties to set - */ - function ListUserWorkloadsConfigMapsResponse(properties) { - this.userWorkloadsConfigMaps = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUserWorkloadsConfigMapsResponse userWorkloadsConfigMaps. - * @member {Array.} userWorkloadsConfigMaps - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse - * @instance - */ - ListUserWorkloadsConfigMapsResponse.prototype.userWorkloadsConfigMaps = $util.emptyArray; - - /** - * ListUserWorkloadsConfigMapsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse - * @instance - */ - ListUserWorkloadsConfigMapsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListUserWorkloadsConfigMapsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse} ListUserWorkloadsConfigMapsResponse instance - */ - ListUserWorkloadsConfigMapsResponse.create = function create(properties) { - return new ListUserWorkloadsConfigMapsResponse(properties); - }; - - /** - * Encodes the specified ListUserWorkloadsConfigMapsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse} message ListUserWorkloadsConfigMapsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserWorkloadsConfigMapsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userWorkloadsConfigMaps != null && message.userWorkloadsConfigMaps.length) - for (var i = 0; i < message.userWorkloadsConfigMaps.length; ++i) - $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.encode(message.userWorkloadsConfigMaps[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 ListUserWorkloadsConfigMapsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse} message ListUserWorkloadsConfigMapsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserWorkloadsConfigMapsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUserWorkloadsConfigMapsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse} ListUserWorkloadsConfigMapsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserWorkloadsConfigMapsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.userWorkloadsConfigMaps && message.userWorkloadsConfigMaps.length)) - message.userWorkloadsConfigMaps = []; - message.userWorkloadsConfigMaps.push($root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUserWorkloadsConfigMapsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse} ListUserWorkloadsConfigMapsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserWorkloadsConfigMapsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUserWorkloadsConfigMapsResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUserWorkloadsConfigMapsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userWorkloadsConfigMaps != null && message.hasOwnProperty("userWorkloadsConfigMaps")) { - if (!Array.isArray(message.userWorkloadsConfigMaps)) - return "userWorkloadsConfigMaps: array expected"; - for (var i = 0; i < message.userWorkloadsConfigMaps.length; ++i) { - var error = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.verify(message.userWorkloadsConfigMaps[i]); - if (error) - return "userWorkloadsConfigMaps." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListUserWorkloadsConfigMapsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse} ListUserWorkloadsConfigMapsResponse - */ - ListUserWorkloadsConfigMapsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse(); - if (object.userWorkloadsConfigMaps) { - if (!Array.isArray(object.userWorkloadsConfigMaps)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse.userWorkloadsConfigMaps: array expected"); - message.userWorkloadsConfigMaps = []; - for (var i = 0; i < object.userWorkloadsConfigMaps.length; ++i) { - if (typeof object.userWorkloadsConfigMaps[i] !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse.userWorkloadsConfigMaps: object expected"); - message.userWorkloadsConfigMaps[i] = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.fromObject(object.userWorkloadsConfigMaps[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListUserWorkloadsConfigMapsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse} message ListUserWorkloadsConfigMapsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUserWorkloadsConfigMapsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.userWorkloadsConfigMaps = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.userWorkloadsConfigMaps && message.userWorkloadsConfigMaps.length) { - object.userWorkloadsConfigMaps = []; - for (var j = 0; j < message.userWorkloadsConfigMaps.length; ++j) - object.userWorkloadsConfigMaps[j] = $root.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap.toObject(message.userWorkloadsConfigMaps[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListUserWorkloadsConfigMapsResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse - * @instance - * @returns {Object.} JSON object - */ - ListUserWorkloadsConfigMapsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUserWorkloadsConfigMapsResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUserWorkloadsConfigMapsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse"; - }; - - return ListUserWorkloadsConfigMapsResponse; - })(); - - v1.ListWorkloadsRequest = (function() { - - /** - * Properties of a ListWorkloadsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IListWorkloadsRequest - * @property {string|null} [parent] ListWorkloadsRequest parent - * @property {number|null} [pageSize] ListWorkloadsRequest pageSize - * @property {string|null} [pageToken] ListWorkloadsRequest pageToken - * @property {string|null} [filter] ListWorkloadsRequest filter - */ - - /** - * Constructs a new ListWorkloadsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a ListWorkloadsRequest. - * @implements IListWorkloadsRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest=} [properties] Properties to set - */ - function ListWorkloadsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListWorkloadsRequest parent. - * @member {string} parent - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest - * @instance - */ - ListWorkloadsRequest.prototype.parent = ""; - - /** - * ListWorkloadsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest - * @instance - */ - ListWorkloadsRequest.prototype.pageSize = 0; - - /** - * ListWorkloadsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest - * @instance - */ - ListWorkloadsRequest.prototype.pageToken = ""; - - /** - * ListWorkloadsRequest filter. - * @member {string} filter - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest - * @instance - */ - ListWorkloadsRequest.prototype.filter = ""; - - /** - * Creates a new ListWorkloadsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest} ListWorkloadsRequest instance - */ - ListWorkloadsRequest.create = function create(properties) { - return new ListWorkloadsRequest(properties); - }; - - /** - * Encodes the specified ListWorkloadsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest} message ListWorkloadsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListWorkloadsRequest.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); - return writer; - }; - - /** - * Encodes the specified ListWorkloadsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest} message ListWorkloadsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListWorkloadsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListWorkloadsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest} ListWorkloadsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListWorkloadsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListWorkloadsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest} ListWorkloadsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListWorkloadsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListWorkloadsRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListWorkloadsRequest.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"; - return null; - }; - - /** - * Creates a ListWorkloadsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest} ListWorkloadsRequest - */ - ListWorkloadsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a ListWorkloadsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest} message ListWorkloadsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListWorkloadsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this ListWorkloadsRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest - * @instance - * @returns {Object.} JSON object - */ - ListWorkloadsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListWorkloadsRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListWorkloadsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest"; - }; - - return ListWorkloadsRequest; - })(); - - v1.ListWorkloadsResponse = (function() { - - /** - * Properties of a ListWorkloadsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IListWorkloadsResponse - * @property {Array.|null} [workloads] ListWorkloadsResponse workloads - * @property {string|null} [nextPageToken] ListWorkloadsResponse nextPageToken - */ - - /** - * Constructs a new ListWorkloadsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a ListWorkloadsResponse. - * @implements IListWorkloadsResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse=} [properties] Properties to set - */ - function ListWorkloadsResponse(properties) { - this.workloads = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListWorkloadsResponse workloads. - * @member {Array.} workloads - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - * @instance - */ - ListWorkloadsResponse.prototype.workloads = $util.emptyArray; - - /** - * ListWorkloadsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - * @instance - */ - ListWorkloadsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListWorkloadsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse} ListWorkloadsResponse instance - */ - ListWorkloadsResponse.create = function create(properties) { - return new ListWorkloadsResponse(properties); - }; - - /** - * Encodes the specified ListWorkloadsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse} message ListWorkloadsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListWorkloadsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.workloads != null && message.workloads.length) - for (var i = 0; i < message.workloads.length; ++i) - $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.encode(message.workloads[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 ListWorkloadsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse} message ListWorkloadsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListWorkloadsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListWorkloadsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse} ListWorkloadsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListWorkloadsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.workloads && message.workloads.length)) - message.workloads = []; - message.workloads.push($root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListWorkloadsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse} ListWorkloadsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListWorkloadsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListWorkloadsResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListWorkloadsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.workloads != null && message.hasOwnProperty("workloads")) { - if (!Array.isArray(message.workloads)) - return "workloads: array expected"; - for (var i = 0; i < message.workloads.length; ++i) { - var error = $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.verify(message.workloads[i]); - if (error) - return "workloads." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListWorkloadsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse} ListWorkloadsResponse - */ - ListWorkloadsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse(); - if (object.workloads) { - if (!Array.isArray(object.workloads)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.workloads: array expected"); - message.workloads = []; - for (var i = 0; i < object.workloads.length; ++i) { - if (typeof object.workloads[i] !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.workloads: object expected"); - message.workloads[i] = $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.fromObject(object.workloads[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListWorkloadsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse} message ListWorkloadsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListWorkloadsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.workloads = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.workloads && message.workloads.length) { - object.workloads = []; - for (var j = 0; j < message.workloads.length; ++j) - object.workloads[j] = $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.toObject(message.workloads[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListWorkloadsResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - * @instance - * @returns {Object.} JSON object - */ - ListWorkloadsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListWorkloadsResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListWorkloadsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse"; - }; - - ListWorkloadsResponse.ComposerWorkload = (function() { - - /** - * Properties of a ComposerWorkload. - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - * @interface IComposerWorkload - * @property {string|null} [name] ComposerWorkload name - * @property {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType|null} [type] ComposerWorkload type - * @property {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus|null} [status] ComposerWorkload status - */ - - /** - * Constructs a new ComposerWorkload. - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - * @classdesc Represents a ComposerWorkload. - * @implements IComposerWorkload - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload=} [properties] Properties to set - */ - function ComposerWorkload(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComposerWorkload name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload - * @instance - */ - ComposerWorkload.prototype.name = ""; - - /** - * ComposerWorkload type. - * @member {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType} type - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload - * @instance - */ - ComposerWorkload.prototype.type = 0; - - /** - * ComposerWorkload status. - * @member {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus|null|undefined} status - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload - * @instance - */ - ComposerWorkload.prototype.status = null; - - /** - * Creates a new ComposerWorkload instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload} ComposerWorkload instance - */ - ComposerWorkload.create = function create(properties) { - return new ComposerWorkload(properties); - }; - - /** - * Encodes the specified ComposerWorkload message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload} message ComposerWorkload message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComposerWorkload.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.status != null && Object.hasOwnProperty.call(message, "status")) - $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.encode(message.status, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ComposerWorkload message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload} message ComposerWorkload message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComposerWorkload.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComposerWorkload message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload} ComposerWorkload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComposerWorkload.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - case 3: { - message.status = $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComposerWorkload message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload} ComposerWorkload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComposerWorkload.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComposerWorkload message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComposerWorkload.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: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.verify(message.status); - if (error) - return "status." + error; - } - return null; - }; - - /** - * Creates a ComposerWorkload message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload} ComposerWorkload - */ - ComposerWorkload.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload(); - 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 "COMPOSER_WORKLOAD_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "CELERY_WORKER": - case 1: - message.type = 1; - break; - case "KUBERNETES_WORKER": - case 2: - message.type = 2; - break; - case "KUBERNETES_OPERATOR_POD": - case 3: - message.type = 3; - break; - case "SCHEDULER": - case 4: - message.type = 4; - break; - case "DAG_PROCESSOR": - case 5: - message.type = 5; - break; - case "TRIGGERER": - case 6: - message.type = 6; - break; - case "WEB_SERVER": - case 7: - message.type = 7; - break; - case "REDIS": - case 8: - message.type = 8; - break; - } - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload.status: object expected"); - message.status = $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.fromObject(object.status); - } - return message; - }; - - /** - * Creates a plain object from a ComposerWorkload message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload} message ComposerWorkload - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComposerWorkload.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "COMPOSER_WORKLOAD_TYPE_UNSPECIFIED" : 0; - object.status = null; - } - 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.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType[message.type] === undefined ? message.type : $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType[message.type] : message.type; - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.toObject(message.status, options); - return object; - }; - - /** - * Converts this ComposerWorkload to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload - * @instance - * @returns {Object.} JSON object - */ - ComposerWorkload.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComposerWorkload - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComposerWorkload.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload"; - }; - - return ComposerWorkload; - })(); - - /** - * ComposerWorkloadType enum. - * @name google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadType - * @enum {number} - * @property {number} COMPOSER_WORKLOAD_TYPE_UNSPECIFIED=0 COMPOSER_WORKLOAD_TYPE_UNSPECIFIED value - * @property {number} CELERY_WORKER=1 CELERY_WORKER value - * @property {number} KUBERNETES_WORKER=2 KUBERNETES_WORKER value - * @property {number} KUBERNETES_OPERATOR_POD=3 KUBERNETES_OPERATOR_POD value - * @property {number} SCHEDULER=4 SCHEDULER value - * @property {number} DAG_PROCESSOR=5 DAG_PROCESSOR value - * @property {number} TRIGGERER=6 TRIGGERER value - * @property {number} WEB_SERVER=7 WEB_SERVER value - * @property {number} REDIS=8 REDIS value - */ - ListWorkloadsResponse.ComposerWorkloadType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPOSER_WORKLOAD_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CELERY_WORKER"] = 1; - values[valuesById[2] = "KUBERNETES_WORKER"] = 2; - values[valuesById[3] = "KUBERNETES_OPERATOR_POD"] = 3; - values[valuesById[4] = "SCHEDULER"] = 4; - values[valuesById[5] = "DAG_PROCESSOR"] = 5; - values[valuesById[6] = "TRIGGERER"] = 6; - values[valuesById[7] = "WEB_SERVER"] = 7; - values[valuesById[8] = "REDIS"] = 8; - return values; - })(); - - ListWorkloadsResponse.ComposerWorkloadStatus = (function() { - - /** - * Properties of a ComposerWorkloadStatus. - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - * @interface IComposerWorkloadStatus - * @property {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState|null} [state] ComposerWorkloadStatus state - * @property {string|null} [statusMessage] ComposerWorkloadStatus statusMessage - * @property {string|null} [detailedStatusMessage] ComposerWorkloadStatus detailedStatusMessage - */ - - /** - * Constructs a new ComposerWorkloadStatus. - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse - * @classdesc Represents a ComposerWorkloadStatus. - * @implements IComposerWorkloadStatus - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus=} [properties] Properties to set - */ - function ComposerWorkloadStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComposerWorkloadStatus state. - * @member {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState} state - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus - * @instance - */ - ComposerWorkloadStatus.prototype.state = 0; - - /** - * ComposerWorkloadStatus statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus - * @instance - */ - ComposerWorkloadStatus.prototype.statusMessage = ""; - - /** - * ComposerWorkloadStatus detailedStatusMessage. - * @member {string} detailedStatusMessage - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus - * @instance - */ - ComposerWorkloadStatus.prototype.detailedStatusMessage = ""; - - /** - * Creates a new ComposerWorkloadStatus instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus} ComposerWorkloadStatus instance - */ - ComposerWorkloadStatus.create = function create(properties) { - return new ComposerWorkloadStatus(properties); - }; - - /** - * Encodes the specified ComposerWorkloadStatus message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus} message ComposerWorkloadStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComposerWorkloadStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.statusMessage); - if (message.detailedStatusMessage != null && Object.hasOwnProperty.call(message, "detailedStatusMessage")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.detailedStatusMessage); - return writer; - }; - - /** - * Encodes the specified ComposerWorkloadStatus message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkloadStatus} message ComposerWorkloadStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComposerWorkloadStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComposerWorkloadStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus} ComposerWorkloadStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComposerWorkloadStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.statusMessage = reader.string(); - break; - } - case 3: { - message.detailedStatusMessage = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComposerWorkloadStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus} ComposerWorkloadStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComposerWorkloadStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComposerWorkloadStatus message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComposerWorkloadStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.detailedStatusMessage != null && message.hasOwnProperty("detailedStatusMessage")) - if (!$util.isString(message.detailedStatusMessage)) - return "detailedStatusMessage: string expected"; - return null; - }; - - /** - * Creates a ComposerWorkloadStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus} ComposerWorkloadStatus - */ - ComposerWorkloadStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus(); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "COMPOSER_WORKLOAD_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "PENDING": - case 1: - message.state = 1; - break; - case "OK": - case 2: - message.state = 2; - break; - case "WARNING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - case "SUCCEEDED": - case 5: - message.state = 5; - break; - case "FAILED": - case 6: - message.state = 6; - break; - } - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.detailedStatusMessage != null) - message.detailedStatusMessage = String(object.detailedStatusMessage); - return message; - }; - - /** - * Creates a plain object from a ComposerWorkloadStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus} message ComposerWorkloadStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComposerWorkloadStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "COMPOSER_WORKLOAD_STATE_UNSPECIFIED" : 0; - object.statusMessage = ""; - object.detailedStatusMessage = ""; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState[message.state] === undefined ? message.state : $root.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState[message.state] : message.state; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.detailedStatusMessage != null && message.hasOwnProperty("detailedStatusMessage")) - object.detailedStatusMessage = message.detailedStatusMessage; - return object; - }; - - /** - * Converts this ComposerWorkloadStatus to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus - * @instance - * @returns {Object.} JSON object - */ - ComposerWorkloadStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComposerWorkloadStatus - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComposerWorkloadStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadStatus"; - }; - - return ComposerWorkloadStatus; - })(); - - /** - * ComposerWorkloadState enum. - * @name google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkloadState - * @enum {number} - * @property {number} COMPOSER_WORKLOAD_STATE_UNSPECIFIED=0 COMPOSER_WORKLOAD_STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} OK=2 OK value - * @property {number} WARNING=3 WARNING value - * @property {number} ERROR=4 ERROR value - * @property {number} SUCCEEDED=5 SUCCEEDED value - * @property {number} FAILED=6 FAILED value - */ - ListWorkloadsResponse.ComposerWorkloadState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPOSER_WORKLOAD_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "OK"] = 2; - values[valuesById[3] = "WARNING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - values[valuesById[5] = "SUCCEEDED"] = 5; - values[valuesById[6] = "FAILED"] = 6; - return values; - })(); - - return ListWorkloadsResponse; - })(); - - v1.SaveSnapshotRequest = (function() { - - /** - * Properties of a SaveSnapshotRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface ISaveSnapshotRequest - * @property {string|null} [environment] SaveSnapshotRequest environment - * @property {string|null} [snapshotLocation] SaveSnapshotRequest snapshotLocation - */ - - /** - * Constructs a new SaveSnapshotRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a SaveSnapshotRequest. - * @implements ISaveSnapshotRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest=} [properties] Properties to set - */ - function SaveSnapshotRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SaveSnapshotRequest environment. - * @member {string} environment - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest - * @instance - */ - SaveSnapshotRequest.prototype.environment = ""; - - /** - * SaveSnapshotRequest snapshotLocation. - * @member {string} snapshotLocation - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest - * @instance - */ - SaveSnapshotRequest.prototype.snapshotLocation = ""; - - /** - * Creates a new SaveSnapshotRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest} SaveSnapshotRequest instance - */ - SaveSnapshotRequest.create = function create(properties) { - return new SaveSnapshotRequest(properties); - }; - - /** - * Encodes the specified SaveSnapshotRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest} message SaveSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SaveSnapshotRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - if (message.snapshotLocation != null && Object.hasOwnProperty.call(message, "snapshotLocation")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.snapshotLocation); - return writer; - }; - - /** - * Encodes the specified SaveSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest} message SaveSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SaveSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SaveSnapshotRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest} SaveSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SaveSnapshotRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - case 2: { - message.snapshotLocation = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SaveSnapshotRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest} SaveSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SaveSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SaveSnapshotRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SaveSnapshotRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - if (message.snapshotLocation != null && message.hasOwnProperty("snapshotLocation")) - if (!$util.isString(message.snapshotLocation)) - return "snapshotLocation: string expected"; - return null; - }; - - /** - * Creates a SaveSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest} SaveSnapshotRequest - */ - SaveSnapshotRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest(); - if (object.environment != null) - message.environment = String(object.environment); - if (object.snapshotLocation != null) - message.snapshotLocation = String(object.snapshotLocation); - return message; - }; - - /** - * Creates a plain object from a SaveSnapshotRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest} message SaveSnapshotRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SaveSnapshotRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.environment = ""; - object.snapshotLocation = ""; - } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.snapshotLocation != null && message.hasOwnProperty("snapshotLocation")) - object.snapshotLocation = message.snapshotLocation; - return object; - }; - - /** - * Converts this SaveSnapshotRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest - * @instance - * @returns {Object.} JSON object - */ - SaveSnapshotRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SaveSnapshotRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SaveSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest"; - }; - - return SaveSnapshotRequest; - })(); - - v1.SaveSnapshotResponse = (function() { - - /** - * Properties of a SaveSnapshotResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface ISaveSnapshotResponse - * @property {string|null} [snapshotPath] SaveSnapshotResponse snapshotPath - */ - - /** - * Constructs a new SaveSnapshotResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a SaveSnapshotResponse. - * @implements ISaveSnapshotResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse=} [properties] Properties to set - */ - function SaveSnapshotResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SaveSnapshotResponse snapshotPath. - * @member {string} snapshotPath - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse - * @instance - */ - SaveSnapshotResponse.prototype.snapshotPath = ""; - - /** - * Creates a new SaveSnapshotResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse} SaveSnapshotResponse instance - */ - SaveSnapshotResponse.create = function create(properties) { - return new SaveSnapshotResponse(properties); - }; - - /** - * Encodes the specified SaveSnapshotResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse} message SaveSnapshotResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SaveSnapshotResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.snapshotPath != null && Object.hasOwnProperty.call(message, "snapshotPath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.snapshotPath); - return writer; - }; - - /** - * Encodes the specified SaveSnapshotResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ISaveSnapshotResponse} message SaveSnapshotResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SaveSnapshotResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SaveSnapshotResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse} SaveSnapshotResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SaveSnapshotResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.snapshotPath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SaveSnapshotResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse} SaveSnapshotResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SaveSnapshotResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SaveSnapshotResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SaveSnapshotResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.snapshotPath != null && message.hasOwnProperty("snapshotPath")) - if (!$util.isString(message.snapshotPath)) - return "snapshotPath: string expected"; - return null; - }; - - /** - * Creates a SaveSnapshotResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse} SaveSnapshotResponse - */ - SaveSnapshotResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse(); - if (object.snapshotPath != null) - message.snapshotPath = String(object.snapshotPath); - return message; - }; - - /** - * Creates a plain object from a SaveSnapshotResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse} message SaveSnapshotResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SaveSnapshotResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.snapshotPath = ""; - if (message.snapshotPath != null && message.hasOwnProperty("snapshotPath")) - object.snapshotPath = message.snapshotPath; - return object; - }; - - /** - * Converts this SaveSnapshotResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse - * @instance - * @returns {Object.} JSON object - */ - SaveSnapshotResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SaveSnapshotResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SaveSnapshotResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse"; - }; - - return SaveSnapshotResponse; - })(); - - v1.LoadSnapshotRequest = (function() { - - /** - * Properties of a LoadSnapshotRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface ILoadSnapshotRequest - * @property {string|null} [environment] LoadSnapshotRequest environment - * @property {string|null} [snapshotPath] LoadSnapshotRequest snapshotPath - * @property {boolean|null} [skipPypiPackagesInstallation] LoadSnapshotRequest skipPypiPackagesInstallation - * @property {boolean|null} [skipEnvironmentVariablesSetting] LoadSnapshotRequest skipEnvironmentVariablesSetting - * @property {boolean|null} [skipAirflowOverridesSetting] LoadSnapshotRequest skipAirflowOverridesSetting - * @property {boolean|null} [skipGcsDataCopying] LoadSnapshotRequest skipGcsDataCopying - */ - - /** - * Constructs a new LoadSnapshotRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a LoadSnapshotRequest. - * @implements ILoadSnapshotRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest=} [properties] Properties to set - */ - function LoadSnapshotRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoadSnapshotRequest environment. - * @member {string} environment - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - * @instance - */ - LoadSnapshotRequest.prototype.environment = ""; - - /** - * LoadSnapshotRequest snapshotPath. - * @member {string} snapshotPath - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - * @instance - */ - LoadSnapshotRequest.prototype.snapshotPath = ""; - - /** - * LoadSnapshotRequest skipPypiPackagesInstallation. - * @member {boolean} skipPypiPackagesInstallation - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - * @instance - */ - LoadSnapshotRequest.prototype.skipPypiPackagesInstallation = false; - - /** - * LoadSnapshotRequest skipEnvironmentVariablesSetting. - * @member {boolean} skipEnvironmentVariablesSetting - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - * @instance - */ - LoadSnapshotRequest.prototype.skipEnvironmentVariablesSetting = false; - - /** - * LoadSnapshotRequest skipAirflowOverridesSetting. - * @member {boolean} skipAirflowOverridesSetting - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - * @instance - */ - LoadSnapshotRequest.prototype.skipAirflowOverridesSetting = false; - - /** - * LoadSnapshotRequest skipGcsDataCopying. - * @member {boolean} skipGcsDataCopying - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - * @instance - */ - LoadSnapshotRequest.prototype.skipGcsDataCopying = false; - - /** - * Creates a new LoadSnapshotRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest} LoadSnapshotRequest instance - */ - LoadSnapshotRequest.create = function create(properties) { - return new LoadSnapshotRequest(properties); - }; - - /** - * Encodes the specified LoadSnapshotRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest} message LoadSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadSnapshotRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - if (message.snapshotPath != null && Object.hasOwnProperty.call(message, "snapshotPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.snapshotPath); - if (message.skipPypiPackagesInstallation != null && Object.hasOwnProperty.call(message, "skipPypiPackagesInstallation")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.skipPypiPackagesInstallation); - if (message.skipEnvironmentVariablesSetting != null && Object.hasOwnProperty.call(message, "skipEnvironmentVariablesSetting")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.skipEnvironmentVariablesSetting); - if (message.skipAirflowOverridesSetting != null && Object.hasOwnProperty.call(message, "skipAirflowOverridesSetting")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.skipAirflowOverridesSetting); - if (message.skipGcsDataCopying != null && Object.hasOwnProperty.call(message, "skipGcsDataCopying")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.skipGcsDataCopying); - return writer; - }; - - /** - * Encodes the specified LoadSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest} message LoadSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadSnapshotRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest} LoadSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadSnapshotRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - case 2: { - message.snapshotPath = reader.string(); - break; - } - case 3: { - message.skipPypiPackagesInstallation = reader.bool(); - break; - } - case 4: { - message.skipEnvironmentVariablesSetting = reader.bool(); - break; - } - case 5: { - message.skipAirflowOverridesSetting = reader.bool(); - break; - } - case 6: { - message.skipGcsDataCopying = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadSnapshotRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest} LoadSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadSnapshotRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadSnapshotRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - if (message.snapshotPath != null && message.hasOwnProperty("snapshotPath")) - if (!$util.isString(message.snapshotPath)) - return "snapshotPath: string expected"; - if (message.skipPypiPackagesInstallation != null && message.hasOwnProperty("skipPypiPackagesInstallation")) - if (typeof message.skipPypiPackagesInstallation !== "boolean") - return "skipPypiPackagesInstallation: boolean expected"; - if (message.skipEnvironmentVariablesSetting != null && message.hasOwnProperty("skipEnvironmentVariablesSetting")) - if (typeof message.skipEnvironmentVariablesSetting !== "boolean") - return "skipEnvironmentVariablesSetting: boolean expected"; - if (message.skipAirflowOverridesSetting != null && message.hasOwnProperty("skipAirflowOverridesSetting")) - if (typeof message.skipAirflowOverridesSetting !== "boolean") - return "skipAirflowOverridesSetting: boolean expected"; - if (message.skipGcsDataCopying != null && message.hasOwnProperty("skipGcsDataCopying")) - if (typeof message.skipGcsDataCopying !== "boolean") - return "skipGcsDataCopying: boolean expected"; - return null; - }; - - /** - * Creates a LoadSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest} LoadSnapshotRequest - */ - LoadSnapshotRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest(); - if (object.environment != null) - message.environment = String(object.environment); - if (object.snapshotPath != null) - message.snapshotPath = String(object.snapshotPath); - if (object.skipPypiPackagesInstallation != null) - message.skipPypiPackagesInstallation = Boolean(object.skipPypiPackagesInstallation); - if (object.skipEnvironmentVariablesSetting != null) - message.skipEnvironmentVariablesSetting = Boolean(object.skipEnvironmentVariablesSetting); - if (object.skipAirflowOverridesSetting != null) - message.skipAirflowOverridesSetting = Boolean(object.skipAirflowOverridesSetting); - if (object.skipGcsDataCopying != null) - message.skipGcsDataCopying = Boolean(object.skipGcsDataCopying); - return message; - }; - - /** - * Creates a plain object from a LoadSnapshotRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest} message LoadSnapshotRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadSnapshotRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.environment = ""; - object.snapshotPath = ""; - object.skipPypiPackagesInstallation = false; - object.skipEnvironmentVariablesSetting = false; - object.skipAirflowOverridesSetting = false; - object.skipGcsDataCopying = false; - } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.snapshotPath != null && message.hasOwnProperty("snapshotPath")) - object.snapshotPath = message.snapshotPath; - if (message.skipPypiPackagesInstallation != null && message.hasOwnProperty("skipPypiPackagesInstallation")) - object.skipPypiPackagesInstallation = message.skipPypiPackagesInstallation; - if (message.skipEnvironmentVariablesSetting != null && message.hasOwnProperty("skipEnvironmentVariablesSetting")) - object.skipEnvironmentVariablesSetting = message.skipEnvironmentVariablesSetting; - if (message.skipAirflowOverridesSetting != null && message.hasOwnProperty("skipAirflowOverridesSetting")) - object.skipAirflowOverridesSetting = message.skipAirflowOverridesSetting; - if (message.skipGcsDataCopying != null && message.hasOwnProperty("skipGcsDataCopying")) - object.skipGcsDataCopying = message.skipGcsDataCopying; - return object; - }; - - /** - * Converts this LoadSnapshotRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - * @instance - * @returns {Object.} JSON object - */ - LoadSnapshotRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoadSnapshotRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoadSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest"; - }; - - return LoadSnapshotRequest; - })(); - - v1.LoadSnapshotResponse = (function() { - - /** - * Properties of a LoadSnapshotResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface ILoadSnapshotResponse - */ - - /** - * Constructs a new LoadSnapshotResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a LoadSnapshotResponse. - * @implements ILoadSnapshotResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse=} [properties] Properties to set - */ - function LoadSnapshotResponse(properties) { - if (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 LoadSnapshotResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse} LoadSnapshotResponse instance - */ - LoadSnapshotResponse.create = function create(properties) { - return new LoadSnapshotResponse(properties); - }; - - /** - * Encodes the specified LoadSnapshotResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse} message LoadSnapshotResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadSnapshotResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified LoadSnapshotResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ILoadSnapshotResponse} message LoadSnapshotResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadSnapshotResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadSnapshotResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse} LoadSnapshotResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadSnapshotResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadSnapshotResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse} LoadSnapshotResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadSnapshotResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadSnapshotResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadSnapshotResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a LoadSnapshotResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse} LoadSnapshotResponse - */ - LoadSnapshotResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse) - return object; - return new $root.google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse(); - }; - - /** - * Creates a plain object from a LoadSnapshotResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse} message LoadSnapshotResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadSnapshotResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this LoadSnapshotResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse - * @instance - * @returns {Object.} JSON object - */ - LoadSnapshotResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoadSnapshotResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoadSnapshotResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse"; - }; - - return LoadSnapshotResponse; - })(); - - v1.DatabaseFailoverRequest = (function() { - - /** - * Properties of a DatabaseFailoverRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IDatabaseFailoverRequest - * @property {string|null} [environment] DatabaseFailoverRequest environment - */ - - /** - * Constructs a new DatabaseFailoverRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a DatabaseFailoverRequest. - * @implements IDatabaseFailoverRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest=} [properties] Properties to set - */ - function DatabaseFailoverRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DatabaseFailoverRequest environment. - * @member {string} environment - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest - * @instance - */ - DatabaseFailoverRequest.prototype.environment = ""; - - /** - * Creates a new DatabaseFailoverRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest} DatabaseFailoverRequest instance - */ - DatabaseFailoverRequest.create = function create(properties) { - return new DatabaseFailoverRequest(properties); - }; - - /** - * Encodes the specified DatabaseFailoverRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest} message DatabaseFailoverRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseFailoverRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - return writer; - }; - - /** - * Encodes the specified DatabaseFailoverRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest} message DatabaseFailoverRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseFailoverRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DatabaseFailoverRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest} DatabaseFailoverRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseFailoverRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DatabaseFailoverRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest} DatabaseFailoverRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseFailoverRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DatabaseFailoverRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DatabaseFailoverRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - return null; - }; - - /** - * Creates a DatabaseFailoverRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest} DatabaseFailoverRequest - */ - DatabaseFailoverRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest(); - if (object.environment != null) - message.environment = String(object.environment); - return message; - }; - - /** - * Creates a plain object from a DatabaseFailoverRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest} message DatabaseFailoverRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DatabaseFailoverRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.environment = ""; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - return object; - }; - - /** - * Converts this DatabaseFailoverRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest - * @instance - * @returns {Object.} JSON object - */ - DatabaseFailoverRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DatabaseFailoverRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DatabaseFailoverRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest"; - }; - - return DatabaseFailoverRequest; - })(); - - v1.DatabaseFailoverResponse = (function() { - - /** - * Properties of a DatabaseFailoverResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IDatabaseFailoverResponse - */ - - /** - * Constructs a new DatabaseFailoverResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a DatabaseFailoverResponse. - * @implements IDatabaseFailoverResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse=} [properties] Properties to set - */ - function DatabaseFailoverResponse(properties) { - if (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 DatabaseFailoverResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse} DatabaseFailoverResponse instance - */ - DatabaseFailoverResponse.create = function create(properties) { - return new DatabaseFailoverResponse(properties); - }; - - /** - * Encodes the specified DatabaseFailoverResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse} message DatabaseFailoverResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseFailoverResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified DatabaseFailoverResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverResponse} message DatabaseFailoverResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseFailoverResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DatabaseFailoverResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse} DatabaseFailoverResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseFailoverResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DatabaseFailoverResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse} DatabaseFailoverResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseFailoverResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DatabaseFailoverResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DatabaseFailoverResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a DatabaseFailoverResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse} DatabaseFailoverResponse - */ - DatabaseFailoverResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse) - return object; - return new $root.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse(); - }; - - /** - * Creates a plain object from a DatabaseFailoverResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse} message DatabaseFailoverResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DatabaseFailoverResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this DatabaseFailoverResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse - * @instance - * @returns {Object.} JSON object - */ - DatabaseFailoverResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DatabaseFailoverResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DatabaseFailoverResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse"; - }; - - return DatabaseFailoverResponse; - })(); - - v1.FetchDatabasePropertiesRequest = (function() { - - /** - * Properties of a FetchDatabasePropertiesRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IFetchDatabasePropertiesRequest - * @property {string|null} [environment] FetchDatabasePropertiesRequest environment - */ - - /** - * Constructs a new FetchDatabasePropertiesRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a FetchDatabasePropertiesRequest. - * @implements IFetchDatabasePropertiesRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest=} [properties] Properties to set - */ - function FetchDatabasePropertiesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FetchDatabasePropertiesRequest environment. - * @member {string} environment - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest - * @instance - */ - FetchDatabasePropertiesRequest.prototype.environment = ""; - - /** - * Creates a new FetchDatabasePropertiesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest} FetchDatabasePropertiesRequest instance - */ - FetchDatabasePropertiesRequest.create = function create(properties) { - return new FetchDatabasePropertiesRequest(properties); - }; - - /** - * Encodes the specified FetchDatabasePropertiesRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest} message FetchDatabasePropertiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchDatabasePropertiesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - return writer; - }; - - /** - * Encodes the specified FetchDatabasePropertiesRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest} message FetchDatabasePropertiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchDatabasePropertiesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchDatabasePropertiesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest} FetchDatabasePropertiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchDatabasePropertiesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FetchDatabasePropertiesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest} FetchDatabasePropertiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchDatabasePropertiesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchDatabasePropertiesRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchDatabasePropertiesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - return null; - }; - - /** - * Creates a FetchDatabasePropertiesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest} FetchDatabasePropertiesRequest - */ - FetchDatabasePropertiesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest(); - if (object.environment != null) - message.environment = String(object.environment); - return message; - }; - - /** - * Creates a plain object from a FetchDatabasePropertiesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest} message FetchDatabasePropertiesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchDatabasePropertiesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.environment = ""; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - return object; - }; - - /** - * Converts this FetchDatabasePropertiesRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest - * @instance - * @returns {Object.} JSON object - */ - FetchDatabasePropertiesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchDatabasePropertiesRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchDatabasePropertiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest"; - }; - - return FetchDatabasePropertiesRequest; - })(); - - v1.FetchDatabasePropertiesResponse = (function() { - - /** - * Properties of a FetchDatabasePropertiesResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IFetchDatabasePropertiesResponse - * @property {string|null} [primaryGceZone] FetchDatabasePropertiesResponse primaryGceZone - * @property {string|null} [secondaryGceZone] FetchDatabasePropertiesResponse secondaryGceZone - * @property {boolean|null} [isFailoverReplicaAvailable] FetchDatabasePropertiesResponse isFailoverReplicaAvailable - */ - - /** - * Constructs a new FetchDatabasePropertiesResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a FetchDatabasePropertiesResponse. - * @implements IFetchDatabasePropertiesResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse=} [properties] Properties to set - */ - function FetchDatabasePropertiesResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FetchDatabasePropertiesResponse primaryGceZone. - * @member {string} primaryGceZone - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse - * @instance - */ - FetchDatabasePropertiesResponse.prototype.primaryGceZone = ""; - - /** - * FetchDatabasePropertiesResponse secondaryGceZone. - * @member {string} secondaryGceZone - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse - * @instance - */ - FetchDatabasePropertiesResponse.prototype.secondaryGceZone = ""; - - /** - * FetchDatabasePropertiesResponse isFailoverReplicaAvailable. - * @member {boolean} isFailoverReplicaAvailable - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse - * @instance - */ - FetchDatabasePropertiesResponse.prototype.isFailoverReplicaAvailable = false; - - /** - * Creates a new FetchDatabasePropertiesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse} FetchDatabasePropertiesResponse instance - */ - FetchDatabasePropertiesResponse.create = function create(properties) { - return new FetchDatabasePropertiesResponse(properties); - }; - - /** - * Encodes the specified FetchDatabasePropertiesResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse} message FetchDatabasePropertiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchDatabasePropertiesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.primaryGceZone != null && Object.hasOwnProperty.call(message, "primaryGceZone")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.primaryGceZone); - if (message.secondaryGceZone != null && Object.hasOwnProperty.call(message, "secondaryGceZone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.secondaryGceZone); - if (message.isFailoverReplicaAvailable != null && Object.hasOwnProperty.call(message, "isFailoverReplicaAvailable")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isFailoverReplicaAvailable); - return writer; - }; - - /** - * Encodes the specified FetchDatabasePropertiesResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse} message FetchDatabasePropertiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchDatabasePropertiesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchDatabasePropertiesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse} FetchDatabasePropertiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchDatabasePropertiesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.primaryGceZone = reader.string(); - break; - } - case 2: { - message.secondaryGceZone = reader.string(); - break; - } - case 3: { - message.isFailoverReplicaAvailable = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FetchDatabasePropertiesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse} FetchDatabasePropertiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchDatabasePropertiesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchDatabasePropertiesResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchDatabasePropertiesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.primaryGceZone != null && message.hasOwnProperty("primaryGceZone")) - if (!$util.isString(message.primaryGceZone)) - return "primaryGceZone: string expected"; - if (message.secondaryGceZone != null && message.hasOwnProperty("secondaryGceZone")) - if (!$util.isString(message.secondaryGceZone)) - return "secondaryGceZone: string expected"; - if (message.isFailoverReplicaAvailable != null && message.hasOwnProperty("isFailoverReplicaAvailable")) - if (typeof message.isFailoverReplicaAvailable !== "boolean") - return "isFailoverReplicaAvailable: boolean expected"; - return null; - }; - - /** - * Creates a FetchDatabasePropertiesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse} FetchDatabasePropertiesResponse - */ - FetchDatabasePropertiesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse(); - if (object.primaryGceZone != null) - message.primaryGceZone = String(object.primaryGceZone); - if (object.secondaryGceZone != null) - message.secondaryGceZone = String(object.secondaryGceZone); - if (object.isFailoverReplicaAvailable != null) - message.isFailoverReplicaAvailable = Boolean(object.isFailoverReplicaAvailable); - return message; - }; - - /** - * Creates a plain object from a FetchDatabasePropertiesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse} message FetchDatabasePropertiesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchDatabasePropertiesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.primaryGceZone = ""; - object.secondaryGceZone = ""; - object.isFailoverReplicaAvailable = false; - } - if (message.primaryGceZone != null && message.hasOwnProperty("primaryGceZone")) - object.primaryGceZone = message.primaryGceZone; - if (message.secondaryGceZone != null && message.hasOwnProperty("secondaryGceZone")) - object.secondaryGceZone = message.secondaryGceZone; - if (message.isFailoverReplicaAvailable != null && message.hasOwnProperty("isFailoverReplicaAvailable")) - object.isFailoverReplicaAvailable = message.isFailoverReplicaAvailable; - return object; - }; - - /** - * Converts this FetchDatabasePropertiesResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse - * @instance - * @returns {Object.} JSON object - */ - FetchDatabasePropertiesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchDatabasePropertiesResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchDatabasePropertiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse"; - }; - - return FetchDatabasePropertiesResponse; - })(); - - v1.StorageConfig = (function() { - - /** - * Properties of a StorageConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IStorageConfig - * @property {string|null} [bucket] StorageConfig bucket - */ - - /** - * Constructs a new StorageConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a StorageConfig. - * @implements IStorageConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IStorageConfig=} [properties] Properties to set - */ - function StorageConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StorageConfig bucket. - * @member {string} bucket - * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig - * @instance - */ - StorageConfig.prototype.bucket = ""; - - /** - * Creates a new StorageConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IStorageConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.StorageConfig} StorageConfig instance - */ - StorageConfig.create = function create(properties) { - return new StorageConfig(properties); - }; - - /** - * Encodes the specified StorageConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StorageConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IStorageConfig} message StorageConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); - return writer; - }; - - /** - * Encodes the specified StorageConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.StorageConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IStorageConfig} message StorageConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StorageConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.StorageConfig} StorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.StorageConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bucket = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StorageConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.StorageConfig} StorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StorageConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StorageConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) - if (!$util.isString(message.bucket)) - return "bucket: string expected"; - return null; - }; - - /** - * Creates a StorageConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.StorageConfig} StorageConfig - */ - StorageConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.StorageConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.StorageConfig(); - if (object.bucket != null) - message.bucket = String(object.bucket); - return message; - }; - - /** - * Creates a plain object from a StorageConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.StorageConfig} message StorageConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StorageConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.bucket = ""; - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = message.bucket; - return object; - }; - - /** - * Converts this StorageConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig - * @instance - * @returns {Object.} JSON object - */ - StorageConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StorageConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.StorageConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StorageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.StorageConfig"; - }; - - return StorageConfig; - })(); - - v1.EnvironmentConfig = (function() { - - /** - * Properties of an EnvironmentConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IEnvironmentConfig - * @property {string|null} [gkeCluster] EnvironmentConfig gkeCluster - * @property {string|null} [dagGcsPrefix] EnvironmentConfig dagGcsPrefix - * @property {number|null} [nodeCount] EnvironmentConfig nodeCount - * @property {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig|null} [softwareConfig] EnvironmentConfig softwareConfig - * @property {google.cloud.orchestration.airflow.service.v1.INodeConfig|null} [nodeConfig] EnvironmentConfig nodeConfig - * @property {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig|null} [privateEnvironmentConfig] EnvironmentConfig privateEnvironmentConfig - * @property {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl|null} [webServerNetworkAccessControl] EnvironmentConfig webServerNetworkAccessControl - * @property {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig|null} [databaseConfig] EnvironmentConfig databaseConfig - * @property {google.cloud.orchestration.airflow.service.v1.IWebServerConfig|null} [webServerConfig] EnvironmentConfig webServerConfig - * @property {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig|null} [encryptionConfig] EnvironmentConfig encryptionConfig - * @property {google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow|null} [maintenanceWindow] EnvironmentConfig maintenanceWindow - * @property {google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig|null} [workloadsConfig] EnvironmentConfig workloadsConfig - * @property {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize|null} [environmentSize] EnvironmentConfig environmentSize - * @property {string|null} [airflowUri] EnvironmentConfig airflowUri - * @property {string|null} [airflowByoidUri] EnvironmentConfig airflowByoidUri - * @property {google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig|null} [masterAuthorizedNetworksConfig] EnvironmentConfig masterAuthorizedNetworksConfig - * @property {google.cloud.orchestration.airflow.service.v1.IRecoveryConfig|null} [recoveryConfig] EnvironmentConfig recoveryConfig - * @property {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode|null} [resilienceMode] EnvironmentConfig resilienceMode - * @property {google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig|null} [dataRetentionConfig] EnvironmentConfig dataRetentionConfig - */ - - /** - * Constructs a new EnvironmentConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents an EnvironmentConfig. - * @implements IEnvironmentConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig=} [properties] Properties to set - */ - function EnvironmentConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnvironmentConfig gkeCluster. - * @member {string} gkeCluster - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.gkeCluster = ""; - - /** - * EnvironmentConfig dagGcsPrefix. - * @member {string} dagGcsPrefix - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.dagGcsPrefix = ""; - - /** - * EnvironmentConfig nodeCount. - * @member {number} nodeCount - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.nodeCount = 0; - - /** - * EnvironmentConfig softwareConfig. - * @member {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig|null|undefined} softwareConfig - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.softwareConfig = null; - - /** - * EnvironmentConfig nodeConfig. - * @member {google.cloud.orchestration.airflow.service.v1.INodeConfig|null|undefined} nodeConfig - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.nodeConfig = null; - - /** - * EnvironmentConfig privateEnvironmentConfig. - * @member {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig|null|undefined} privateEnvironmentConfig - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.privateEnvironmentConfig = null; - - /** - * EnvironmentConfig webServerNetworkAccessControl. - * @member {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl|null|undefined} webServerNetworkAccessControl - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.webServerNetworkAccessControl = null; - - /** - * EnvironmentConfig databaseConfig. - * @member {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig|null|undefined} databaseConfig - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.databaseConfig = null; - - /** - * EnvironmentConfig webServerConfig. - * @member {google.cloud.orchestration.airflow.service.v1.IWebServerConfig|null|undefined} webServerConfig - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.webServerConfig = null; - - /** - * EnvironmentConfig encryptionConfig. - * @member {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig|null|undefined} encryptionConfig - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.encryptionConfig = null; - - /** - * EnvironmentConfig maintenanceWindow. - * @member {google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow|null|undefined} maintenanceWindow - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.maintenanceWindow = null; - - /** - * EnvironmentConfig workloadsConfig. - * @member {google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig|null|undefined} workloadsConfig - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.workloadsConfig = null; - - /** - * EnvironmentConfig environmentSize. - * @member {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize} environmentSize - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.environmentSize = 0; - - /** - * EnvironmentConfig airflowUri. - * @member {string} airflowUri - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.airflowUri = ""; - - /** - * EnvironmentConfig airflowByoidUri. - * @member {string} airflowByoidUri - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.airflowByoidUri = ""; - - /** - * EnvironmentConfig masterAuthorizedNetworksConfig. - * @member {google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig|null|undefined} masterAuthorizedNetworksConfig - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.masterAuthorizedNetworksConfig = null; - - /** - * EnvironmentConfig recoveryConfig. - * @member {google.cloud.orchestration.airflow.service.v1.IRecoveryConfig|null|undefined} recoveryConfig - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.recoveryConfig = null; - - /** - * EnvironmentConfig resilienceMode. - * @member {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode} resilienceMode - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.resilienceMode = 0; - - /** - * EnvironmentConfig dataRetentionConfig. - * @member {google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig|null|undefined} dataRetentionConfig - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.dataRetentionConfig = null; - - /** - * Creates a new EnvironmentConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} EnvironmentConfig instance - */ - EnvironmentConfig.create = function create(properties) { - return new EnvironmentConfig(properties); - }; - - /** - * Encodes the specified EnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig} message EnvironmentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnvironmentConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gkeCluster != null && Object.hasOwnProperty.call(message, "gkeCluster")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gkeCluster); - if (message.dagGcsPrefix != null && Object.hasOwnProperty.call(message, "dagGcsPrefix")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dagGcsPrefix); - if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.nodeCount); - if (message.softwareConfig != null && Object.hasOwnProperty.call(message, "softwareConfig")) - $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.encode(message.softwareConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.nodeConfig != null && Object.hasOwnProperty.call(message, "nodeConfig")) - $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.encode(message.nodeConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.airflowUri != null && Object.hasOwnProperty.call(message, "airflowUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.airflowUri); - if (message.privateEnvironmentConfig != null && Object.hasOwnProperty.call(message, "privateEnvironmentConfig")) - $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.encode(message.privateEnvironmentConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.webServerNetworkAccessControl != null && Object.hasOwnProperty.call(message, "webServerNetworkAccessControl")) - $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.encode(message.webServerNetworkAccessControl, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.databaseConfig != null && Object.hasOwnProperty.call(message, "databaseConfig")) - $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.encode(message.databaseConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.webServerConfig != null && Object.hasOwnProperty.call(message, "webServerConfig")) - $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.encode(message.webServerConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) - $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.maintenanceWindow != null && Object.hasOwnProperty.call(message, "maintenanceWindow")) - $root.google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.encode(message.maintenanceWindow, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.workloadsConfig != null && Object.hasOwnProperty.call(message, "workloadsConfig")) - $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.encode(message.workloadsConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.environmentSize != null && Object.hasOwnProperty.call(message, "environmentSize")) - writer.uint32(/* id 16, wireType 0 =*/128).int32(message.environmentSize); - if (message.masterAuthorizedNetworksConfig != null && Object.hasOwnProperty.call(message, "masterAuthorizedNetworksConfig")) - $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.encode(message.masterAuthorizedNetworksConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.recoveryConfig != null && Object.hasOwnProperty.call(message, "recoveryConfig")) - $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig.encode(message.recoveryConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.resilienceMode != null && Object.hasOwnProperty.call(message, "resilienceMode")) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.resilienceMode); - if (message.airflowByoidUri != null && Object.hasOwnProperty.call(message, "airflowByoidUri")) - writer.uint32(/* id 20, wireType 2 =*/162).string(message.airflowByoidUri); - if (message.dataRetentionConfig != null && Object.hasOwnProperty.call(message, "dataRetentionConfig")) - $root.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.encode(message.dataRetentionConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig} message EnvironmentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnvironmentConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnvironmentConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} EnvironmentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnvironmentConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.gkeCluster = reader.string(); - break; - } - case 2: { - message.dagGcsPrefix = reader.string(); - break; - } - case 3: { - message.nodeCount = reader.int32(); - break; - } - case 4: { - message.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.decode(reader, reader.uint32()); - break; - } - case 7: { - message.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.decode(reader, reader.uint32()); - break; - } - case 8: { - message.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.decode(reader, reader.uint32()); - break; - } - case 9: { - message.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.decode(reader, reader.uint32()); - break; - } - case 10: { - message.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.decode(reader, reader.uint32()); - break; - } - case 11: { - message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.decode(reader, reader.uint32()); - break; - } - case 12: { - message.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.decode(reader, reader.uint32()); - break; - } - case 15: { - message.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.decode(reader, reader.uint32()); - break; - } - case 16: { - message.environmentSize = reader.int32(); - break; - } - case 6: { - message.airflowUri = reader.string(); - break; - } - case 20: { - message.airflowByoidUri = reader.string(); - break; - } - case 17: { - message.masterAuthorizedNetworksConfig = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.decode(reader, reader.uint32()); - break; - } - case 18: { - message.recoveryConfig = $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig.decode(reader, reader.uint32()); - break; - } - case 19: { - message.resilienceMode = reader.int32(); - break; - } - case 21: { - message.dataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnvironmentConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} EnvironmentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnvironmentConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnvironmentConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnvironmentConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) - if (!$util.isString(message.gkeCluster)) - return "gkeCluster: string expected"; - if (message.dagGcsPrefix != null && message.hasOwnProperty("dagGcsPrefix")) - if (!$util.isString(message.dagGcsPrefix)) - return "dagGcsPrefix: string expected"; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (!$util.isInteger(message.nodeCount)) - return "nodeCount: integer expected"; - if (message.softwareConfig != null && message.hasOwnProperty("softwareConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.verify(message.softwareConfig); - if (error) - return "softwareConfig." + error; - } - if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.verify(message.nodeConfig); - if (error) - return "nodeConfig." + error; - } - if (message.privateEnvironmentConfig != null && message.hasOwnProperty("privateEnvironmentConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.verify(message.privateEnvironmentConfig); - if (error) - return "privateEnvironmentConfig." + error; - } - if (message.webServerNetworkAccessControl != null && message.hasOwnProperty("webServerNetworkAccessControl")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.verify(message.webServerNetworkAccessControl); - if (error) - return "webServerNetworkAccessControl." + error; - } - if (message.databaseConfig != null && message.hasOwnProperty("databaseConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.verify(message.databaseConfig); - if (error) - return "databaseConfig." + error; - } - if (message.webServerConfig != null && message.hasOwnProperty("webServerConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.verify(message.webServerConfig); - if (error) - return "webServerConfig." + error; - } - if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.verify(message.encryptionConfig); - if (error) - return "encryptionConfig." + error; - } - if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.verify(message.maintenanceWindow); - if (error) - return "maintenanceWindow." + error; - } - if (message.workloadsConfig != null && message.hasOwnProperty("workloadsConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.verify(message.workloadsConfig); - if (error) - return "workloadsConfig." + error; - } - if (message.environmentSize != null && message.hasOwnProperty("environmentSize")) - switch (message.environmentSize) { - default: - return "environmentSize: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.airflowUri != null && message.hasOwnProperty("airflowUri")) - if (!$util.isString(message.airflowUri)) - return "airflowUri: string expected"; - if (message.airflowByoidUri != null && message.hasOwnProperty("airflowByoidUri")) - if (!$util.isString(message.airflowByoidUri)) - return "airflowByoidUri: string expected"; - if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.verify(message.masterAuthorizedNetworksConfig); - if (error) - return "masterAuthorizedNetworksConfig." + error; - } - if (message.recoveryConfig != null && message.hasOwnProperty("recoveryConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig.verify(message.recoveryConfig); - if (error) - return "recoveryConfig." + error; - } - if (message.resilienceMode != null && message.hasOwnProperty("resilienceMode")) - switch (message.resilienceMode) { - default: - return "resilienceMode: enum value expected"; - case 0: - case 1: - break; - } - if (message.dataRetentionConfig != null && message.hasOwnProperty("dataRetentionConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.verify(message.dataRetentionConfig); - if (error) - return "dataRetentionConfig." + error; - } - return null; - }; - - /** - * Creates an EnvironmentConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} EnvironmentConfig - */ - EnvironmentConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig(); - if (object.gkeCluster != null) - message.gkeCluster = String(object.gkeCluster); - if (object.dagGcsPrefix != null) - message.dagGcsPrefix = String(object.dagGcsPrefix); - if (object.nodeCount != null) - message.nodeCount = object.nodeCount | 0; - if (object.softwareConfig != null) { - if (typeof object.softwareConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.softwareConfig: object expected"); - message.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.fromObject(object.softwareConfig); - } - if (object.nodeConfig != null) { - if (typeof object.nodeConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.nodeConfig: object expected"); - message.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.fromObject(object.nodeConfig); - } - if (object.privateEnvironmentConfig != null) { - if (typeof object.privateEnvironmentConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.privateEnvironmentConfig: object expected"); - message.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.fromObject(object.privateEnvironmentConfig); - } - if (object.webServerNetworkAccessControl != null) { - if (typeof object.webServerNetworkAccessControl !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.webServerNetworkAccessControl: object expected"); - message.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.fromObject(object.webServerNetworkAccessControl); - } - if (object.databaseConfig != null) { - if (typeof object.databaseConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.databaseConfig: object expected"); - message.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.fromObject(object.databaseConfig); - } - if (object.webServerConfig != null) { - if (typeof object.webServerConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.webServerConfig: object expected"); - message.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.fromObject(object.webServerConfig); - } - if (object.encryptionConfig != null) { - if (typeof object.encryptionConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.encryptionConfig: object expected"); - message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.fromObject(object.encryptionConfig); - } - if (object.maintenanceWindow != null) { - if (typeof object.maintenanceWindow !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.maintenanceWindow: object expected"); - message.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.fromObject(object.maintenanceWindow); - } - if (object.workloadsConfig != null) { - if (typeof object.workloadsConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.workloadsConfig: object expected"); - message.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.fromObject(object.workloadsConfig); - } - switch (object.environmentSize) { - default: - if (typeof object.environmentSize === "number") { - message.environmentSize = object.environmentSize; - break; - } - break; - case "ENVIRONMENT_SIZE_UNSPECIFIED": - case 0: - message.environmentSize = 0; - break; - case "ENVIRONMENT_SIZE_SMALL": - case 1: - message.environmentSize = 1; - break; - case "ENVIRONMENT_SIZE_MEDIUM": - case 2: - message.environmentSize = 2; - break; - case "ENVIRONMENT_SIZE_LARGE": - case 3: - message.environmentSize = 3; - break; - } - if (object.airflowUri != null) - message.airflowUri = String(object.airflowUri); - if (object.airflowByoidUri != null) - message.airflowByoidUri = String(object.airflowByoidUri); - if (object.masterAuthorizedNetworksConfig != null) { - if (typeof object.masterAuthorizedNetworksConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.masterAuthorizedNetworksConfig: object expected"); - message.masterAuthorizedNetworksConfig = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.fromObject(object.masterAuthorizedNetworksConfig); - } - if (object.recoveryConfig != null) { - if (typeof object.recoveryConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.recoveryConfig: object expected"); - message.recoveryConfig = $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig.fromObject(object.recoveryConfig); - } - switch (object.resilienceMode) { - default: - if (typeof object.resilienceMode === "number") { - message.resilienceMode = object.resilienceMode; - break; - } - break; - case "RESILIENCE_MODE_UNSPECIFIED": - case 0: - message.resilienceMode = 0; - break; - case "HIGH_RESILIENCE": - case 1: - message.resilienceMode = 1; - break; - } - if (object.dataRetentionConfig != null) { - if (typeof object.dataRetentionConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.dataRetentionConfig: object expected"); - message.dataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.fromObject(object.dataRetentionConfig); - } - return message; - }; - - /** - * Creates a plain object from an EnvironmentConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.EnvironmentConfig} message EnvironmentConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnvironmentConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.gkeCluster = ""; - object.dagGcsPrefix = ""; - object.nodeCount = 0; - object.softwareConfig = null; - object.nodeConfig = null; - object.airflowUri = ""; - object.privateEnvironmentConfig = null; - object.webServerNetworkAccessControl = null; - object.databaseConfig = null; - object.webServerConfig = null; - object.encryptionConfig = null; - object.maintenanceWindow = null; - object.workloadsConfig = null; - object.environmentSize = options.enums === String ? "ENVIRONMENT_SIZE_UNSPECIFIED" : 0; - object.masterAuthorizedNetworksConfig = null; - object.recoveryConfig = null; - object.resilienceMode = options.enums === String ? "RESILIENCE_MODE_UNSPECIFIED" : 0; - object.airflowByoidUri = ""; - object.dataRetentionConfig = null; - } - if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) - object.gkeCluster = message.gkeCluster; - if (message.dagGcsPrefix != null && message.hasOwnProperty("dagGcsPrefix")) - object.dagGcsPrefix = message.dagGcsPrefix; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - object.nodeCount = message.nodeCount; - if (message.softwareConfig != null && message.hasOwnProperty("softwareConfig")) - object.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.toObject(message.softwareConfig, options); - if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) - object.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1.NodeConfig.toObject(message.nodeConfig, options); - if (message.airflowUri != null && message.hasOwnProperty("airflowUri")) - object.airflowUri = message.airflowUri; - if (message.privateEnvironmentConfig != null && message.hasOwnProperty("privateEnvironmentConfig")) - object.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.toObject(message.privateEnvironmentConfig, options); - if (message.webServerNetworkAccessControl != null && message.hasOwnProperty("webServerNetworkAccessControl")) - object.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.toObject(message.webServerNetworkAccessControl, options); - if (message.databaseConfig != null && message.hasOwnProperty("databaseConfig")) - object.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig.toObject(message.databaseConfig, options); - if (message.webServerConfig != null && message.hasOwnProperty("webServerConfig")) - object.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig.toObject(message.webServerConfig, options); - if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) - object.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig.toObject(message.encryptionConfig, options); - if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) - object.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.toObject(message.maintenanceWindow, options); - if (message.workloadsConfig != null && message.hasOwnProperty("workloadsConfig")) - object.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.toObject(message.workloadsConfig, options); - if (message.environmentSize != null && message.hasOwnProperty("environmentSize")) - object.environmentSize = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize[message.environmentSize] === undefined ? message.environmentSize : $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize[message.environmentSize] : message.environmentSize; - if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) - object.masterAuthorizedNetworksConfig = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.toObject(message.masterAuthorizedNetworksConfig, options); - if (message.recoveryConfig != null && message.hasOwnProperty("recoveryConfig")) - object.recoveryConfig = $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig.toObject(message.recoveryConfig, options); - if (message.resilienceMode != null && message.hasOwnProperty("resilienceMode")) - object.resilienceMode = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode[message.resilienceMode] === undefined ? message.resilienceMode : $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode[message.resilienceMode] : message.resilienceMode; - if (message.airflowByoidUri != null && message.hasOwnProperty("airflowByoidUri")) - object.airflowByoidUri = message.airflowByoidUri; - if (message.dataRetentionConfig != null && message.hasOwnProperty("dataRetentionConfig")) - object.dataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.toObject(message.dataRetentionConfig, options); - return object; - }; - - /** - * Converts this EnvironmentConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @instance - * @returns {Object.} JSON object - */ - EnvironmentConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnvironmentConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.EnvironmentConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnvironmentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.EnvironmentConfig"; - }; - - /** - * EnvironmentSize enum. - * @name google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.EnvironmentSize - * @enum {number} - * @property {number} ENVIRONMENT_SIZE_UNSPECIFIED=0 ENVIRONMENT_SIZE_UNSPECIFIED value - * @property {number} ENVIRONMENT_SIZE_SMALL=1 ENVIRONMENT_SIZE_SMALL value - * @property {number} ENVIRONMENT_SIZE_MEDIUM=2 ENVIRONMENT_SIZE_MEDIUM value - * @property {number} ENVIRONMENT_SIZE_LARGE=3 ENVIRONMENT_SIZE_LARGE value - */ - EnvironmentConfig.EnvironmentSize = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENVIRONMENT_SIZE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENVIRONMENT_SIZE_SMALL"] = 1; - values[valuesById[2] = "ENVIRONMENT_SIZE_MEDIUM"] = 2; - values[valuesById[3] = "ENVIRONMENT_SIZE_LARGE"] = 3; - return values; - })(); - - /** - * ResilienceMode enum. - * @name google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.ResilienceMode - * @enum {number} - * @property {number} RESILIENCE_MODE_UNSPECIFIED=0 RESILIENCE_MODE_UNSPECIFIED value - * @property {number} HIGH_RESILIENCE=1 HIGH_RESILIENCE value - */ - EnvironmentConfig.ResilienceMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESILIENCE_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HIGH_RESILIENCE"] = 1; - return values; - })(); - - return EnvironmentConfig; - })(); - - v1.WebServerNetworkAccessControl = (function() { - - /** - * Properties of a WebServerNetworkAccessControl. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IWebServerNetworkAccessControl - * @property {Array.|null} [allowedIpRanges] WebServerNetworkAccessControl allowedIpRanges - */ - - /** - * Constructs a new WebServerNetworkAccessControl. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a WebServerNetworkAccessControl. - * @implements IWebServerNetworkAccessControl - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl=} [properties] Properties to set - */ - function WebServerNetworkAccessControl(properties) { - this.allowedIpRanges = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WebServerNetworkAccessControl allowedIpRanges. - * @member {Array.} allowedIpRanges - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl - * @instance - */ - WebServerNetworkAccessControl.prototype.allowedIpRanges = $util.emptyArray; - - /** - * Creates a new WebServerNetworkAccessControl instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} WebServerNetworkAccessControl instance - */ - WebServerNetworkAccessControl.create = function create(properties) { - return new WebServerNetworkAccessControl(properties); - }; - - /** - * Encodes the specified WebServerNetworkAccessControl message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl} message WebServerNetworkAccessControl message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebServerNetworkAccessControl.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowedIpRanges != null && message.allowedIpRanges.length) - for (var i = 0; i < message.allowedIpRanges.length; ++i) - $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.encode(message.allowedIpRanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WebServerNetworkAccessControl message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IWebServerNetworkAccessControl} message WebServerNetworkAccessControl message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebServerNetworkAccessControl.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} WebServerNetworkAccessControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebServerNetworkAccessControl.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.allowedIpRanges && message.allowedIpRanges.length)) - message.allowedIpRanges = []; - message.allowedIpRanges.push($root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} WebServerNetworkAccessControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebServerNetworkAccessControl.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WebServerNetworkAccessControl message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WebServerNetworkAccessControl.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowedIpRanges != null && message.hasOwnProperty("allowedIpRanges")) { - if (!Array.isArray(message.allowedIpRanges)) - return "allowedIpRanges: array expected"; - for (var i = 0; i < message.allowedIpRanges.length; ++i) { - var error = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.verify(message.allowedIpRanges[i]); - if (error) - return "allowedIpRanges." + error; - } - } - return null; - }; - - /** - * Creates a WebServerNetworkAccessControl message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} WebServerNetworkAccessControl - */ - WebServerNetworkAccessControl.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl(); - if (object.allowedIpRanges) { - if (!Array.isArray(object.allowedIpRanges)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.allowedIpRanges: array expected"); - message.allowedIpRanges = []; - for (var i = 0; i < object.allowedIpRanges.length; ++i) { - if (typeof object.allowedIpRanges[i] !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.allowedIpRanges: object expected"); - message.allowedIpRanges[i] = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.fromObject(object.allowedIpRanges[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a WebServerNetworkAccessControl message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl} message WebServerNetworkAccessControl - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WebServerNetworkAccessControl.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.allowedIpRanges = []; - if (message.allowedIpRanges && message.allowedIpRanges.length) { - object.allowedIpRanges = []; - for (var j = 0; j < message.allowedIpRanges.length; ++j) - object.allowedIpRanges[j] = $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.toObject(message.allowedIpRanges[j], options); - } - return object; - }; - - /** - * Converts this WebServerNetworkAccessControl to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl - * @instance - * @returns {Object.} JSON object - */ - WebServerNetworkAccessControl.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WebServerNetworkAccessControl - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WebServerNetworkAccessControl.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl"; - }; - - WebServerNetworkAccessControl.AllowedIpRange = (function() { - - /** - * Properties of an AllowedIpRange. - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl - * @interface IAllowedIpRange - * @property {string|null} [value] AllowedIpRange value - * @property {string|null} [description] AllowedIpRange description - */ - - /** - * Constructs a new AllowedIpRange. - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl - * @classdesc Represents an AllowedIpRange. - * @implements IAllowedIpRange - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange=} [properties] Properties to set - */ - function AllowedIpRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AllowedIpRange value. - * @member {string} value - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange - * @instance - */ - AllowedIpRange.prototype.value = ""; - - /** - * AllowedIpRange description. - * @member {string} description - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange - * @instance - */ - AllowedIpRange.prototype.description = ""; - - /** - * Creates a new AllowedIpRange instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange instance - */ - AllowedIpRange.create = function create(properties) { - return new AllowedIpRange(properties); - }; - - /** - * Encodes the specified AllowedIpRange message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange} message AllowedIpRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AllowedIpRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - return writer; - }; - - /** - * Encodes the specified AllowedIpRange message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.IAllowedIpRange} message AllowedIpRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AllowedIpRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AllowedIpRange message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AllowedIpRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AllowedIpRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AllowedIpRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AllowedIpRange message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AllowedIpRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates an AllowedIpRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange - */ - AllowedIpRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange(); - if (object.value != null) - message.value = String(object.value); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from an AllowedIpRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange} message AllowedIpRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AllowedIpRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.description = ""; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this AllowedIpRange to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange - * @instance - * @returns {Object.} JSON object - */ - AllowedIpRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AllowedIpRange - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AllowedIpRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WebServerNetworkAccessControl.AllowedIpRange"; - }; - - return AllowedIpRange; - })(); - - return WebServerNetworkAccessControl; - })(); - - v1.DatabaseConfig = (function() { - - /** - * Properties of a DatabaseConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IDatabaseConfig - * @property {string|null} [machineType] DatabaseConfig machineType - * @property {string|null} [zone] DatabaseConfig zone - */ - - /** - * Constructs a new DatabaseConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a DatabaseConfig. - * @implements IDatabaseConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig=} [properties] Properties to set - */ - function DatabaseConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DatabaseConfig machineType. - * @member {string} machineType - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig - * @instance - */ - DatabaseConfig.prototype.machineType = ""; - - /** - * DatabaseConfig zone. - * @member {string} zone - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig - * @instance - */ - DatabaseConfig.prototype.zone = ""; - - /** - * Creates a new DatabaseConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseConfig} DatabaseConfig instance - */ - DatabaseConfig.create = function create(properties) { - return new DatabaseConfig(properties); - }; - - /** - * Encodes the specified DatabaseConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig} message DatabaseConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - return writer; - }; - - /** - * Encodes the specified DatabaseConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DatabaseConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDatabaseConfig} message DatabaseConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DatabaseConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseConfig} DatabaseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.machineType = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DatabaseConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseConfig} DatabaseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DatabaseConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DatabaseConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.machineType != null && message.hasOwnProperty("machineType")) - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - return null; - }; - - /** - * Creates a DatabaseConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.DatabaseConfig} DatabaseConfig - */ - DatabaseConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.DatabaseConfig(); - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.zone != null) - message.zone = String(object.zone); - return message; - }; - - /** - * Creates a plain object from a DatabaseConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.DatabaseConfig} message DatabaseConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DatabaseConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.machineType = ""; - object.zone = ""; - } - if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = message.machineType; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - return object; - }; - - /** - * Converts this DatabaseConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig - * @instance - * @returns {Object.} JSON object - */ - DatabaseConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DatabaseConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.DatabaseConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DatabaseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.DatabaseConfig"; - }; - - return DatabaseConfig; - })(); - - v1.WebServerConfig = (function() { - - /** - * Properties of a WebServerConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IWebServerConfig - * @property {string|null} [machineType] WebServerConfig machineType - */ - - /** - * Constructs a new WebServerConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a WebServerConfig. - * @implements IWebServerConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IWebServerConfig=} [properties] Properties to set - */ - function WebServerConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WebServerConfig machineType. - * @member {string} machineType - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig - * @instance - */ - WebServerConfig.prototype.machineType = ""; - - /** - * Creates a new WebServerConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IWebServerConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.WebServerConfig} WebServerConfig instance - */ - WebServerConfig.create = function create(properties) { - return new WebServerConfig(properties); - }; - - /** - * Encodes the specified WebServerConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IWebServerConfig} message WebServerConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebServerConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); - return writer; - }; - - /** - * Encodes the specified WebServerConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WebServerConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IWebServerConfig} message WebServerConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebServerConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WebServerConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.WebServerConfig} WebServerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebServerConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.machineType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WebServerConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.WebServerConfig} WebServerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebServerConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WebServerConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WebServerConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.machineType != null && message.hasOwnProperty("machineType")) - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - return null; - }; - - /** - * Creates a WebServerConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.WebServerConfig} WebServerConfig - */ - WebServerConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.WebServerConfig(); - if (object.machineType != null) - message.machineType = String(object.machineType); - return message; - }; - - /** - * Creates a plain object from a WebServerConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WebServerConfig} message WebServerConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WebServerConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.machineType = ""; - if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = message.machineType; - return object; - }; - - /** - * Converts this WebServerConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig - * @instance - * @returns {Object.} JSON object - */ - WebServerConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WebServerConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.WebServerConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WebServerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WebServerConfig"; - }; - - return WebServerConfig; - })(); - - v1.EncryptionConfig = (function() { - - /** - * Properties of an EncryptionConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IEncryptionConfig - * @property {string|null} [kmsKeyName] EncryptionConfig kmsKeyName - */ - - /** - * Constructs a new EncryptionConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents an EncryptionConfig. - * @implements IEncryptionConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig=} [properties] Properties to set - */ - function EncryptionConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EncryptionConfig kmsKeyName. - * @member {string} kmsKeyName - * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig - * @instance - */ - EncryptionConfig.prototype.kmsKeyName = ""; - - /** - * Creates a new EncryptionConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.EncryptionConfig} EncryptionConfig instance - */ - EncryptionConfig.create = function create(properties) { - return new EncryptionConfig(properties); - }; - - /** - * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EncryptionConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig} message EncryptionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EncryptionConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); - return writer; - }; - - /** - * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.EncryptionConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IEncryptionConfig} message EncryptionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EncryptionConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.EncryptionConfig} EncryptionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EncryptionConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kmsKeyName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.EncryptionConfig} EncryptionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EncryptionConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EncryptionConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; - return null; - }; - - /** - * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.EncryptionConfig} EncryptionConfig - */ - EncryptionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.EncryptionConfig(); - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); - return message; - }; - - /** - * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.EncryptionConfig} message EncryptionConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EncryptionConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.kmsKeyName = ""; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - object.kmsKeyName = message.kmsKeyName; - return object; - }; - - /** - * Converts this EncryptionConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig - * @instance - * @returns {Object.} JSON object - */ - EncryptionConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EncryptionConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.EncryptionConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EncryptionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.EncryptionConfig"; - }; - - return EncryptionConfig; - })(); - - v1.MaintenanceWindow = (function() { - - /** - * Properties of a MaintenanceWindow. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IMaintenanceWindow - * @property {google.protobuf.ITimestamp|null} [startTime] MaintenanceWindow startTime - * @property {google.protobuf.ITimestamp|null} [endTime] MaintenanceWindow endTime - * @property {string|null} [recurrence] MaintenanceWindow recurrence - */ - - /** - * Constructs a new MaintenanceWindow. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a MaintenanceWindow. - * @implements IMaintenanceWindow - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow=} [properties] Properties to set - */ - function MaintenanceWindow(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MaintenanceWindow startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow - * @instance - */ - MaintenanceWindow.prototype.startTime = null; - - /** - * MaintenanceWindow endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow - * @instance - */ - MaintenanceWindow.prototype.endTime = null; - - /** - * MaintenanceWindow recurrence. - * @member {string} recurrence - * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow - * @instance - */ - MaintenanceWindow.prototype.recurrence = ""; - - /** - * Creates a new MaintenanceWindow instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.MaintenanceWindow} MaintenanceWindow instance - */ - MaintenanceWindow.create = function create(properties) { - return new MaintenanceWindow(properties); - }; - - /** - * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaintenanceWindow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, 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.recurrence != null && Object.hasOwnProperty.call(message, "recurrence")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.recurrence); - return writer; - }; - - /** - * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MaintenanceWindow message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.MaintenanceWindow} MaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaintenanceWindow.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.MaintenanceWindow(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.startTime = $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.recurrence = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.MaintenanceWindow} MaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MaintenanceWindow message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MaintenanceWindow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.recurrence != null && message.hasOwnProperty("recurrence")) - if (!$util.isString(message.recurrence)) - return "recurrence: string expected"; - return null; - }; - - /** - * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.MaintenanceWindow} MaintenanceWindow - */ - MaintenanceWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.MaintenanceWindow) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.MaintenanceWindow(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.MaintenanceWindow.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.recurrence != null) - message.recurrence = String(object.recurrence); - return message; - }; - - /** - * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow - * @static - * @param {google.cloud.orchestration.airflow.service.v1.MaintenanceWindow} message MaintenanceWindow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MaintenanceWindow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startTime = null; - object.endTime = null; - object.recurrence = ""; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.recurrence != null && message.hasOwnProperty("recurrence")) - object.recurrence = message.recurrence; - return object; - }; - - /** - * Converts this MaintenanceWindow to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow - * @instance - * @returns {Object.} JSON object - */ - MaintenanceWindow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MaintenanceWindow - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.MaintenanceWindow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.MaintenanceWindow"; - }; - - return MaintenanceWindow; - })(); - - v1.SoftwareConfig = (function() { - - /** - * Properties of a SoftwareConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface ISoftwareConfig - * @property {string|null} [imageVersion] SoftwareConfig imageVersion - * @property {Object.|null} [airflowConfigOverrides] SoftwareConfig airflowConfigOverrides - * @property {Object.|null} [pypiPackages] SoftwareConfig pypiPackages - * @property {Object.|null} [envVariables] SoftwareConfig envVariables - * @property {string|null} [pythonVersion] SoftwareConfig pythonVersion - * @property {number|null} [schedulerCount] SoftwareConfig schedulerCount - * @property {google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration|null} [cloudDataLineageIntegration] SoftwareConfig cloudDataLineageIntegration - * @property {google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode|null} [webServerPluginsMode] SoftwareConfig webServerPluginsMode - */ - - /** - * Constructs a new SoftwareConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a SoftwareConfig. - * @implements ISoftwareConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig=} [properties] Properties to set - */ - function SoftwareConfig(properties) { - this.airflowConfigOverrides = {}; - this.pypiPackages = {}; - this.envVariables = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SoftwareConfig imageVersion. - * @member {string} imageVersion - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @instance - */ - SoftwareConfig.prototype.imageVersion = ""; - - /** - * SoftwareConfig airflowConfigOverrides. - * @member {Object.} airflowConfigOverrides - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @instance - */ - SoftwareConfig.prototype.airflowConfigOverrides = $util.emptyObject; - - /** - * SoftwareConfig pypiPackages. - * @member {Object.} pypiPackages - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @instance - */ - SoftwareConfig.prototype.pypiPackages = $util.emptyObject; - - /** - * SoftwareConfig envVariables. - * @member {Object.} envVariables - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @instance - */ - SoftwareConfig.prototype.envVariables = $util.emptyObject; - - /** - * SoftwareConfig pythonVersion. - * @member {string} pythonVersion - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @instance - */ - SoftwareConfig.prototype.pythonVersion = ""; - - /** - * SoftwareConfig schedulerCount. - * @member {number} schedulerCount - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @instance - */ - SoftwareConfig.prototype.schedulerCount = 0; - - /** - * SoftwareConfig cloudDataLineageIntegration. - * @member {google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration|null|undefined} cloudDataLineageIntegration - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @instance - */ - SoftwareConfig.prototype.cloudDataLineageIntegration = null; - - /** - * SoftwareConfig webServerPluginsMode. - * @member {google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode} webServerPluginsMode - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @instance - */ - SoftwareConfig.prototype.webServerPluginsMode = 0; - - /** - * Creates a new SoftwareConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.SoftwareConfig} SoftwareConfig instance - */ - SoftwareConfig.create = function create(properties) { - return new SoftwareConfig(properties); - }; - - /** - * Encodes the specified SoftwareConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SoftwareConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig} message SoftwareConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SoftwareConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageVersion); - if (message.airflowConfigOverrides != null && Object.hasOwnProperty.call(message, "airflowConfigOverrides")) - for (var keys = Object.keys(message.airflowConfigOverrides), 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.airflowConfigOverrides[keys[i]]).ldelim(); - if (message.pypiPackages != null && Object.hasOwnProperty.call(message, "pypiPackages")) - for (var keys = Object.keys(message.pypiPackages), 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.pypiPackages[keys[i]]).ldelim(); - if (message.envVariables != null && Object.hasOwnProperty.call(message, "envVariables")) - for (var keys = Object.keys(message.envVariables), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.envVariables[keys[i]]).ldelim(); - if (message.pythonVersion != null && Object.hasOwnProperty.call(message, "pythonVersion")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.pythonVersion); - if (message.schedulerCount != null && Object.hasOwnProperty.call(message, "schedulerCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.schedulerCount); - if (message.cloudDataLineageIntegration != null && Object.hasOwnProperty.call(message, "cloudDataLineageIntegration")) - $root.google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.encode(message.cloudDataLineageIntegration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.webServerPluginsMode != null && Object.hasOwnProperty.call(message, "webServerPluginsMode")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.webServerPluginsMode); - return writer; - }; - - /** - * Encodes the specified SoftwareConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.SoftwareConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ISoftwareConfig} message SoftwareConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SoftwareConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SoftwareConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.SoftwareConfig} SoftwareConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SoftwareConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.imageVersion = reader.string(); - break; - } - case 2: { - if (message.airflowConfigOverrides === $util.emptyObject) - message.airflowConfigOverrides = {}; - 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.airflowConfigOverrides[key] = value; - break; - } - case 3: { - if (message.pypiPackages === $util.emptyObject) - message.pypiPackages = {}; - 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.pypiPackages[key] = value; - break; - } - case 4: { - if (message.envVariables === $util.emptyObject) - message.envVariables = {}; - 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.envVariables[key] = value; - break; - } - case 6: { - message.pythonVersion = reader.string(); - break; - } - case 7: { - message.schedulerCount = reader.int32(); - break; - } - case 8: { - message.cloudDataLineageIntegration = $root.google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.decode(reader, reader.uint32()); - break; - } - case 10: { - message.webServerPluginsMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SoftwareConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.SoftwareConfig} SoftwareConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SoftwareConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SoftwareConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SoftwareConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) - if (!$util.isString(message.imageVersion)) - return "imageVersion: string expected"; - if (message.airflowConfigOverrides != null && message.hasOwnProperty("airflowConfigOverrides")) { - if (!$util.isObject(message.airflowConfigOverrides)) - return "airflowConfigOverrides: object expected"; - var key = Object.keys(message.airflowConfigOverrides); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.airflowConfigOverrides[key[i]])) - return "airflowConfigOverrides: string{k:string} expected"; - } - if (message.pypiPackages != null && message.hasOwnProperty("pypiPackages")) { - if (!$util.isObject(message.pypiPackages)) - return "pypiPackages: object expected"; - var key = Object.keys(message.pypiPackages); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.pypiPackages[key[i]])) - return "pypiPackages: string{k:string} expected"; - } - if (message.envVariables != null && message.hasOwnProperty("envVariables")) { - if (!$util.isObject(message.envVariables)) - return "envVariables: object expected"; - var key = Object.keys(message.envVariables); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.envVariables[key[i]])) - return "envVariables: string{k:string} expected"; - } - if (message.pythonVersion != null && message.hasOwnProperty("pythonVersion")) - if (!$util.isString(message.pythonVersion)) - return "pythonVersion: string expected"; - if (message.schedulerCount != null && message.hasOwnProperty("schedulerCount")) - if (!$util.isInteger(message.schedulerCount)) - return "schedulerCount: integer expected"; - if (message.cloudDataLineageIntegration != null && message.hasOwnProperty("cloudDataLineageIntegration")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.verify(message.cloudDataLineageIntegration); - if (error) - return "cloudDataLineageIntegration." + error; - } - if (message.webServerPluginsMode != null && message.hasOwnProperty("webServerPluginsMode")) - switch (message.webServerPluginsMode) { - default: - return "webServerPluginsMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a SoftwareConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.SoftwareConfig} SoftwareConfig - */ - SoftwareConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig(); - if (object.imageVersion != null) - message.imageVersion = String(object.imageVersion); - if (object.airflowConfigOverrides) { - if (typeof object.airflowConfigOverrides !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.SoftwareConfig.airflowConfigOverrides: object expected"); - message.airflowConfigOverrides = {}; - for (var keys = Object.keys(object.airflowConfigOverrides), i = 0; i < keys.length; ++i) - message.airflowConfigOverrides[keys[i]] = String(object.airflowConfigOverrides[keys[i]]); - } - if (object.pypiPackages) { - if (typeof object.pypiPackages !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.SoftwareConfig.pypiPackages: object expected"); - message.pypiPackages = {}; - for (var keys = Object.keys(object.pypiPackages), i = 0; i < keys.length; ++i) - message.pypiPackages[keys[i]] = String(object.pypiPackages[keys[i]]); - } - if (object.envVariables) { - if (typeof object.envVariables !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.SoftwareConfig.envVariables: object expected"); - message.envVariables = {}; - for (var keys = Object.keys(object.envVariables), i = 0; i < keys.length; ++i) - message.envVariables[keys[i]] = String(object.envVariables[keys[i]]); - } - if (object.pythonVersion != null) - message.pythonVersion = String(object.pythonVersion); - if (object.schedulerCount != null) - message.schedulerCount = object.schedulerCount | 0; - if (object.cloudDataLineageIntegration != null) { - if (typeof object.cloudDataLineageIntegration !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.SoftwareConfig.cloudDataLineageIntegration: object expected"); - message.cloudDataLineageIntegration = $root.google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.fromObject(object.cloudDataLineageIntegration); - } - switch (object.webServerPluginsMode) { - default: - if (typeof object.webServerPluginsMode === "number") { - message.webServerPluginsMode = object.webServerPluginsMode; - break; - } - break; - case "WEB_SERVER_PLUGINS_MODE_UNSPECIFIED": - case 0: - message.webServerPluginsMode = 0; - break; - case "PLUGINS_DISABLED": - case 1: - message.webServerPluginsMode = 1; - break; - case "PLUGINS_ENABLED": - case 2: - message.webServerPluginsMode = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a SoftwareConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.SoftwareConfig} message SoftwareConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SoftwareConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) { - object.airflowConfigOverrides = {}; - object.pypiPackages = {}; - object.envVariables = {}; - } - if (options.defaults) { - object.imageVersion = ""; - object.pythonVersion = ""; - object.schedulerCount = 0; - object.cloudDataLineageIntegration = null; - object.webServerPluginsMode = options.enums === String ? "WEB_SERVER_PLUGINS_MODE_UNSPECIFIED" : 0; - } - if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) - object.imageVersion = message.imageVersion; - var keys2; - if (message.airflowConfigOverrides && (keys2 = Object.keys(message.airflowConfigOverrides)).length) { - object.airflowConfigOverrides = {}; - for (var j = 0; j < keys2.length; ++j) - object.airflowConfigOverrides[keys2[j]] = message.airflowConfigOverrides[keys2[j]]; - } - if (message.pypiPackages && (keys2 = Object.keys(message.pypiPackages)).length) { - object.pypiPackages = {}; - for (var j = 0; j < keys2.length; ++j) - object.pypiPackages[keys2[j]] = message.pypiPackages[keys2[j]]; - } - if (message.envVariables && (keys2 = Object.keys(message.envVariables)).length) { - object.envVariables = {}; - for (var j = 0; j < keys2.length; ++j) - object.envVariables[keys2[j]] = message.envVariables[keys2[j]]; - } - if (message.pythonVersion != null && message.hasOwnProperty("pythonVersion")) - object.pythonVersion = message.pythonVersion; - if (message.schedulerCount != null && message.hasOwnProperty("schedulerCount")) - object.schedulerCount = message.schedulerCount; - if (message.cloudDataLineageIntegration != null && message.hasOwnProperty("cloudDataLineageIntegration")) - object.cloudDataLineageIntegration = $root.google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.toObject(message.cloudDataLineageIntegration, options); - if (message.webServerPluginsMode != null && message.hasOwnProperty("webServerPluginsMode")) - object.webServerPluginsMode = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode[message.webServerPluginsMode] === undefined ? message.webServerPluginsMode : $root.google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode[message.webServerPluginsMode] : message.webServerPluginsMode; - return object; - }; - - /** - * Converts this SoftwareConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @instance - * @returns {Object.} JSON object - */ - SoftwareConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SoftwareConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.SoftwareConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SoftwareConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.SoftwareConfig"; - }; - - /** - * WebServerPluginsMode enum. - * @name google.cloud.orchestration.airflow.service.v1.SoftwareConfig.WebServerPluginsMode - * @enum {number} - * @property {number} WEB_SERVER_PLUGINS_MODE_UNSPECIFIED=0 WEB_SERVER_PLUGINS_MODE_UNSPECIFIED value - * @property {number} PLUGINS_DISABLED=1 PLUGINS_DISABLED value - * @property {number} PLUGINS_ENABLED=2 PLUGINS_ENABLED value - */ - SoftwareConfig.WebServerPluginsMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "WEB_SERVER_PLUGINS_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PLUGINS_DISABLED"] = 1; - values[valuesById[2] = "PLUGINS_ENABLED"] = 2; - return values; - })(); - - return SoftwareConfig; - })(); - - v1.IPAllocationPolicy = (function() { - - /** - * Properties of a IPAllocationPolicy. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IIPAllocationPolicy - * @property {boolean|null} [useIpAliases] IPAllocationPolicy useIpAliases - * @property {string|null} [clusterSecondaryRangeName] IPAllocationPolicy clusterSecondaryRangeName - * @property {string|null} [clusterIpv4CidrBlock] IPAllocationPolicy clusterIpv4CidrBlock - * @property {string|null} [servicesSecondaryRangeName] IPAllocationPolicy servicesSecondaryRangeName - * @property {string|null} [servicesIpv4CidrBlock] IPAllocationPolicy servicesIpv4CidrBlock - */ - - /** - * Constructs a new IPAllocationPolicy. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a IPAllocationPolicy. - * @implements IIPAllocationPolicy - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy=} [properties] Properties to set - */ - function IPAllocationPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IPAllocationPolicy useIpAliases. - * @member {boolean} useIpAliases - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.useIpAliases = false; - - /** - * IPAllocationPolicy clusterSecondaryRangeName. - * @member {string|null|undefined} clusterSecondaryRangeName - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.clusterSecondaryRangeName = null; - - /** - * IPAllocationPolicy clusterIpv4CidrBlock. - * @member {string|null|undefined} clusterIpv4CidrBlock - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.clusterIpv4CidrBlock = null; - - /** - * IPAllocationPolicy servicesSecondaryRangeName. - * @member {string|null|undefined} servicesSecondaryRangeName - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.servicesSecondaryRangeName = null; - - /** - * IPAllocationPolicy servicesIpv4CidrBlock. - * @member {string|null|undefined} servicesIpv4CidrBlock - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.servicesIpv4CidrBlock = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * IPAllocationPolicy clusterIpAllocation. - * @member {"clusterSecondaryRangeName"|"clusterIpv4CidrBlock"|undefined} clusterIpAllocation - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @instance - */ - Object.defineProperty(IPAllocationPolicy.prototype, "clusterIpAllocation", { - get: $util.oneOfGetter($oneOfFields = ["clusterSecondaryRangeName", "clusterIpv4CidrBlock"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * IPAllocationPolicy servicesIpAllocation. - * @member {"servicesSecondaryRangeName"|"servicesIpv4CidrBlock"|undefined} servicesIpAllocation - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @instance - */ - Object.defineProperty(IPAllocationPolicy.prototype, "servicesIpAllocation", { - get: $util.oneOfGetter($oneOfFields = ["servicesSecondaryRangeName", "servicesIpv4CidrBlock"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new IPAllocationPolicy instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} IPAllocationPolicy instance - */ - IPAllocationPolicy.create = function create(properties) { - return new IPAllocationPolicy(properties); - }; - - /** - * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IPAllocationPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.useIpAliases != null && Object.hasOwnProperty.call(message, "useIpAliases")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useIpAliases); - if (message.clusterSecondaryRangeName != null && Object.hasOwnProperty.call(message, "clusterSecondaryRangeName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterSecondaryRangeName); - if (message.servicesSecondaryRangeName != null && Object.hasOwnProperty.call(message, "servicesSecondaryRangeName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.servicesSecondaryRangeName); - if (message.clusterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "clusterIpv4CidrBlock")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterIpv4CidrBlock); - if (message.servicesIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "servicesIpv4CidrBlock")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.servicesIpv4CidrBlock); - return writer; - }; - - /** - * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IPAllocationPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a IPAllocationPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} IPAllocationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IPAllocationPolicy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.useIpAliases = reader.bool(); - break; - } - case 2: { - message.clusterSecondaryRangeName = reader.string(); - break; - } - case 4: { - message.clusterIpv4CidrBlock = reader.string(); - break; - } - case 3: { - message.servicesSecondaryRangeName = reader.string(); - break; - } - case 5: { - message.servicesIpv4CidrBlock = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} IPAllocationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IPAllocationPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a IPAllocationPolicy message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IPAllocationPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) - if (typeof message.useIpAliases !== "boolean") - return "useIpAliases: boolean expected"; - if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) { - properties.clusterIpAllocation = 1; - if (!$util.isString(message.clusterSecondaryRangeName)) - return "clusterSecondaryRangeName: string expected"; - } - if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) { - if (properties.clusterIpAllocation === 1) - return "clusterIpAllocation: multiple values"; - properties.clusterIpAllocation = 1; - if (!$util.isString(message.clusterIpv4CidrBlock)) - return "clusterIpv4CidrBlock: string expected"; - } - if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) { - properties.servicesIpAllocation = 1; - if (!$util.isString(message.servicesSecondaryRangeName)) - return "servicesSecondaryRangeName: string expected"; - } - if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) { - if (properties.servicesIpAllocation === 1) - return "servicesIpAllocation: multiple values"; - properties.servicesIpAllocation = 1; - if (!$util.isString(message.servicesIpv4CidrBlock)) - return "servicesIpv4CidrBlock: string expected"; - } - return null; - }; - - /** - * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} IPAllocationPolicy - */ - IPAllocationPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy(); - if (object.useIpAliases != null) - message.useIpAliases = Boolean(object.useIpAliases); - if (object.clusterSecondaryRangeName != null) - message.clusterSecondaryRangeName = String(object.clusterSecondaryRangeName); - if (object.clusterIpv4CidrBlock != null) - message.clusterIpv4CidrBlock = String(object.clusterIpv4CidrBlock); - if (object.servicesSecondaryRangeName != null) - message.servicesSecondaryRangeName = String(object.servicesSecondaryRangeName); - if (object.servicesIpv4CidrBlock != null) - message.servicesIpv4CidrBlock = String(object.servicesIpv4CidrBlock); - return message; - }; - - /** - * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy} message IPAllocationPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IPAllocationPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.useIpAliases = false; - if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) - object.useIpAliases = message.useIpAliases; - if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) { - object.clusterSecondaryRangeName = message.clusterSecondaryRangeName; - if (options.oneofs) - object.clusterIpAllocation = "clusterSecondaryRangeName"; - } - if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) { - object.servicesSecondaryRangeName = message.servicesSecondaryRangeName; - if (options.oneofs) - object.servicesIpAllocation = "servicesSecondaryRangeName"; - } - if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) { - object.clusterIpv4CidrBlock = message.clusterIpv4CidrBlock; - if (options.oneofs) - object.clusterIpAllocation = "clusterIpv4CidrBlock"; - } - if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) { - object.servicesIpv4CidrBlock = message.servicesIpv4CidrBlock; - if (options.oneofs) - object.servicesIpAllocation = "servicesIpv4CidrBlock"; - } - return object; - }; - - /** - * Converts this IPAllocationPolicy to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @instance - * @returns {Object.} JSON object - */ - IPAllocationPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IPAllocationPolicy - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IPAllocationPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy"; - }; - - return IPAllocationPolicy; - })(); - - v1.NodeConfig = (function() { - - /** - * Properties of a NodeConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface INodeConfig - * @property {string|null} [location] NodeConfig location - * @property {string|null} [machineType] NodeConfig machineType - * @property {string|null} [network] NodeConfig network - * @property {string|null} [subnetwork] NodeConfig subnetwork - * @property {number|null} [diskSizeGb] NodeConfig diskSizeGb - * @property {Array.|null} [oauthScopes] NodeConfig oauthScopes - * @property {string|null} [serviceAccount] NodeConfig serviceAccount - * @property {Array.|null} [tags] NodeConfig tags - * @property {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy|null} [ipAllocationPolicy] NodeConfig ipAllocationPolicy - * @property {boolean|null} [enableIpMasqAgent] NodeConfig enableIpMasqAgent - * @property {string|null} [composerNetworkAttachment] NodeConfig composerNetworkAttachment - * @property {string|null} [composerInternalIpv4CidrBlock] NodeConfig composerInternalIpv4CidrBlock - */ - - /** - * Constructs a new NodeConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a NodeConfig. - * @implements INodeConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.INodeConfig=} [properties] Properties to set - */ - function NodeConfig(properties) { - this.oauthScopes = []; - this.tags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeConfig location. - * @member {string} location - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.location = ""; - - /** - * NodeConfig machineType. - * @member {string} machineType - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.machineType = ""; - - /** - * NodeConfig network. - * @member {string} network - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.network = ""; - - /** - * NodeConfig subnetwork. - * @member {string} subnetwork - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.subnetwork = ""; - - /** - * NodeConfig diskSizeGb. - * @member {number} diskSizeGb - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.diskSizeGb = 0; - - /** - * NodeConfig oauthScopes. - * @member {Array.} oauthScopes - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.oauthScopes = $util.emptyArray; - - /** - * NodeConfig serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.serviceAccount = ""; - - /** - * NodeConfig tags. - * @member {Array.} tags - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.tags = $util.emptyArray; - - /** - * NodeConfig ipAllocationPolicy. - * @member {google.cloud.orchestration.airflow.service.v1.IIPAllocationPolicy|null|undefined} ipAllocationPolicy - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.ipAllocationPolicy = null; - - /** - * NodeConfig enableIpMasqAgent. - * @member {boolean} enableIpMasqAgent - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.enableIpMasqAgent = false; - - /** - * NodeConfig composerNetworkAttachment. - * @member {string} composerNetworkAttachment - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.composerNetworkAttachment = ""; - - /** - * NodeConfig composerInternalIpv4CidrBlock. - * @member {string} composerInternalIpv4CidrBlock - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @instance - */ - NodeConfig.prototype.composerInternalIpv4CidrBlock = ""; - - /** - * Creates a new NodeConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.INodeConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.NodeConfig} NodeConfig instance - */ - NodeConfig.create = function create(properties) { - return new NodeConfig(properties); - }; - - /** - * Encodes the specified NodeConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NodeConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.INodeConfig} message NodeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.machineType); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.network); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.subnetwork); - if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.diskSizeGb); - if (message.oauthScopes != null && message.oauthScopes.length) - for (var i = 0; i < message.oauthScopes.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.oauthScopes[i]); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.serviceAccount); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.tags[i]); - if (message.ipAllocationPolicy != null && Object.hasOwnProperty.call(message, "ipAllocationPolicy")) - $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.encode(message.ipAllocationPolicy, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.enableIpMasqAgent != null && Object.hasOwnProperty.call(message, "enableIpMasqAgent")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enableIpMasqAgent); - if (message.composerNetworkAttachment != null && Object.hasOwnProperty.call(message, "composerNetworkAttachment")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.composerNetworkAttachment); - if (message.composerInternalIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "composerInternalIpv4CidrBlock")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.composerInternalIpv4CidrBlock); - return writer; - }; - - /** - * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NodeConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.INodeConfig} message NodeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.NodeConfig} NodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.NodeConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.location = reader.string(); - break; - } - case 2: { - message.machineType = reader.string(); - break; - } - case 3: { - message.network = reader.string(); - break; - } - case 4: { - message.subnetwork = reader.string(); - break; - } - case 5: { - message.diskSizeGb = reader.int32(); - break; - } - case 6: { - if (!(message.oauthScopes && message.oauthScopes.length)) - message.oauthScopes = []; - message.oauthScopes.push(reader.string()); - break; - } - case 7: { - message.serviceAccount = reader.string(); - break; - } - case 8: { - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - } - case 9: { - message.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.decode(reader, reader.uint32()); - break; - } - case 11: { - message.enableIpMasqAgent = reader.bool(); - break; - } - case 12: { - message.composerNetworkAttachment = reader.string(); - break; - } - case 13: { - message.composerInternalIpv4CidrBlock = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.NodeConfig} NodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.machineType != null && message.hasOwnProperty("machineType")) - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - if (!$util.isInteger(message.diskSizeGb)) - return "diskSizeGb: integer expected"; - if (message.oauthScopes != null && message.hasOwnProperty("oauthScopes")) { - if (!Array.isArray(message.oauthScopes)) - return "oauthScopes: array expected"; - for (var i = 0; i < message.oauthScopes.length; ++i) - if (!$util.isString(message.oauthScopes[i])) - return "oauthScopes: string[] expected"; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!Array.isArray(message.tags)) - return "tags: array expected"; - for (var i = 0; i < message.tags.length; ++i) - if (!$util.isString(message.tags[i])) - return "tags: string[] expected"; - } - if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.verify(message.ipAllocationPolicy); - if (error) - return "ipAllocationPolicy." + error; - } - if (message.enableIpMasqAgent != null && message.hasOwnProperty("enableIpMasqAgent")) - if (typeof message.enableIpMasqAgent !== "boolean") - return "enableIpMasqAgent: boolean expected"; - if (message.composerNetworkAttachment != null && message.hasOwnProperty("composerNetworkAttachment")) - if (!$util.isString(message.composerNetworkAttachment)) - return "composerNetworkAttachment: string expected"; - if (message.composerInternalIpv4CidrBlock != null && message.hasOwnProperty("composerInternalIpv4CidrBlock")) - if (!$util.isString(message.composerInternalIpv4CidrBlock)) - return "composerInternalIpv4CidrBlock: string expected"; - return null; - }; - - /** - * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.NodeConfig} NodeConfig - */ - NodeConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.NodeConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.NodeConfig(); - if (object.location != null) - message.location = String(object.location); - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.network != null) - message.network = String(object.network); - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - if (object.diskSizeGb != null) - message.diskSizeGb = object.diskSizeGb | 0; - if (object.oauthScopes) { - if (!Array.isArray(object.oauthScopes)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1.NodeConfig.oauthScopes: array expected"); - message.oauthScopes = []; - for (var i = 0; i < object.oauthScopes.length; ++i) - message.oauthScopes[i] = String(object.oauthScopes[i]); - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1.NodeConfig.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) - message.tags[i] = String(object.tags[i]); - } - if (object.ipAllocationPolicy != null) { - if (typeof object.ipAllocationPolicy !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.NodeConfig.ipAllocationPolicy: object expected"); - message.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.fromObject(object.ipAllocationPolicy); - } - if (object.enableIpMasqAgent != null) - message.enableIpMasqAgent = Boolean(object.enableIpMasqAgent); - if (object.composerNetworkAttachment != null) - message.composerNetworkAttachment = String(object.composerNetworkAttachment); - if (object.composerInternalIpv4CidrBlock != null) - message.composerInternalIpv4CidrBlock = String(object.composerInternalIpv4CidrBlock); - return message; - }; - - /** - * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.NodeConfig} message NodeConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.oauthScopes = []; - object.tags = []; - } - if (options.defaults) { - object.location = ""; - object.machineType = ""; - object.network = ""; - object.subnetwork = ""; - object.diskSizeGb = 0; - object.serviceAccount = ""; - object.ipAllocationPolicy = null; - object.enableIpMasqAgent = false; - object.composerNetworkAttachment = ""; - object.composerInternalIpv4CidrBlock = ""; - } - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = message.machineType; - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - object.subnetwork = message.subnetwork; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - object.diskSizeGb = message.diskSizeGb; - if (message.oauthScopes && message.oauthScopes.length) { - object.oauthScopes = []; - for (var j = 0; j < message.oauthScopes.length; ++j) - object.oauthScopes[j] = message.oauthScopes[j]; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = message.tags[j]; - } - if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) - object.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1.IPAllocationPolicy.toObject(message.ipAllocationPolicy, options); - if (message.enableIpMasqAgent != null && message.hasOwnProperty("enableIpMasqAgent")) - object.enableIpMasqAgent = message.enableIpMasqAgent; - if (message.composerNetworkAttachment != null && message.hasOwnProperty("composerNetworkAttachment")) - object.composerNetworkAttachment = message.composerNetworkAttachment; - if (message.composerInternalIpv4CidrBlock != null && message.hasOwnProperty("composerInternalIpv4CidrBlock")) - object.composerInternalIpv4CidrBlock = message.composerInternalIpv4CidrBlock; - return object; - }; - - /** - * Converts this NodeConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @instance - * @returns {Object.} JSON object - */ - NodeConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.NodeConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.NodeConfig"; - }; - - return NodeConfig; - })(); - - v1.PrivateClusterConfig = (function() { - - /** - * Properties of a PrivateClusterConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IPrivateClusterConfig - * @property {boolean|null} [enablePrivateEndpoint] PrivateClusterConfig enablePrivateEndpoint - * @property {string|null} [masterIpv4CidrBlock] PrivateClusterConfig masterIpv4CidrBlock - * @property {string|null} [masterIpv4ReservedRange] PrivateClusterConfig masterIpv4ReservedRange - */ - - /** - * Constructs a new PrivateClusterConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a PrivateClusterConfig. - * @implements IPrivateClusterConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig=} [properties] Properties to set - */ - function PrivateClusterConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PrivateClusterConfig enablePrivateEndpoint. - * @member {boolean} enablePrivateEndpoint - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.enablePrivateEndpoint = false; - - /** - * PrivateClusterConfig masterIpv4CidrBlock. - * @member {string} masterIpv4CidrBlock - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.masterIpv4CidrBlock = ""; - - /** - * PrivateClusterConfig masterIpv4ReservedRange. - * @member {string} masterIpv4ReservedRange - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.masterIpv4ReservedRange = ""; - - /** - * Creates a new PrivateClusterConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} PrivateClusterConfig instance - */ - PrivateClusterConfig.create = function create(properties) { - return new PrivateClusterConfig(properties); - }; - - /** - * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateClusterConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enablePrivateEndpoint != null && Object.hasOwnProperty.call(message, "enablePrivateEndpoint")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePrivateEndpoint); - if (message.masterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "masterIpv4CidrBlock")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.masterIpv4CidrBlock); - if (message.masterIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "masterIpv4ReservedRange")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.masterIpv4ReservedRange); - return writer; - }; - - /** - * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateClusterConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrivateClusterConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} PrivateClusterConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateClusterConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enablePrivateEndpoint = reader.bool(); - break; - } - case 2: { - message.masterIpv4CidrBlock = reader.string(); - break; - } - case 3: { - message.masterIpv4ReservedRange = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} PrivateClusterConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateClusterConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrivateClusterConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrivateClusterConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) - if (typeof message.enablePrivateEndpoint !== "boolean") - return "enablePrivateEndpoint: boolean expected"; - if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) - if (!$util.isString(message.masterIpv4CidrBlock)) - return "masterIpv4CidrBlock: string expected"; - if (message.masterIpv4ReservedRange != null && message.hasOwnProperty("masterIpv4ReservedRange")) - if (!$util.isString(message.masterIpv4ReservedRange)) - return "masterIpv4ReservedRange: string expected"; - return null; - }; - - /** - * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} PrivateClusterConfig - */ - PrivateClusterConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig(); - if (object.enablePrivateEndpoint != null) - message.enablePrivateEndpoint = Boolean(object.enablePrivateEndpoint); - if (object.masterIpv4CidrBlock != null) - message.masterIpv4CidrBlock = String(object.masterIpv4CidrBlock); - if (object.masterIpv4ReservedRange != null) - message.masterIpv4ReservedRange = String(object.masterIpv4ReservedRange); - return message; - }; - - /** - * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig} message PrivateClusterConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrivateClusterConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enablePrivateEndpoint = false; - object.masterIpv4CidrBlock = ""; - object.masterIpv4ReservedRange = ""; - } - if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) - object.enablePrivateEndpoint = message.enablePrivateEndpoint; - if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) - object.masterIpv4CidrBlock = message.masterIpv4CidrBlock; - if (message.masterIpv4ReservedRange != null && message.hasOwnProperty("masterIpv4ReservedRange")) - object.masterIpv4ReservedRange = message.masterIpv4ReservedRange; - return object; - }; - - /** - * Converts this PrivateClusterConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig - * @instance - * @returns {Object.} JSON object - */ - PrivateClusterConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PrivateClusterConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PrivateClusterConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig"; - }; - - return PrivateClusterConfig; - })(); - - v1.NetworkingConfig = (function() { - - /** - * Properties of a NetworkingConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface INetworkingConfig - * @property {google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType|null} [connectionType] NetworkingConfig connectionType - */ - - /** - * Constructs a new NetworkingConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a NetworkingConfig. - * @implements INetworkingConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.INetworkingConfig=} [properties] Properties to set - */ - function NetworkingConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkingConfig connectionType. - * @member {google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType} connectionType - * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig - * @instance - */ - NetworkingConfig.prototype.connectionType = 0; - - /** - * Creates a new NetworkingConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.INetworkingConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.NetworkingConfig} NetworkingConfig instance - */ - NetworkingConfig.create = function create(properties) { - return new NetworkingConfig(properties); - }; - - /** - * Encodes the specified NetworkingConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NetworkingConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.INetworkingConfig} message NetworkingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connectionType != null && Object.hasOwnProperty.call(message, "connectionType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.connectionType); - return writer; - }; - - /** - * Encodes the specified NetworkingConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.NetworkingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.INetworkingConfig} message NetworkingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.NetworkingConfig} NetworkingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkingConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.connectionType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.NetworkingConfig} NetworkingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkingConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkingConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connectionType != null && message.hasOwnProperty("connectionType")) - switch (message.connectionType) { - default: - return "connectionType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a NetworkingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.NetworkingConfig} NetworkingConfig - */ - NetworkingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig(); - switch (object.connectionType) { - default: - if (typeof object.connectionType === "number") { - message.connectionType = object.connectionType; - break; - } - break; - case "CONNECTION_TYPE_UNSPECIFIED": - case 0: - message.connectionType = 0; - break; - case "VPC_PEERING": - case 1: - message.connectionType = 1; - break; - case "PRIVATE_SERVICE_CONNECT": - case 2: - message.connectionType = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a NetworkingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.NetworkingConfig} message NetworkingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkingConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.connectionType = options.enums === String ? "CONNECTION_TYPE_UNSPECIFIED" : 0; - if (message.connectionType != null && message.hasOwnProperty("connectionType")) - object.connectionType = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType[message.connectionType] === undefined ? message.connectionType : $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType[message.connectionType] : message.connectionType; - return object; - }; - - /** - * Converts this NetworkingConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig - * @instance - * @returns {Object.} JSON object - */ - NetworkingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkingConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.NetworkingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.NetworkingConfig"; - }; - - /** - * ConnectionType enum. - * @name google.cloud.orchestration.airflow.service.v1.NetworkingConfig.ConnectionType - * @enum {number} - * @property {number} CONNECTION_TYPE_UNSPECIFIED=0 CONNECTION_TYPE_UNSPECIFIED value - * @property {number} VPC_PEERING=1 VPC_PEERING value - * @property {number} PRIVATE_SERVICE_CONNECT=2 PRIVATE_SERVICE_CONNECT value - */ - NetworkingConfig.ConnectionType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONNECTION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VPC_PEERING"] = 1; - values[valuesById[2] = "PRIVATE_SERVICE_CONNECT"] = 2; - return values; - })(); - - return NetworkingConfig; - })(); - - v1.PrivateEnvironmentConfig = (function() { - - /** - * Properties of a PrivateEnvironmentConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IPrivateEnvironmentConfig - * @property {boolean|null} [enablePrivateEnvironment] PrivateEnvironmentConfig enablePrivateEnvironment - * @property {boolean|null} [enablePrivateBuildsOnly] PrivateEnvironmentConfig enablePrivateBuildsOnly - * @property {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig|null} [privateClusterConfig] PrivateEnvironmentConfig privateClusterConfig - * @property {string|null} [webServerIpv4CidrBlock] PrivateEnvironmentConfig webServerIpv4CidrBlock - * @property {string|null} [cloudSqlIpv4CidrBlock] PrivateEnvironmentConfig cloudSqlIpv4CidrBlock - * @property {string|null} [webServerIpv4ReservedRange] PrivateEnvironmentConfig webServerIpv4ReservedRange - * @property {string|null} [cloudComposerNetworkIpv4CidrBlock] PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock - * @property {string|null} [cloudComposerNetworkIpv4ReservedRange] PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange - * @property {boolean|null} [enablePrivatelyUsedPublicIps] PrivateEnvironmentConfig enablePrivatelyUsedPublicIps - * @property {string|null} [cloudComposerConnectionSubnetwork] PrivateEnvironmentConfig cloudComposerConnectionSubnetwork - * @property {google.cloud.orchestration.airflow.service.v1.INetworkingConfig|null} [networkingConfig] PrivateEnvironmentConfig networkingConfig - */ - - /** - * Constructs a new PrivateEnvironmentConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a PrivateEnvironmentConfig. - * @implements IPrivateEnvironmentConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig=} [properties] Properties to set - */ - function PrivateEnvironmentConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PrivateEnvironmentConfig enablePrivateEnvironment. - * @member {boolean} enablePrivateEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.enablePrivateEnvironment = false; - - /** - * PrivateEnvironmentConfig enablePrivateBuildsOnly. - * @member {boolean} enablePrivateBuildsOnly - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.enablePrivateBuildsOnly = false; - - /** - * PrivateEnvironmentConfig privateClusterConfig. - * @member {google.cloud.orchestration.airflow.service.v1.IPrivateClusterConfig|null|undefined} privateClusterConfig - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.privateClusterConfig = null; - - /** - * PrivateEnvironmentConfig webServerIpv4CidrBlock. - * @member {string} webServerIpv4CidrBlock - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.webServerIpv4CidrBlock = ""; - - /** - * PrivateEnvironmentConfig cloudSqlIpv4CidrBlock. - * @member {string} cloudSqlIpv4CidrBlock - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.cloudSqlIpv4CidrBlock = ""; - - /** - * PrivateEnvironmentConfig webServerIpv4ReservedRange. - * @member {string} webServerIpv4ReservedRange - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.webServerIpv4ReservedRange = ""; - - /** - * PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock. - * @member {string} cloudComposerNetworkIpv4CidrBlock - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.cloudComposerNetworkIpv4CidrBlock = ""; - - /** - * PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange. - * @member {string} cloudComposerNetworkIpv4ReservedRange - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.cloudComposerNetworkIpv4ReservedRange = ""; - - /** - * PrivateEnvironmentConfig enablePrivatelyUsedPublicIps. - * @member {boolean} enablePrivatelyUsedPublicIps - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.enablePrivatelyUsedPublicIps = false; - - /** - * PrivateEnvironmentConfig cloudComposerConnectionSubnetwork. - * @member {string} cloudComposerConnectionSubnetwork - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.cloudComposerConnectionSubnetwork = ""; - - /** - * PrivateEnvironmentConfig networkingConfig. - * @member {google.cloud.orchestration.airflow.service.v1.INetworkingConfig|null|undefined} networkingConfig - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.networkingConfig = null; - - /** - * Creates a new PrivateEnvironmentConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} PrivateEnvironmentConfig instance - */ - PrivateEnvironmentConfig.create = function create(properties) { - return new PrivateEnvironmentConfig(properties); - }; - - /** - * Encodes the specified PrivateEnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig} message PrivateEnvironmentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateEnvironmentConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enablePrivateEnvironment != null && Object.hasOwnProperty.call(message, "enablePrivateEnvironment")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePrivateEnvironment); - if (message.privateClusterConfig != null && Object.hasOwnProperty.call(message, "privateClusterConfig")) - $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.encode(message.privateClusterConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.webServerIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "webServerIpv4CidrBlock")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.webServerIpv4CidrBlock); - if (message.cloudSqlIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "cloudSqlIpv4CidrBlock")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.cloudSqlIpv4CidrBlock); - if (message.webServerIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "webServerIpv4ReservedRange")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.webServerIpv4ReservedRange); - if (message.enablePrivatelyUsedPublicIps != null && Object.hasOwnProperty.call(message, "enablePrivatelyUsedPublicIps")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.enablePrivatelyUsedPublicIps); - if (message.cloudComposerNetworkIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "cloudComposerNetworkIpv4CidrBlock")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.cloudComposerNetworkIpv4CidrBlock); - if (message.cloudComposerNetworkIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "cloudComposerNetworkIpv4ReservedRange")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.cloudComposerNetworkIpv4ReservedRange); - if (message.cloudComposerConnectionSubnetwork != null && Object.hasOwnProperty.call(message, "cloudComposerConnectionSubnetwork")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.cloudComposerConnectionSubnetwork); - if (message.networkingConfig != null && Object.hasOwnProperty.call(message, "networkingConfig")) - $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig.encode(message.networkingConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.enablePrivateBuildsOnly != null && Object.hasOwnProperty.call(message, "enablePrivateBuildsOnly")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enablePrivateBuildsOnly); - return writer; - }; - - /** - * Encodes the specified PrivateEnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IPrivateEnvironmentConfig} message PrivateEnvironmentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateEnvironmentConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} PrivateEnvironmentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateEnvironmentConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enablePrivateEnvironment = reader.bool(); - break; - } - case 11: { - message.enablePrivateBuildsOnly = reader.bool(); - break; - } - case 2: { - message.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.webServerIpv4CidrBlock = reader.string(); - break; - } - case 4: { - message.cloudSqlIpv4CidrBlock = reader.string(); - break; - } - case 5: { - message.webServerIpv4ReservedRange = reader.string(); - break; - } - case 7: { - message.cloudComposerNetworkIpv4CidrBlock = reader.string(); - break; - } - case 8: { - message.cloudComposerNetworkIpv4ReservedRange = reader.string(); - break; - } - case 6: { - message.enablePrivatelyUsedPublicIps = reader.bool(); - break; - } - case 9: { - message.cloudComposerConnectionSubnetwork = reader.string(); - break; - } - case 10: { - message.networkingConfig = $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} PrivateEnvironmentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateEnvironmentConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrivateEnvironmentConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrivateEnvironmentConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enablePrivateEnvironment != null && message.hasOwnProperty("enablePrivateEnvironment")) - if (typeof message.enablePrivateEnvironment !== "boolean") - return "enablePrivateEnvironment: boolean expected"; - if (message.enablePrivateBuildsOnly != null && message.hasOwnProperty("enablePrivateBuildsOnly")) - if (typeof message.enablePrivateBuildsOnly !== "boolean") - return "enablePrivateBuildsOnly: boolean expected"; - if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.verify(message.privateClusterConfig); - if (error) - return "privateClusterConfig." + error; - } - if (message.webServerIpv4CidrBlock != null && message.hasOwnProperty("webServerIpv4CidrBlock")) - if (!$util.isString(message.webServerIpv4CidrBlock)) - return "webServerIpv4CidrBlock: string expected"; - if (message.cloudSqlIpv4CidrBlock != null && message.hasOwnProperty("cloudSqlIpv4CidrBlock")) - if (!$util.isString(message.cloudSqlIpv4CidrBlock)) - return "cloudSqlIpv4CidrBlock: string expected"; - if (message.webServerIpv4ReservedRange != null && message.hasOwnProperty("webServerIpv4ReservedRange")) - if (!$util.isString(message.webServerIpv4ReservedRange)) - return "webServerIpv4ReservedRange: string expected"; - if (message.cloudComposerNetworkIpv4CidrBlock != null && message.hasOwnProperty("cloudComposerNetworkIpv4CidrBlock")) - if (!$util.isString(message.cloudComposerNetworkIpv4CidrBlock)) - return "cloudComposerNetworkIpv4CidrBlock: string expected"; - if (message.cloudComposerNetworkIpv4ReservedRange != null && message.hasOwnProperty("cloudComposerNetworkIpv4ReservedRange")) - if (!$util.isString(message.cloudComposerNetworkIpv4ReservedRange)) - return "cloudComposerNetworkIpv4ReservedRange: string expected"; - if (message.enablePrivatelyUsedPublicIps != null && message.hasOwnProperty("enablePrivatelyUsedPublicIps")) - if (typeof message.enablePrivatelyUsedPublicIps !== "boolean") - return "enablePrivatelyUsedPublicIps: boolean expected"; - if (message.cloudComposerConnectionSubnetwork != null && message.hasOwnProperty("cloudComposerConnectionSubnetwork")) - if (!$util.isString(message.cloudComposerConnectionSubnetwork)) - return "cloudComposerConnectionSubnetwork: string expected"; - if (message.networkingConfig != null && message.hasOwnProperty("networkingConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig.verify(message.networkingConfig); - if (error) - return "networkingConfig." + error; - } - return null; - }; - - /** - * Creates a PrivateEnvironmentConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} PrivateEnvironmentConfig - */ - PrivateEnvironmentConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig(); - if (object.enablePrivateEnvironment != null) - message.enablePrivateEnvironment = Boolean(object.enablePrivateEnvironment); - if (object.enablePrivateBuildsOnly != null) - message.enablePrivateBuildsOnly = Boolean(object.enablePrivateBuildsOnly); - if (object.privateClusterConfig != null) { - if (typeof object.privateClusterConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.privateClusterConfig: object expected"); - message.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.fromObject(object.privateClusterConfig); - } - if (object.webServerIpv4CidrBlock != null) - message.webServerIpv4CidrBlock = String(object.webServerIpv4CidrBlock); - if (object.cloudSqlIpv4CidrBlock != null) - message.cloudSqlIpv4CidrBlock = String(object.cloudSqlIpv4CidrBlock); - if (object.webServerIpv4ReservedRange != null) - message.webServerIpv4ReservedRange = String(object.webServerIpv4ReservedRange); - if (object.cloudComposerNetworkIpv4CidrBlock != null) - message.cloudComposerNetworkIpv4CidrBlock = String(object.cloudComposerNetworkIpv4CidrBlock); - if (object.cloudComposerNetworkIpv4ReservedRange != null) - message.cloudComposerNetworkIpv4ReservedRange = String(object.cloudComposerNetworkIpv4ReservedRange); - if (object.enablePrivatelyUsedPublicIps != null) - message.enablePrivatelyUsedPublicIps = Boolean(object.enablePrivatelyUsedPublicIps); - if (object.cloudComposerConnectionSubnetwork != null) - message.cloudComposerConnectionSubnetwork = String(object.cloudComposerConnectionSubnetwork); - if (object.networkingConfig != null) { - if (typeof object.networkingConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig.networkingConfig: object expected"); - message.networkingConfig = $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig.fromObject(object.networkingConfig); - } - return message; - }; - - /** - * Creates a plain object from a PrivateEnvironmentConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig} message PrivateEnvironmentConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrivateEnvironmentConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enablePrivateEnvironment = false; - object.privateClusterConfig = null; - object.webServerIpv4CidrBlock = ""; - object.cloudSqlIpv4CidrBlock = ""; - object.webServerIpv4ReservedRange = ""; - object.enablePrivatelyUsedPublicIps = false; - object.cloudComposerNetworkIpv4CidrBlock = ""; - object.cloudComposerNetworkIpv4ReservedRange = ""; - object.cloudComposerConnectionSubnetwork = ""; - object.networkingConfig = null; - object.enablePrivateBuildsOnly = false; - } - if (message.enablePrivateEnvironment != null && message.hasOwnProperty("enablePrivateEnvironment")) - object.enablePrivateEnvironment = message.enablePrivateEnvironment; - if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) - object.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1.PrivateClusterConfig.toObject(message.privateClusterConfig, options); - if (message.webServerIpv4CidrBlock != null && message.hasOwnProperty("webServerIpv4CidrBlock")) - object.webServerIpv4CidrBlock = message.webServerIpv4CidrBlock; - if (message.cloudSqlIpv4CidrBlock != null && message.hasOwnProperty("cloudSqlIpv4CidrBlock")) - object.cloudSqlIpv4CidrBlock = message.cloudSqlIpv4CidrBlock; - if (message.webServerIpv4ReservedRange != null && message.hasOwnProperty("webServerIpv4ReservedRange")) - object.webServerIpv4ReservedRange = message.webServerIpv4ReservedRange; - if (message.enablePrivatelyUsedPublicIps != null && message.hasOwnProperty("enablePrivatelyUsedPublicIps")) - object.enablePrivatelyUsedPublicIps = message.enablePrivatelyUsedPublicIps; - if (message.cloudComposerNetworkIpv4CidrBlock != null && message.hasOwnProperty("cloudComposerNetworkIpv4CidrBlock")) - object.cloudComposerNetworkIpv4CidrBlock = message.cloudComposerNetworkIpv4CidrBlock; - if (message.cloudComposerNetworkIpv4ReservedRange != null && message.hasOwnProperty("cloudComposerNetworkIpv4ReservedRange")) - object.cloudComposerNetworkIpv4ReservedRange = message.cloudComposerNetworkIpv4ReservedRange; - if (message.cloudComposerConnectionSubnetwork != null && message.hasOwnProperty("cloudComposerConnectionSubnetwork")) - object.cloudComposerConnectionSubnetwork = message.cloudComposerConnectionSubnetwork; - if (message.networkingConfig != null && message.hasOwnProperty("networkingConfig")) - object.networkingConfig = $root.google.cloud.orchestration.airflow.service.v1.NetworkingConfig.toObject(message.networkingConfig, options); - if (message.enablePrivateBuildsOnly != null && message.hasOwnProperty("enablePrivateBuildsOnly")) - object.enablePrivateBuildsOnly = message.enablePrivateBuildsOnly; - return object; - }; - - /** - * Converts this PrivateEnvironmentConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @instance - * @returns {Object.} JSON object - */ - PrivateEnvironmentConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PrivateEnvironmentConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PrivateEnvironmentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.PrivateEnvironmentConfig"; - }; - - return PrivateEnvironmentConfig; - })(); - - v1.WorkloadsConfig = (function() { - - /** - * Properties of a WorkloadsConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IWorkloadsConfig - * @property {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource|null} [scheduler] WorkloadsConfig scheduler - * @property {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource|null} [webServer] WorkloadsConfig webServer - * @property {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource|null} [worker] WorkloadsConfig worker - * @property {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource|null} [triggerer] WorkloadsConfig triggerer - * @property {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource|null} [dagProcessor] WorkloadsConfig dagProcessor - */ - - /** - * Constructs a new WorkloadsConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a WorkloadsConfig. - * @implements IWorkloadsConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig=} [properties] Properties to set - */ - function WorkloadsConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkloadsConfig scheduler. - * @member {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource|null|undefined} scheduler - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @instance - */ - WorkloadsConfig.prototype.scheduler = null; - - /** - * WorkloadsConfig webServer. - * @member {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource|null|undefined} webServer - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @instance - */ - WorkloadsConfig.prototype.webServer = null; - - /** - * WorkloadsConfig worker. - * @member {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource|null|undefined} worker - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @instance - */ - WorkloadsConfig.prototype.worker = null; - - /** - * WorkloadsConfig triggerer. - * @member {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource|null|undefined} triggerer - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @instance - */ - WorkloadsConfig.prototype.triggerer = null; - - /** - * WorkloadsConfig dagProcessor. - * @member {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource|null|undefined} dagProcessor - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @instance - */ - WorkloadsConfig.prototype.dagProcessor = null; - - /** - * Creates a new WorkloadsConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig} WorkloadsConfig instance - */ - WorkloadsConfig.create = function create(properties) { - return new WorkloadsConfig(properties); - }; - - /** - * Encodes the specified WorkloadsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig} message WorkloadsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadsConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scheduler != null && Object.hasOwnProperty.call(message, "scheduler")) - $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.encode(message.scheduler, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.webServer != null && Object.hasOwnProperty.call(message, "webServer")) - $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.encode(message.webServer, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.worker != null && Object.hasOwnProperty.call(message, "worker")) - $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.encode(message.worker, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.triggerer != null && Object.hasOwnProperty.call(message, "triggerer")) - $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.encode(message.triggerer, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.dagProcessor != null && Object.hasOwnProperty.call(message, "dagProcessor")) - $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.encode(message.dagProcessor, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WorkloadsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IWorkloadsConfig} message WorkloadsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkloadsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig} WorkloadsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadsConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.scheduler = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.decode(reader, reader.uint32()); - break; - } - case 2: { - message.webServer = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.decode(reader, reader.uint32()); - break; - } - case 3: { - message.worker = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.decode(reader, reader.uint32()); - break; - } - case 4: { - message.triggerer = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.decode(reader, reader.uint32()); - break; - } - case 5: { - message.dagProcessor = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkloadsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig} WorkloadsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkloadsConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkloadsConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scheduler != null && message.hasOwnProperty("scheduler")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.verify(message.scheduler); - if (error) - return "scheduler." + error; - } - if (message.webServer != null && message.hasOwnProperty("webServer")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.verify(message.webServer); - if (error) - return "webServer." + error; - } - if (message.worker != null && message.hasOwnProperty("worker")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.verify(message.worker); - if (error) - return "worker." + error; - } - if (message.triggerer != null && message.hasOwnProperty("triggerer")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.verify(message.triggerer); - if (error) - return "triggerer." + error; - } - if (message.dagProcessor != null && message.hasOwnProperty("dagProcessor")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.verify(message.dagProcessor); - if (error) - return "dagProcessor." + error; - } - return null; - }; - - /** - * Creates a WorkloadsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig} WorkloadsConfig - */ - WorkloadsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig(); - if (object.scheduler != null) { - if (typeof object.scheduler !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.scheduler: object expected"); - message.scheduler = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.fromObject(object.scheduler); - } - if (object.webServer != null) { - if (typeof object.webServer !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.webServer: object expected"); - message.webServer = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.fromObject(object.webServer); - } - if (object.worker != null) { - if (typeof object.worker !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.worker: object expected"); - message.worker = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.fromObject(object.worker); - } - if (object.triggerer != null) { - if (typeof object.triggerer !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.triggerer: object expected"); - message.triggerer = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.fromObject(object.triggerer); - } - if (object.dagProcessor != null) { - if (typeof object.dagProcessor !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.dagProcessor: object expected"); - message.dagProcessor = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.fromObject(object.dagProcessor); - } - return message; - }; - - /** - * Creates a plain object from a WorkloadsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig} message WorkloadsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkloadsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.scheduler = null; - object.webServer = null; - object.worker = null; - object.triggerer = null; - object.dagProcessor = null; - } - if (message.scheduler != null && message.hasOwnProperty("scheduler")) - object.scheduler = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.toObject(message.scheduler, options); - if (message.webServer != null && message.hasOwnProperty("webServer")) - object.webServer = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.toObject(message.webServer, options); - if (message.worker != null && message.hasOwnProperty("worker")) - object.worker = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.toObject(message.worker, options); - if (message.triggerer != null && message.hasOwnProperty("triggerer")) - object.triggerer = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.toObject(message.triggerer, options); - if (message.dagProcessor != null && message.hasOwnProperty("dagProcessor")) - object.dagProcessor = $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.toObject(message.dagProcessor, options); - return object; - }; - - /** - * Converts this WorkloadsConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @instance - * @returns {Object.} JSON object - */ - WorkloadsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkloadsConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkloadsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WorkloadsConfig"; - }; - - WorkloadsConfig.SchedulerResource = (function() { - - /** - * Properties of a SchedulerResource. - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @interface ISchedulerResource - * @property {number|null} [cpu] SchedulerResource cpu - * @property {number|null} [memoryGb] SchedulerResource memoryGb - * @property {number|null} [storageGb] SchedulerResource storageGb - * @property {number|null} [count] SchedulerResource count - */ - - /** - * Constructs a new SchedulerResource. - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @classdesc Represents a SchedulerResource. - * @implements ISchedulerResource - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource=} [properties] Properties to set - */ - function SchedulerResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SchedulerResource cpu. - * @member {number} cpu - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource - * @instance - */ - SchedulerResource.prototype.cpu = 0; - - /** - * SchedulerResource memoryGb. - * @member {number} memoryGb - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource - * @instance - */ - SchedulerResource.prototype.memoryGb = 0; - - /** - * SchedulerResource storageGb. - * @member {number} storageGb - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource - * @instance - */ - SchedulerResource.prototype.storageGb = 0; - - /** - * SchedulerResource count. - * @member {number} count - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource - * @instance - */ - SchedulerResource.prototype.count = 0; - - /** - * Creates a new SchedulerResource instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource} SchedulerResource instance - */ - SchedulerResource.create = function create(properties) { - return new SchedulerResource(properties); - }; - - /** - * Encodes the specified SchedulerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource} message SchedulerResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchedulerResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); - if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); - if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.count); - return writer; - }; - - /** - * Encodes the specified SchedulerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ISchedulerResource} message SchedulerResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchedulerResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SchedulerResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource} SchedulerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchedulerResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cpu = reader.float(); - break; - } - case 2: { - message.memoryGb = reader.float(); - break; - } - case 3: { - message.storageGb = reader.float(); - break; - } - case 4: { - message.count = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SchedulerResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource} SchedulerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchedulerResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SchedulerResource message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SchedulerResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cpu != null && message.hasOwnProperty("cpu")) - if (typeof message.cpu !== "number") - return "cpu: number expected"; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - if (typeof message.memoryGb !== "number") - return "memoryGb: number expected"; - if (message.storageGb != null && message.hasOwnProperty("storageGb")) - if (typeof message.storageGb !== "number") - return "storageGb: number expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count)) - return "count: integer expected"; - return null; - }; - - /** - * Creates a SchedulerResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource} SchedulerResource - */ - SchedulerResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource(); - if (object.cpu != null) - message.cpu = Number(object.cpu); - if (object.memoryGb != null) - message.memoryGb = Number(object.memoryGb); - if (object.storageGb != null) - message.storageGb = Number(object.storageGb); - if (object.count != null) - message.count = object.count | 0; - return message; - }; - - /** - * Creates a plain object from a SchedulerResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource} message SchedulerResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SchedulerResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cpu = 0; - object.memoryGb = 0; - object.storageGb = 0; - object.count = 0; - } - if (message.cpu != null && message.hasOwnProperty("cpu")) - object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; - if (message.storageGb != null && message.hasOwnProperty("storageGb")) - object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; - if (message.count != null && message.hasOwnProperty("count")) - object.count = message.count; - return object; - }; - - /** - * Converts this SchedulerResource to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource - * @instance - * @returns {Object.} JSON object - */ - SchedulerResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SchedulerResource - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SchedulerResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.SchedulerResource"; - }; - - return SchedulerResource; - })(); - - WorkloadsConfig.WebServerResource = (function() { - - /** - * Properties of a WebServerResource. - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @interface IWebServerResource - * @property {number|null} [cpu] WebServerResource cpu - * @property {number|null} [memoryGb] WebServerResource memoryGb - * @property {number|null} [storageGb] WebServerResource storageGb - */ - - /** - * Constructs a new WebServerResource. - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @classdesc Represents a WebServerResource. - * @implements IWebServerResource - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource=} [properties] Properties to set - */ - function WebServerResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WebServerResource cpu. - * @member {number} cpu - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource - * @instance - */ - WebServerResource.prototype.cpu = 0; - - /** - * WebServerResource memoryGb. - * @member {number} memoryGb - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource - * @instance - */ - WebServerResource.prototype.memoryGb = 0; - - /** - * WebServerResource storageGb. - * @member {number} storageGb - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource - * @instance - */ - WebServerResource.prototype.storageGb = 0; - - /** - * Creates a new WebServerResource instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource} WebServerResource instance - */ - WebServerResource.create = function create(properties) { - return new WebServerResource(properties); - }; - - /** - * Encodes the specified WebServerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource} message WebServerResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebServerResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); - if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); - if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); - return writer; - }; - - /** - * Encodes the specified WebServerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWebServerResource} message WebServerResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebServerResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WebServerResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource} WebServerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebServerResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cpu = reader.float(); - break; - } - case 2: { - message.memoryGb = reader.float(); - break; - } - case 3: { - message.storageGb = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WebServerResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource} WebServerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebServerResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WebServerResource message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WebServerResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cpu != null && message.hasOwnProperty("cpu")) - if (typeof message.cpu !== "number") - return "cpu: number expected"; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - if (typeof message.memoryGb !== "number") - return "memoryGb: number expected"; - if (message.storageGb != null && message.hasOwnProperty("storageGb")) - if (typeof message.storageGb !== "number") - return "storageGb: number expected"; - return null; - }; - - /** - * Creates a WebServerResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource} WebServerResource - */ - WebServerResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource(); - if (object.cpu != null) - message.cpu = Number(object.cpu); - if (object.memoryGb != null) - message.memoryGb = Number(object.memoryGb); - if (object.storageGb != null) - message.storageGb = Number(object.storageGb); - return message; - }; - - /** - * Creates a plain object from a WebServerResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource} message WebServerResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WebServerResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cpu = 0; - object.memoryGb = 0; - object.storageGb = 0; - } - if (message.cpu != null && message.hasOwnProperty("cpu")) - object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; - if (message.storageGb != null && message.hasOwnProperty("storageGb")) - object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; - return object; - }; - - /** - * Converts this WebServerResource to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource - * @instance - * @returns {Object.} JSON object - */ - WebServerResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WebServerResource - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WebServerResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WebServerResource"; - }; - - return WebServerResource; - })(); - - WorkloadsConfig.WorkerResource = (function() { - - /** - * Properties of a WorkerResource. - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @interface IWorkerResource - * @property {number|null} [cpu] WorkerResource cpu - * @property {number|null} [memoryGb] WorkerResource memoryGb - * @property {number|null} [storageGb] WorkerResource storageGb - * @property {number|null} [minCount] WorkerResource minCount - * @property {number|null} [maxCount] WorkerResource maxCount - */ - - /** - * Constructs a new WorkerResource. - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @classdesc Represents a WorkerResource. - * @implements IWorkerResource - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource=} [properties] Properties to set - */ - function WorkerResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkerResource cpu. - * @member {number} cpu - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource - * @instance - */ - WorkerResource.prototype.cpu = 0; - - /** - * WorkerResource memoryGb. - * @member {number} memoryGb - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource - * @instance - */ - WorkerResource.prototype.memoryGb = 0; - - /** - * WorkerResource storageGb. - * @member {number} storageGb - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource - * @instance - */ - WorkerResource.prototype.storageGb = 0; - - /** - * WorkerResource minCount. - * @member {number} minCount - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource - * @instance - */ - WorkerResource.prototype.minCount = 0; - - /** - * WorkerResource maxCount. - * @member {number} maxCount - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource - * @instance - */ - WorkerResource.prototype.maxCount = 0; - - /** - * Creates a new WorkerResource instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource} WorkerResource instance - */ - WorkerResource.create = function create(properties) { - return new WorkerResource(properties); - }; - - /** - * Encodes the specified WorkerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource} message WorkerResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkerResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); - if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); - if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); - if (message.minCount != null && Object.hasOwnProperty.call(message, "minCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minCount); - if (message.maxCount != null && Object.hasOwnProperty.call(message, "maxCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maxCount); - return writer; - }; - - /** - * Encodes the specified WorkerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IWorkerResource} message WorkerResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkerResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkerResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource} WorkerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkerResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cpu = reader.float(); - break; - } - case 2: { - message.memoryGb = reader.float(); - break; - } - case 3: { - message.storageGb = reader.float(); - break; - } - case 4: { - message.minCount = reader.int32(); - break; - } - case 5: { - message.maxCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkerResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource} WorkerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkerResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkerResource message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkerResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cpu != null && message.hasOwnProperty("cpu")) - if (typeof message.cpu !== "number") - return "cpu: number expected"; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - if (typeof message.memoryGb !== "number") - return "memoryGb: number expected"; - if (message.storageGb != null && message.hasOwnProperty("storageGb")) - if (typeof message.storageGb !== "number") - return "storageGb: number expected"; - if (message.minCount != null && message.hasOwnProperty("minCount")) - if (!$util.isInteger(message.minCount)) - return "minCount: integer expected"; - if (message.maxCount != null && message.hasOwnProperty("maxCount")) - if (!$util.isInteger(message.maxCount)) - return "maxCount: integer expected"; - return null; - }; - - /** - * Creates a WorkerResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource} WorkerResource - */ - WorkerResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource(); - if (object.cpu != null) - message.cpu = Number(object.cpu); - if (object.memoryGb != null) - message.memoryGb = Number(object.memoryGb); - if (object.storageGb != null) - message.storageGb = Number(object.storageGb); - if (object.minCount != null) - message.minCount = object.minCount | 0; - if (object.maxCount != null) - message.maxCount = object.maxCount | 0; - return message; - }; - - /** - * Creates a plain object from a WorkerResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource} message WorkerResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkerResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cpu = 0; - object.memoryGb = 0; - object.storageGb = 0; - object.minCount = 0; - object.maxCount = 0; - } - if (message.cpu != null && message.hasOwnProperty("cpu")) - object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; - if (message.storageGb != null && message.hasOwnProperty("storageGb")) - object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; - if (message.minCount != null && message.hasOwnProperty("minCount")) - object.minCount = message.minCount; - if (message.maxCount != null && message.hasOwnProperty("maxCount")) - object.maxCount = message.maxCount; - return object; - }; - - /** - * Converts this WorkerResource to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource - * @instance - * @returns {Object.} JSON object - */ - WorkerResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkerResource - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkerResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.WorkerResource"; - }; - - return WorkerResource; - })(); - - WorkloadsConfig.TriggererResource = (function() { - - /** - * Properties of a TriggererResource. - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @interface ITriggererResource - * @property {number|null} [count] TriggererResource count - * @property {number|null} [cpu] TriggererResource cpu - * @property {number|null} [memoryGb] TriggererResource memoryGb - */ - - /** - * Constructs a new TriggererResource. - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @classdesc Represents a TriggererResource. - * @implements ITriggererResource - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource=} [properties] Properties to set - */ - function TriggererResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TriggererResource count. - * @member {number} count - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource - * @instance - */ - TriggererResource.prototype.count = 0; - - /** - * TriggererResource cpu. - * @member {number} cpu - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource - * @instance - */ - TriggererResource.prototype.cpu = 0; - - /** - * TriggererResource memoryGb. - * @member {number} memoryGb - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource - * @instance - */ - TriggererResource.prototype.memoryGb = 0; - - /** - * Creates a new TriggererResource instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource} TriggererResource instance - */ - TriggererResource.create = function create(properties) { - return new TriggererResource(properties); - }; - - /** - * Encodes the specified TriggererResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource} message TriggererResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TriggererResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.count); - if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.cpu); - if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.memoryGb); - return writer; - }; - - /** - * Encodes the specified TriggererResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.ITriggererResource} message TriggererResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TriggererResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TriggererResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource} TriggererResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TriggererResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.count = reader.int32(); - break; - } - case 2: { - message.cpu = reader.float(); - break; - } - case 3: { - message.memoryGb = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TriggererResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource} TriggererResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TriggererResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TriggererResource message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TriggererResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count)) - return "count: integer expected"; - if (message.cpu != null && message.hasOwnProperty("cpu")) - if (typeof message.cpu !== "number") - return "cpu: number expected"; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - if (typeof message.memoryGb !== "number") - return "memoryGb: number expected"; - return null; - }; - - /** - * Creates a TriggererResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource} TriggererResource - */ - TriggererResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource(); - if (object.count != null) - message.count = object.count | 0; - if (object.cpu != null) - message.cpu = Number(object.cpu); - if (object.memoryGb != null) - message.memoryGb = Number(object.memoryGb); - return message; - }; - - /** - * Creates a plain object from a TriggererResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource} message TriggererResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TriggererResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.count = 0; - object.cpu = 0; - object.memoryGb = 0; - } - if (message.count != null && message.hasOwnProperty("count")) - object.count = message.count; - if (message.cpu != null && message.hasOwnProperty("cpu")) - object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; - return object; - }; - - /** - * Converts this TriggererResource to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource - * @instance - * @returns {Object.} JSON object - */ - TriggererResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TriggererResource - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TriggererResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.TriggererResource"; - }; - - return TriggererResource; - })(); - - WorkloadsConfig.DagProcessorResource = (function() { - - /** - * Properties of a DagProcessorResource. - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @interface IDagProcessorResource - * @property {number|null} [cpu] DagProcessorResource cpu - * @property {number|null} [memoryGb] DagProcessorResource memoryGb - * @property {number|null} [storageGb] DagProcessorResource storageGb - * @property {number|null} [count] DagProcessorResource count - */ - - /** - * Constructs a new DagProcessorResource. - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig - * @classdesc Represents a DagProcessorResource. - * @implements IDagProcessorResource - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource=} [properties] Properties to set - */ - function DagProcessorResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DagProcessorResource cpu. - * @member {number} cpu - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource - * @instance - */ - DagProcessorResource.prototype.cpu = 0; - - /** - * DagProcessorResource memoryGb. - * @member {number} memoryGb - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource - * @instance - */ - DagProcessorResource.prototype.memoryGb = 0; - - /** - * DagProcessorResource storageGb. - * @member {number} storageGb - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource - * @instance - */ - DagProcessorResource.prototype.storageGb = 0; - - /** - * DagProcessorResource count. - * @member {number} count - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource - * @instance - */ - DagProcessorResource.prototype.count = 0; - - /** - * Creates a new DagProcessorResource instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource} DagProcessorResource instance - */ - DagProcessorResource.create = function create(properties) { - return new DagProcessorResource(properties); - }; - - /** - * Encodes the specified DagProcessorResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource} message DagProcessorResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DagProcessorResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); - if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); - if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.count); - return writer; - }; - - /** - * Encodes the specified DagProcessorResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.IDagProcessorResource} message DagProcessorResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DagProcessorResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DagProcessorResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource} DagProcessorResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DagProcessorResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cpu = reader.float(); - break; - } - case 2: { - message.memoryGb = reader.float(); - break; - } - case 3: { - message.storageGb = reader.float(); - break; - } - case 4: { - message.count = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DagProcessorResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource} DagProcessorResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DagProcessorResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DagProcessorResource message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DagProcessorResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cpu != null && message.hasOwnProperty("cpu")) - if (typeof message.cpu !== "number") - return "cpu: number expected"; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - if (typeof message.memoryGb !== "number") - return "memoryGb: number expected"; - if (message.storageGb != null && message.hasOwnProperty("storageGb")) - if (typeof message.storageGb !== "number") - return "storageGb: number expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count)) - return "count: integer expected"; - return null; - }; - - /** - * Creates a DagProcessorResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource} DagProcessorResource - */ - DagProcessorResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource(); - if (object.cpu != null) - message.cpu = Number(object.cpu); - if (object.memoryGb != null) - message.memoryGb = Number(object.memoryGb); - if (object.storageGb != null) - message.storageGb = Number(object.storageGb); - if (object.count != null) - message.count = object.count | 0; - return message; - }; - - /** - * Creates a plain object from a DagProcessorResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource} message DagProcessorResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DagProcessorResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cpu = 0; - object.memoryGb = 0; - object.storageGb = 0; - object.count = 0; - } - if (message.cpu != null && message.hasOwnProperty("cpu")) - object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; - if (message.storageGb != null && message.hasOwnProperty("storageGb")) - object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; - if (message.count != null && message.hasOwnProperty("count")) - object.count = message.count; - return object; - }; - - /** - * Converts this DagProcessorResource to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource - * @instance - * @returns {Object.} JSON object - */ - DagProcessorResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DagProcessorResource - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DagProcessorResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.WorkloadsConfig.DagProcessorResource"; - }; - - return DagProcessorResource; - })(); - - return WorkloadsConfig; - })(); - - v1.RecoveryConfig = (function() { - - /** - * Properties of a RecoveryConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IRecoveryConfig - * @property {google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig|null} [scheduledSnapshotsConfig] RecoveryConfig scheduledSnapshotsConfig - */ - - /** - * Constructs a new RecoveryConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a RecoveryConfig. - * @implements IRecoveryConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IRecoveryConfig=} [properties] Properties to set - */ - function RecoveryConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RecoveryConfig scheduledSnapshotsConfig. - * @member {google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig|null|undefined} scheduledSnapshotsConfig - * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig - * @instance - */ - RecoveryConfig.prototype.scheduledSnapshotsConfig = null; - - /** - * Creates a new RecoveryConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IRecoveryConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.RecoveryConfig} RecoveryConfig instance - */ - RecoveryConfig.create = function create(properties) { - return new RecoveryConfig(properties); - }; - - /** - * Encodes the specified RecoveryConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.RecoveryConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IRecoveryConfig} message RecoveryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecoveryConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scheduledSnapshotsConfig != null && Object.hasOwnProperty.call(message, "scheduledSnapshotsConfig")) - $root.google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.encode(message.scheduledSnapshotsConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RecoveryConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.RecoveryConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IRecoveryConfig} message RecoveryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecoveryConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RecoveryConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.RecoveryConfig} RecoveryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecoveryConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.scheduledSnapshotsConfig = $root.google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RecoveryConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.RecoveryConfig} RecoveryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecoveryConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RecoveryConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RecoveryConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scheduledSnapshotsConfig != null && message.hasOwnProperty("scheduledSnapshotsConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.verify(message.scheduledSnapshotsConfig); - if (error) - return "scheduledSnapshotsConfig." + error; - } - return null; - }; - - /** - * Creates a RecoveryConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.RecoveryConfig} RecoveryConfig - */ - RecoveryConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.RecoveryConfig(); - if (object.scheduledSnapshotsConfig != null) { - if (typeof object.scheduledSnapshotsConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.RecoveryConfig.scheduledSnapshotsConfig: object expected"); - message.scheduledSnapshotsConfig = $root.google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.fromObject(object.scheduledSnapshotsConfig); - } - return message; - }; - - /** - * Creates a plain object from a RecoveryConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.RecoveryConfig} message RecoveryConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RecoveryConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.scheduledSnapshotsConfig = null; - if (message.scheduledSnapshotsConfig != null && message.hasOwnProperty("scheduledSnapshotsConfig")) - object.scheduledSnapshotsConfig = $root.google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.toObject(message.scheduledSnapshotsConfig, options); - return object; - }; - - /** - * Converts this RecoveryConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig - * @instance - * @returns {Object.} JSON object - */ - RecoveryConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RecoveryConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.RecoveryConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RecoveryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.RecoveryConfig"; - }; - - return RecoveryConfig; - })(); - - v1.ScheduledSnapshotsConfig = (function() { - - /** - * Properties of a ScheduledSnapshotsConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IScheduledSnapshotsConfig - * @property {boolean|null} [enabled] ScheduledSnapshotsConfig enabled - * @property {string|null} [snapshotLocation] ScheduledSnapshotsConfig snapshotLocation - * @property {string|null} [snapshotCreationSchedule] ScheduledSnapshotsConfig snapshotCreationSchedule - * @property {string|null} [timeZone] ScheduledSnapshotsConfig timeZone - */ - - /** - * Constructs a new ScheduledSnapshotsConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a ScheduledSnapshotsConfig. - * @implements IScheduledSnapshotsConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig=} [properties] Properties to set - */ - function ScheduledSnapshotsConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ScheduledSnapshotsConfig enabled. - * @member {boolean} enabled - * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig - * @instance - */ - ScheduledSnapshotsConfig.prototype.enabled = false; - - /** - * ScheduledSnapshotsConfig snapshotLocation. - * @member {string} snapshotLocation - * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig - * @instance - */ - ScheduledSnapshotsConfig.prototype.snapshotLocation = ""; - - /** - * ScheduledSnapshotsConfig snapshotCreationSchedule. - * @member {string} snapshotCreationSchedule - * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig - * @instance - */ - ScheduledSnapshotsConfig.prototype.snapshotCreationSchedule = ""; - - /** - * ScheduledSnapshotsConfig timeZone. - * @member {string} timeZone - * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig - * @instance - */ - ScheduledSnapshotsConfig.prototype.timeZone = ""; - - /** - * Creates a new ScheduledSnapshotsConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig} ScheduledSnapshotsConfig instance - */ - ScheduledSnapshotsConfig.create = function create(properties) { - return new ScheduledSnapshotsConfig(properties); - }; - - /** - * Encodes the specified ScheduledSnapshotsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig} message ScheduledSnapshotsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScheduledSnapshotsConfig.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.snapshotCreationSchedule != null && Object.hasOwnProperty.call(message, "snapshotCreationSchedule")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.snapshotCreationSchedule); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.timeZone); - if (message.snapshotLocation != null && Object.hasOwnProperty.call(message, "snapshotLocation")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.snapshotLocation); - return writer; - }; - - /** - * Encodes the specified ScheduledSnapshotsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IScheduledSnapshotsConfig} message ScheduledSnapshotsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScheduledSnapshotsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ScheduledSnapshotsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig} ScheduledSnapshotsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScheduledSnapshotsConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 6: { - message.snapshotLocation = reader.string(); - break; - } - case 3: { - message.snapshotCreationSchedule = reader.string(); - break; - } - case 5: { - message.timeZone = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ScheduledSnapshotsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig} ScheduledSnapshotsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScheduledSnapshotsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ScheduledSnapshotsConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ScheduledSnapshotsConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.snapshotLocation != null && message.hasOwnProperty("snapshotLocation")) - if (!$util.isString(message.snapshotLocation)) - return "snapshotLocation: string expected"; - if (message.snapshotCreationSchedule != null && message.hasOwnProperty("snapshotCreationSchedule")) - if (!$util.isString(message.snapshotCreationSchedule)) - return "snapshotCreationSchedule: string expected"; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - return null; - }; - - /** - * Creates a ScheduledSnapshotsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig} ScheduledSnapshotsConfig - */ - ScheduledSnapshotsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.snapshotLocation != null) - message.snapshotLocation = String(object.snapshotLocation); - if (object.snapshotCreationSchedule != null) - message.snapshotCreationSchedule = String(object.snapshotCreationSchedule); - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - return message; - }; - - /** - * Creates a plain object from a ScheduledSnapshotsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig} message ScheduledSnapshotsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ScheduledSnapshotsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.snapshotCreationSchedule = ""; - object.timeZone = ""; - object.snapshotLocation = ""; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.snapshotCreationSchedule != null && message.hasOwnProperty("snapshotCreationSchedule")) - object.snapshotCreationSchedule = message.snapshotCreationSchedule; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - object.timeZone = message.timeZone; - if (message.snapshotLocation != null && message.hasOwnProperty("snapshotLocation")) - object.snapshotLocation = message.snapshotLocation; - return object; - }; - - /** - * Converts this ScheduledSnapshotsConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig - * @instance - * @returns {Object.} JSON object - */ - ScheduledSnapshotsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ScheduledSnapshotsConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ScheduledSnapshotsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ScheduledSnapshotsConfig"; - }; - - return ScheduledSnapshotsConfig; - })(); - - v1.MasterAuthorizedNetworksConfig = (function() { - - /** - * Properties of a MasterAuthorizedNetworksConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IMasterAuthorizedNetworksConfig - * @property {boolean|null} [enabled] MasterAuthorizedNetworksConfig enabled - * @property {Array.|null} [cidrBlocks] MasterAuthorizedNetworksConfig cidrBlocks - */ - - /** - * Constructs a new MasterAuthorizedNetworksConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a MasterAuthorizedNetworksConfig. - * @implements IMasterAuthorizedNetworksConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig=} [properties] Properties to set - */ - function MasterAuthorizedNetworksConfig(properties) { - this.cidrBlocks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MasterAuthorizedNetworksConfig enabled. - * @member {boolean} enabled - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig - * @instance - */ - MasterAuthorizedNetworksConfig.prototype.enabled = false; - - /** - * MasterAuthorizedNetworksConfig cidrBlocks. - * @member {Array.} cidrBlocks - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig - * @instance - */ - MasterAuthorizedNetworksConfig.prototype.cidrBlocks = $util.emptyArray; - - /** - * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig instance - */ - MasterAuthorizedNetworksConfig.create = function create(properties) { - return new MasterAuthorizedNetworksConfig(properties); - }; - - /** - * Encodes the specified MasterAuthorizedNetworksConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterAuthorizedNetworksConfig.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.cidrBlocks != null && message.cidrBlocks.length) - for (var i = 0; i < message.cidrBlocks.length; ++i) - $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.encode(message.cidrBlocks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MasterAuthorizedNetworksConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IMasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterAuthorizedNetworksConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterAuthorizedNetworksConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - if (!(message.cidrBlocks && message.cidrBlocks.length)) - message.cidrBlocks = []; - message.cidrBlocks.push($root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterAuthorizedNetworksConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MasterAuthorizedNetworksConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MasterAuthorizedNetworksConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.cidrBlocks != null && message.hasOwnProperty("cidrBlocks")) { - if (!Array.isArray(message.cidrBlocks)) - return "cidrBlocks: array expected"; - for (var i = 0; i < message.cidrBlocks.length; ++i) { - var error = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify(message.cidrBlocks[i]); - if (error) - return "cidrBlocks." + error; - } - } - return null; - }; - - /** - * Creates a MasterAuthorizedNetworksConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig - */ - MasterAuthorizedNetworksConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.cidrBlocks) { - if (!Array.isArray(object.cidrBlocks)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.cidrBlocks: array expected"); - message.cidrBlocks = []; - for (var i = 0; i < object.cidrBlocks.length; ++i) { - if (typeof object.cidrBlocks[i] !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.cidrBlocks: object expected"); - message.cidrBlocks[i] = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.fromObject(object.cidrBlocks[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MasterAuthorizedNetworksConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MasterAuthorizedNetworksConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cidrBlocks = []; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.cidrBlocks && message.cidrBlocks.length) { - object.cidrBlocks = []; - for (var j = 0; j < message.cidrBlocks.length; ++j) - object.cidrBlocks[j] = $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.toObject(message.cidrBlocks[j], options); - } - return object; - }; - - /** - * Converts this MasterAuthorizedNetworksConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig - * @instance - * @returns {Object.} JSON object - */ - MasterAuthorizedNetworksConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MasterAuthorizedNetworksConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MasterAuthorizedNetworksConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig"; - }; - - MasterAuthorizedNetworksConfig.CidrBlock = (function() { - - /** - * Properties of a CidrBlock. - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig - * @interface ICidrBlock - * @property {string|null} [displayName] CidrBlock displayName - * @property {string|null} [cidrBlock] CidrBlock cidrBlock - */ - - /** - * Constructs a new CidrBlock. - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig - * @classdesc Represents a CidrBlock. - * @implements ICidrBlock - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock=} [properties] Properties to set - */ - function CidrBlock(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CidrBlock displayName. - * @member {string} displayName - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @instance - */ - CidrBlock.prototype.displayName = ""; - - /** - * CidrBlock cidrBlock. - * @member {string} cidrBlock - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @instance - */ - CidrBlock.prototype.cidrBlock = ""; - - /** - * Creates a new CidrBlock instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock instance - */ - CidrBlock.create = function create(properties) { - return new CidrBlock(properties); - }; - - /** - * Encodes the specified CidrBlock message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock} message CidrBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CidrBlock.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.cidrBlock != null && Object.hasOwnProperty.call(message, "cidrBlock")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cidrBlock); - return writer; - }; - - /** - * Encodes the specified CidrBlock message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.ICidrBlock} message CidrBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CidrBlock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CidrBlock message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CidrBlock.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.cidrBlock = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CidrBlock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CidrBlock.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CidrBlock message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CidrBlock.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.cidrBlock != null && message.hasOwnProperty("cidrBlock")) - if (!$util.isString(message.cidrBlock)) - return "cidrBlock: string expected"; - return null; - }; - - /** - * Creates a CidrBlock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock - */ - CidrBlock.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.cidrBlock != null) - message.cidrBlock = String(object.cidrBlock); - return message; - }; - - /** - * Creates a plain object from a CidrBlock message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock} message CidrBlock - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CidrBlock.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.cidrBlock = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.cidrBlock != null && message.hasOwnProperty("cidrBlock")) - object.cidrBlock = message.cidrBlock; - return object; - }; - - /** - * Converts this CidrBlock to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @instance - * @returns {Object.} JSON object - */ - CidrBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CidrBlock - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CidrBlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.MasterAuthorizedNetworksConfig.CidrBlock"; - }; - - return CidrBlock; - })(); - - return MasterAuthorizedNetworksConfig; - })(); - - v1.CloudDataLineageIntegration = (function() { - - /** - * Properties of a CloudDataLineageIntegration. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface ICloudDataLineageIntegration - * @property {boolean|null} [enabled] CloudDataLineageIntegration enabled - */ - - /** - * Constructs a new CloudDataLineageIntegration. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a CloudDataLineageIntegration. - * @implements ICloudDataLineageIntegration - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration=} [properties] Properties to set - */ - function CloudDataLineageIntegration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudDataLineageIntegration enabled. - * @member {boolean} enabled - * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration - * @instance - */ - CloudDataLineageIntegration.prototype.enabled = false; - - /** - * Creates a new CloudDataLineageIntegration instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration} CloudDataLineageIntegration instance - */ - CloudDataLineageIntegration.create = function create(properties) { - return new CloudDataLineageIntegration(properties); - }; - - /** - * Encodes the specified CloudDataLineageIntegration message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration} message CloudDataLineageIntegration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudDataLineageIntegration.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); - return writer; - }; - - /** - * Encodes the specified CloudDataLineageIntegration message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICloudDataLineageIntegration} message CloudDataLineageIntegration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudDataLineageIntegration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudDataLineageIntegration message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration} CloudDataLineageIntegration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudDataLineageIntegration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudDataLineageIntegration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration} CloudDataLineageIntegration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudDataLineageIntegration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudDataLineageIntegration message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudDataLineageIntegration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a CloudDataLineageIntegration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration} CloudDataLineageIntegration - */ - CloudDataLineageIntegration.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a CloudDataLineageIntegration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration - * @static - * @param {google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration} message CloudDataLineageIntegration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudDataLineageIntegration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this CloudDataLineageIntegration to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration - * @instance - * @returns {Object.} JSON object - */ - CloudDataLineageIntegration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudDataLineageIntegration - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudDataLineageIntegration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.CloudDataLineageIntegration"; - }; - - return CloudDataLineageIntegration; - })(); - - v1.Environment = (function() { - - /** - * Properties of an Environment. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IEnvironment - * @property {string|null} [name] Environment name - * @property {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig|null} [config] Environment config - * @property {string|null} [uuid] Environment uuid - * @property {google.cloud.orchestration.airflow.service.v1.Environment.State|null} [state] Environment state - * @property {google.protobuf.ITimestamp|null} [createTime] Environment createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime - * @property {Object.|null} [labels] Environment labels - * @property {boolean|null} [satisfiesPzs] Environment satisfiesPzs - * @property {boolean|null} [satisfiesPzi] Environment satisfiesPzi - * @property {google.cloud.orchestration.airflow.service.v1.IStorageConfig|null} [storageConfig] Environment storageConfig - */ - - /** - * Constructs a new Environment. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents an Environment. - * @implements IEnvironment - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IEnvironment=} [properties] Properties to set - */ - function Environment(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]]; - } - - /** - * Environment name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @instance - */ - Environment.prototype.name = ""; - - /** - * Environment config. - * @member {google.cloud.orchestration.airflow.service.v1.IEnvironmentConfig|null|undefined} config - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @instance - */ - Environment.prototype.config = null; - - /** - * Environment uuid. - * @member {string} uuid - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @instance - */ - Environment.prototype.uuid = ""; - - /** - * Environment state. - * @member {google.cloud.orchestration.airflow.service.v1.Environment.State} state - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @instance - */ - Environment.prototype.state = 0; - - /** - * Environment createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @instance - */ - Environment.prototype.createTime = null; - - /** - * Environment updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @instance - */ - Environment.prototype.updateTime = null; - - /** - * Environment labels. - * @member {Object.} labels - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @instance - */ - Environment.prototype.labels = $util.emptyObject; - - /** - * Environment satisfiesPzs. - * @member {boolean} satisfiesPzs - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @instance - */ - Environment.prototype.satisfiesPzs = false; - - /** - * Environment satisfiesPzi. - * @member {boolean} satisfiesPzi - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @instance - */ - Environment.prototype.satisfiesPzi = false; - - /** - * Environment storageConfig. - * @member {google.cloud.orchestration.airflow.service.v1.IStorageConfig|null|undefined} storageConfig - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @instance - */ - Environment.prototype.storageConfig = null; - - /** - * Creates a new Environment instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IEnvironment=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.Environment} Environment instance - */ - Environment.create = function create(properties) { - return new Environment(properties); - }; - - /** - * Encodes the specified Environment message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.Environment.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IEnvironment} message Environment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Environment.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.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.uuid); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.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.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.satisfiesPzs); - if (message.storageConfig != null && Object.hasOwnProperty.call(message, "storageConfig")) - $root.google.cloud.orchestration.airflow.service.v1.StorageConfig.encode(message.storageConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.satisfiesPzi); - return writer; - }; - - /** - * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.Environment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IEnvironment} message Environment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Environment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Environment message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.Environment} Environment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Environment.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.Environment(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.config = $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.uuid = reader.string(); - break; - } - case 4: { - message.state = reader.int32(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $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; - } - case 8: { - message.satisfiesPzs = reader.bool(); - break; - } - case 10: { - message.satisfiesPzi = reader.bool(); - break; - } - case 9: { - message.storageConfig = $root.google.cloud.orchestration.airflow.service.v1.StorageConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Environment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.Environment} Environment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Environment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Environment message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Environment.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.config != null && message.hasOwnProperty("config")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.verify(message.config); - if (error) - return "config." + error; - } - if (message.uuid != null && message.hasOwnProperty("uuid")) - if (!$util.isString(message.uuid)) - return "uuid: 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.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.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.storageConfig != null && message.hasOwnProperty("storageConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.StorageConfig.verify(message.storageConfig); - if (error) - return "storageConfig." + error; - } - return null; - }; - - /** - * Creates an Environment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.Environment} Environment - */ - Environment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.Environment) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.Environment(); - if (object.name != null) - message.name = String(object.name); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.Environment.config: object expected"); - message.config = $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.fromObject(object.config); - } - if (object.uuid != null) - message.uuid = String(object.uuid); - 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 "RUNNING": - case 2: - message.state = 2; - break; - case "UPDATING": - case 3: - message.state = 3; - break; - case "DELETING": - case 4: - message.state = 4; - break; - case "ERROR": - case 5: - message.state = 5; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.Environment.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.Environment.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.Environment.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.satisfiesPzs != null) - message.satisfiesPzs = Boolean(object.satisfiesPzs); - if (object.satisfiesPzi != null) - message.satisfiesPzi = Boolean(object.satisfiesPzi); - if (object.storageConfig != null) { - if (typeof object.storageConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.Environment.storageConfig: object expected"); - message.storageConfig = $root.google.cloud.orchestration.airflow.service.v1.StorageConfig.fromObject(object.storageConfig); - } - return message; - }; - - /** - * Creates a plain object from an Environment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @static - * @param {google.cloud.orchestration.airflow.service.v1.Environment} message Environment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Environment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.config = null; - object.uuid = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.createTime = null; - object.updateTime = null; - object.satisfiesPzs = false; - object.storageConfig = null; - object.satisfiesPzi = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.orchestration.airflow.service.v1.EnvironmentConfig.toObject(message.config, options); - if (message.uuid != null && message.hasOwnProperty("uuid")) - object.uuid = message.uuid; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.Environment.State[message.state] === undefined ? message.state : $root.google.cloud.orchestration.airflow.service.v1.Environment.State[message.state] : message.state; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - 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.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) - object.satisfiesPzs = message.satisfiesPzs; - if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) - object.storageConfig = $root.google.cloud.orchestration.airflow.service.v1.StorageConfig.toObject(message.storageConfig, options); - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) - object.satisfiesPzi = message.satisfiesPzi; - return object; - }; - - /** - * Converts this Environment to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @instance - * @returns {Object.} JSON object - */ - Environment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Environment - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.Environment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Environment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.Environment"; - }; - - /** - * State enum. - * @name google.cloud.orchestration.airflow.service.v1.Environment.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} RUNNING=2 RUNNING value - * @property {number} UPDATING=3 UPDATING value - * @property {number} DELETING=4 DELETING value - * @property {number} ERROR=5 ERROR value - */ - Environment.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "UPDATING"] = 3; - values[valuesById[4] = "DELETING"] = 4; - values[valuesById[5] = "ERROR"] = 5; - return values; - })(); - - return Environment; - })(); - - v1.CheckUpgradeRequest = (function() { - - /** - * Properties of a CheckUpgradeRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface ICheckUpgradeRequest - * @property {string|null} [environment] CheckUpgradeRequest environment - * @property {string|null} [imageVersion] CheckUpgradeRequest imageVersion - */ - - /** - * Constructs a new CheckUpgradeRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a CheckUpgradeRequest. - * @implements ICheckUpgradeRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest=} [properties] Properties to set - */ - function CheckUpgradeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CheckUpgradeRequest environment. - * @member {string} environment - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest - * @instance - */ - CheckUpgradeRequest.prototype.environment = ""; - - /** - * CheckUpgradeRequest imageVersion. - * @member {string} imageVersion - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest - * @instance - */ - CheckUpgradeRequest.prototype.imageVersion = ""; - - /** - * Creates a new CheckUpgradeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest} CheckUpgradeRequest instance - */ - CheckUpgradeRequest.create = function create(properties) { - return new CheckUpgradeRequest(properties); - }; - - /** - * Encodes the specified CheckUpgradeRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest} message CheckUpgradeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckUpgradeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageVersion); - return writer; - }; - - /** - * Encodes the specified CheckUpgradeRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest} message CheckUpgradeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckUpgradeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CheckUpgradeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest} CheckUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckUpgradeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - case 2: { - message.imageVersion = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CheckUpgradeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest} CheckUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckUpgradeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CheckUpgradeRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CheckUpgradeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) - if (!$util.isString(message.imageVersion)) - return "imageVersion: string expected"; - return null; - }; - - /** - * Creates a CheckUpgradeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest} CheckUpgradeRequest - */ - CheckUpgradeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest(); - if (object.environment != null) - message.environment = String(object.environment); - if (object.imageVersion != null) - message.imageVersion = String(object.imageVersion); - return message; - }; - - /** - * Creates a plain object from a CheckUpgradeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest} message CheckUpgradeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CheckUpgradeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.environment = ""; - object.imageVersion = ""; - } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) - object.imageVersion = message.imageVersion; - return object; - }; - - /** - * Converts this CheckUpgradeRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest - * @instance - * @returns {Object.} JSON object - */ - CheckUpgradeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CheckUpgradeRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CheckUpgradeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest"; - }; - - return CheckUpgradeRequest; - })(); - - v1.CheckUpgradeResponse = (function() { - - /** - * Properties of a CheckUpgradeResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface ICheckUpgradeResponse - * @property {string|null} [buildLogUri] CheckUpgradeResponse buildLogUri - * @property {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult|null} [containsPypiModulesConflict] CheckUpgradeResponse containsPypiModulesConflict - * @property {string|null} [pypiConflictBuildLogExtract] CheckUpgradeResponse pypiConflictBuildLogExtract - * @property {string|null} [imageVersion] CheckUpgradeResponse imageVersion - * @property {Object.|null} [pypiDependencies] CheckUpgradeResponse pypiDependencies - */ - - /** - * Constructs a new CheckUpgradeResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a CheckUpgradeResponse. - * @implements ICheckUpgradeResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse=} [properties] Properties to set - */ - function CheckUpgradeResponse(properties) { - this.pypiDependencies = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CheckUpgradeResponse buildLogUri. - * @member {string} buildLogUri - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse - * @instance - */ - CheckUpgradeResponse.prototype.buildLogUri = ""; - - /** - * CheckUpgradeResponse containsPypiModulesConflict. - * @member {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult} containsPypiModulesConflict - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse - * @instance - */ - CheckUpgradeResponse.prototype.containsPypiModulesConflict = 0; - - /** - * CheckUpgradeResponse pypiConflictBuildLogExtract. - * @member {string} pypiConflictBuildLogExtract - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse - * @instance - */ - CheckUpgradeResponse.prototype.pypiConflictBuildLogExtract = ""; - - /** - * CheckUpgradeResponse imageVersion. - * @member {string} imageVersion - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse - * @instance - */ - CheckUpgradeResponse.prototype.imageVersion = ""; - - /** - * CheckUpgradeResponse pypiDependencies. - * @member {Object.} pypiDependencies - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse - * @instance - */ - CheckUpgradeResponse.prototype.pypiDependencies = $util.emptyObject; - - /** - * Creates a new CheckUpgradeResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} CheckUpgradeResponse instance - */ - CheckUpgradeResponse.create = function create(properties) { - return new CheckUpgradeResponse(properties); - }; - - /** - * Encodes the specified CheckUpgradeResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse} message CheckUpgradeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckUpgradeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.buildLogUri != null && Object.hasOwnProperty.call(message, "buildLogUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.buildLogUri); - if (message.pypiConflictBuildLogExtract != null && Object.hasOwnProperty.call(message, "pypiConflictBuildLogExtract")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pypiConflictBuildLogExtract); - if (message.containsPypiModulesConflict != null && Object.hasOwnProperty.call(message, "containsPypiModulesConflict")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.containsPypiModulesConflict); - if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.imageVersion); - if (message.pypiDependencies != null && Object.hasOwnProperty.call(message, "pypiDependencies")) - for (var keys = Object.keys(message.pypiDependencies), i = 0; i < keys.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.pypiDependencies[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified CheckUpgradeResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ICheckUpgradeResponse} message CheckUpgradeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckUpgradeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CheckUpgradeResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} CheckUpgradeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckUpgradeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.buildLogUri = reader.string(); - break; - } - case 4: { - message.containsPypiModulesConflict = reader.int32(); - break; - } - case 3: { - message.pypiConflictBuildLogExtract = reader.string(); - break; - } - case 5: { - message.imageVersion = reader.string(); - break; - } - case 6: { - if (message.pypiDependencies === $util.emptyObject) - message.pypiDependencies = {}; - 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.pypiDependencies[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CheckUpgradeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} CheckUpgradeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckUpgradeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CheckUpgradeResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CheckUpgradeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.buildLogUri != null && message.hasOwnProperty("buildLogUri")) - if (!$util.isString(message.buildLogUri)) - return "buildLogUri: string expected"; - if (message.containsPypiModulesConflict != null && message.hasOwnProperty("containsPypiModulesConflict")) - switch (message.containsPypiModulesConflict) { - default: - return "containsPypiModulesConflict: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.pypiConflictBuildLogExtract != null && message.hasOwnProperty("pypiConflictBuildLogExtract")) - if (!$util.isString(message.pypiConflictBuildLogExtract)) - return "pypiConflictBuildLogExtract: string expected"; - if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) - if (!$util.isString(message.imageVersion)) - return "imageVersion: string expected"; - if (message.pypiDependencies != null && message.hasOwnProperty("pypiDependencies")) { - if (!$util.isObject(message.pypiDependencies)) - return "pypiDependencies: object expected"; - var key = Object.keys(message.pypiDependencies); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.pypiDependencies[key[i]])) - return "pypiDependencies: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a CheckUpgradeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} CheckUpgradeResponse - */ - CheckUpgradeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse(); - if (object.buildLogUri != null) - message.buildLogUri = String(object.buildLogUri); - switch (object.containsPypiModulesConflict) { - default: - if (typeof object.containsPypiModulesConflict === "number") { - message.containsPypiModulesConflict = object.containsPypiModulesConflict; - break; - } - break; - case "CONFLICT_RESULT_UNSPECIFIED": - case 0: - message.containsPypiModulesConflict = 0; - break; - case "CONFLICT": - case 1: - message.containsPypiModulesConflict = 1; - break; - case "NO_CONFLICT": - case 2: - message.containsPypiModulesConflict = 2; - break; - } - if (object.pypiConflictBuildLogExtract != null) - message.pypiConflictBuildLogExtract = String(object.pypiConflictBuildLogExtract); - if (object.imageVersion != null) - message.imageVersion = String(object.imageVersion); - if (object.pypiDependencies) { - if (typeof object.pypiDependencies !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.pypiDependencies: object expected"); - message.pypiDependencies = {}; - for (var keys = Object.keys(object.pypiDependencies), i = 0; i < keys.length; ++i) - message.pypiDependencies[keys[i]] = String(object.pypiDependencies[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a CheckUpgradeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse} message CheckUpgradeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CheckUpgradeResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.pypiDependencies = {}; - if (options.defaults) { - object.buildLogUri = ""; - object.pypiConflictBuildLogExtract = ""; - object.containsPypiModulesConflict = options.enums === String ? "CONFLICT_RESULT_UNSPECIFIED" : 0; - object.imageVersion = ""; - } - if (message.buildLogUri != null && message.hasOwnProperty("buildLogUri")) - object.buildLogUri = message.buildLogUri; - if (message.pypiConflictBuildLogExtract != null && message.hasOwnProperty("pypiConflictBuildLogExtract")) - object.pypiConflictBuildLogExtract = message.pypiConflictBuildLogExtract; - if (message.containsPypiModulesConflict != null && message.hasOwnProperty("containsPypiModulesConflict")) - object.containsPypiModulesConflict = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult[message.containsPypiModulesConflict] === undefined ? message.containsPypiModulesConflict : $root.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult[message.containsPypiModulesConflict] : message.containsPypiModulesConflict; - if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) - object.imageVersion = message.imageVersion; - var keys2; - if (message.pypiDependencies && (keys2 = Object.keys(message.pypiDependencies)).length) { - object.pypiDependencies = {}; - for (var j = 0; j < keys2.length; ++j) - object.pypiDependencies[keys2[j]] = message.pypiDependencies[keys2[j]]; - } - return object; - }; - - /** - * Converts this CheckUpgradeResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse - * @instance - * @returns {Object.} JSON object - */ - CheckUpgradeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CheckUpgradeResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CheckUpgradeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse"; - }; - - /** - * ConflictResult enum. - * @name google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse.ConflictResult - * @enum {number} - * @property {number} CONFLICT_RESULT_UNSPECIFIED=0 CONFLICT_RESULT_UNSPECIFIED value - * @property {number} CONFLICT=1 CONFLICT value - * @property {number} NO_CONFLICT=2 NO_CONFLICT value - */ - CheckUpgradeResponse.ConflictResult = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONFLICT_RESULT_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONFLICT"] = 1; - values[valuesById[2] = "NO_CONFLICT"] = 2; - return values; - })(); - - return CheckUpgradeResponse; - })(); - - v1.DataRetentionConfig = (function() { - - /** - * Properties of a DataRetentionConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IDataRetentionConfig - * @property {google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig|null} [airflowMetadataRetentionConfig] DataRetentionConfig airflowMetadataRetentionConfig - * @property {google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig|null} [taskLogsRetentionConfig] DataRetentionConfig taskLogsRetentionConfig - */ - - /** - * Constructs a new DataRetentionConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a DataRetentionConfig. - * @implements IDataRetentionConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig=} [properties] Properties to set - */ - function DataRetentionConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataRetentionConfig airflowMetadataRetentionConfig. - * @member {google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig|null|undefined} airflowMetadataRetentionConfig - * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig - * @instance - */ - DataRetentionConfig.prototype.airflowMetadataRetentionConfig = null; - - /** - * DataRetentionConfig taskLogsRetentionConfig. - * @member {google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig|null|undefined} taskLogsRetentionConfig - * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig - * @instance - */ - DataRetentionConfig.prototype.taskLogsRetentionConfig = null; - - /** - * Creates a new DataRetentionConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.DataRetentionConfig} DataRetentionConfig instance - */ - DataRetentionConfig.create = function create(properties) { - return new DataRetentionConfig(properties); - }; - - /** - * Encodes the specified DataRetentionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig} message DataRetentionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataRetentionConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.airflowMetadataRetentionConfig != null && Object.hasOwnProperty.call(message, "airflowMetadataRetentionConfig")) - $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.encode(message.airflowMetadataRetentionConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.taskLogsRetentionConfig != null && Object.hasOwnProperty.call(message, "taskLogsRetentionConfig")) - $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.encode(message.taskLogsRetentionConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataRetentionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IDataRetentionConfig} message DataRetentionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataRetentionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataRetentionConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.DataRetentionConfig} DataRetentionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataRetentionConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.airflowMetadataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.decode(reader, reader.uint32()); - break; - } - case 2: { - message.taskLogsRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataRetentionConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.DataRetentionConfig} DataRetentionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataRetentionConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataRetentionConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataRetentionConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.airflowMetadataRetentionConfig != null && message.hasOwnProperty("airflowMetadataRetentionConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.verify(message.airflowMetadataRetentionConfig); - if (error) - return "airflowMetadataRetentionConfig." + error; - } - if (message.taskLogsRetentionConfig != null && message.hasOwnProperty("taskLogsRetentionConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.verify(message.taskLogsRetentionConfig); - if (error) - return "taskLogsRetentionConfig." + error; - } - return null; - }; - - /** - * Creates a DataRetentionConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.DataRetentionConfig} DataRetentionConfig - */ - DataRetentionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.DataRetentionConfig(); - if (object.airflowMetadataRetentionConfig != null) { - if (typeof object.airflowMetadataRetentionConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.airflowMetadataRetentionConfig: object expected"); - message.airflowMetadataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.fromObject(object.airflowMetadataRetentionConfig); - } - if (object.taskLogsRetentionConfig != null) { - if (typeof object.taskLogsRetentionConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.DataRetentionConfig.taskLogsRetentionConfig: object expected"); - message.taskLogsRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.fromObject(object.taskLogsRetentionConfig); - } - return message; - }; - - /** - * Creates a plain object from a DataRetentionConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.DataRetentionConfig} message DataRetentionConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataRetentionConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.airflowMetadataRetentionConfig = null; - object.taskLogsRetentionConfig = null; - } - if (message.airflowMetadataRetentionConfig != null && message.hasOwnProperty("airflowMetadataRetentionConfig")) - object.airflowMetadataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.toObject(message.airflowMetadataRetentionConfig, options); - if (message.taskLogsRetentionConfig != null && message.hasOwnProperty("taskLogsRetentionConfig")) - object.taskLogsRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.toObject(message.taskLogsRetentionConfig, options); - return object; - }; - - /** - * Converts this DataRetentionConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig - * @instance - * @returns {Object.} JSON object - */ - DataRetentionConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataRetentionConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.DataRetentionConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataRetentionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.DataRetentionConfig"; - }; - - return DataRetentionConfig; - })(); - - v1.TaskLogsRetentionConfig = (function() { - - /** - * Properties of a TaskLogsRetentionConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface ITaskLogsRetentionConfig - * @property {google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode|null} [storageMode] TaskLogsRetentionConfig storageMode - */ - - /** - * Constructs a new TaskLogsRetentionConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a TaskLogsRetentionConfig. - * @implements ITaskLogsRetentionConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig=} [properties] Properties to set - */ - function TaskLogsRetentionConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TaskLogsRetentionConfig storageMode. - * @member {google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode} storageMode - * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig - * @instance - */ - TaskLogsRetentionConfig.prototype.storageMode = 0; - - /** - * Creates a new TaskLogsRetentionConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig} TaskLogsRetentionConfig instance - */ - TaskLogsRetentionConfig.create = function create(properties) { - return new TaskLogsRetentionConfig(properties); - }; - - /** - * Encodes the specified TaskLogsRetentionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig} message TaskLogsRetentionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TaskLogsRetentionConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.storageMode != null && Object.hasOwnProperty.call(message, "storageMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.storageMode); - return writer; - }; - - /** - * Encodes the specified TaskLogsRetentionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ITaskLogsRetentionConfig} message TaskLogsRetentionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TaskLogsRetentionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TaskLogsRetentionConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig} TaskLogsRetentionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TaskLogsRetentionConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.storageMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TaskLogsRetentionConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig} TaskLogsRetentionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TaskLogsRetentionConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TaskLogsRetentionConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TaskLogsRetentionConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.storageMode != null && message.hasOwnProperty("storageMode")) - switch (message.storageMode) { - default: - return "storageMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a TaskLogsRetentionConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig} TaskLogsRetentionConfig - */ - TaskLogsRetentionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig(); - switch (object.storageMode) { - default: - if (typeof object.storageMode === "number") { - message.storageMode = object.storageMode; - break; - } - break; - case "TASK_LOGS_STORAGE_MODE_UNSPECIFIED": - case 0: - message.storageMode = 0; - break; - case "CLOUD_LOGGING_AND_CLOUD_STORAGE": - case 1: - message.storageMode = 1; - break; - case "CLOUD_LOGGING_ONLY": - case 2: - message.storageMode = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a TaskLogsRetentionConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig} message TaskLogsRetentionConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TaskLogsRetentionConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.storageMode = options.enums === String ? "TASK_LOGS_STORAGE_MODE_UNSPECIFIED" : 0; - if (message.storageMode != null && message.hasOwnProperty("storageMode")) - object.storageMode = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode[message.storageMode] === undefined ? message.storageMode : $root.google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode[message.storageMode] : message.storageMode; - return object; - }; - - /** - * Converts this TaskLogsRetentionConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig - * @instance - * @returns {Object.} JSON object - */ - TaskLogsRetentionConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TaskLogsRetentionConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TaskLogsRetentionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig"; - }; - - /** - * TaskLogsStorageMode enum. - * @name google.cloud.orchestration.airflow.service.v1.TaskLogsRetentionConfig.TaskLogsStorageMode - * @enum {number} - * @property {number} TASK_LOGS_STORAGE_MODE_UNSPECIFIED=0 TASK_LOGS_STORAGE_MODE_UNSPECIFIED value - * @property {number} CLOUD_LOGGING_AND_CLOUD_STORAGE=1 CLOUD_LOGGING_AND_CLOUD_STORAGE value - * @property {number} CLOUD_LOGGING_ONLY=2 CLOUD_LOGGING_ONLY value - */ - TaskLogsRetentionConfig.TaskLogsStorageMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TASK_LOGS_STORAGE_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_LOGGING_AND_CLOUD_STORAGE"] = 1; - values[valuesById[2] = "CLOUD_LOGGING_ONLY"] = 2; - return values; - })(); - - return TaskLogsRetentionConfig; - })(); - - v1.AirflowMetadataRetentionPolicyConfig = (function() { - - /** - * Properties of an AirflowMetadataRetentionPolicyConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IAirflowMetadataRetentionPolicyConfig - * @property {google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode|null} [retentionMode] AirflowMetadataRetentionPolicyConfig retentionMode - * @property {number|null} [retentionDays] AirflowMetadataRetentionPolicyConfig retentionDays - */ - - /** - * Constructs a new AirflowMetadataRetentionPolicyConfig. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents an AirflowMetadataRetentionPolicyConfig. - * @implements IAirflowMetadataRetentionPolicyConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig=} [properties] Properties to set - */ - function AirflowMetadataRetentionPolicyConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AirflowMetadataRetentionPolicyConfig retentionMode. - * @member {google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode} retentionMode - * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig - * @instance - */ - AirflowMetadataRetentionPolicyConfig.prototype.retentionMode = 0; - - /** - * AirflowMetadataRetentionPolicyConfig retentionDays. - * @member {number} retentionDays - * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig - * @instance - */ - AirflowMetadataRetentionPolicyConfig.prototype.retentionDays = 0; - - /** - * Creates a new AirflowMetadataRetentionPolicyConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig} AirflowMetadataRetentionPolicyConfig instance - */ - AirflowMetadataRetentionPolicyConfig.create = function create(properties) { - return new AirflowMetadataRetentionPolicyConfig(properties); - }; - - /** - * Encodes the specified AirflowMetadataRetentionPolicyConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig} message AirflowMetadataRetentionPolicyConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AirflowMetadataRetentionPolicyConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.retentionMode != null && Object.hasOwnProperty.call(message, "retentionMode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.retentionMode); - if (message.retentionDays != null && Object.hasOwnProperty.call(message, "retentionDays")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.retentionDays); - return writer; - }; - - /** - * Encodes the specified AirflowMetadataRetentionPolicyConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IAirflowMetadataRetentionPolicyConfig} message AirflowMetadataRetentionPolicyConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AirflowMetadataRetentionPolicyConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AirflowMetadataRetentionPolicyConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig} AirflowMetadataRetentionPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AirflowMetadataRetentionPolicyConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.retentionMode = reader.int32(); - break; - } - case 2: { - message.retentionDays = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AirflowMetadataRetentionPolicyConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig} AirflowMetadataRetentionPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AirflowMetadataRetentionPolicyConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AirflowMetadataRetentionPolicyConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AirflowMetadataRetentionPolicyConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.retentionMode != null && message.hasOwnProperty("retentionMode")) - switch (message.retentionMode) { - default: - return "retentionMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) - if (!$util.isInteger(message.retentionDays)) - return "retentionDays: integer expected"; - return null; - }; - - /** - * Creates an AirflowMetadataRetentionPolicyConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig} AirflowMetadataRetentionPolicyConfig - */ - AirflowMetadataRetentionPolicyConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig(); - switch (object.retentionMode) { - default: - if (typeof object.retentionMode === "number") { - message.retentionMode = object.retentionMode; - break; - } - break; - case "RETENTION_MODE_UNSPECIFIED": - case 0: - message.retentionMode = 0; - break; - case "RETENTION_MODE_ENABLED": - case 1: - message.retentionMode = 1; - break; - case "RETENTION_MODE_DISABLED": - case 2: - message.retentionMode = 2; - break; - } - if (object.retentionDays != null) - message.retentionDays = object.retentionDays | 0; - return message; - }; - - /** - * Creates a plain object from an AirflowMetadataRetentionPolicyConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig} message AirflowMetadataRetentionPolicyConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AirflowMetadataRetentionPolicyConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.retentionMode = options.enums === String ? "RETENTION_MODE_UNSPECIFIED" : 0; - object.retentionDays = 0; - } - if (message.retentionMode != null && message.hasOwnProperty("retentionMode")) - object.retentionMode = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode[message.retentionMode] === undefined ? message.retentionMode : $root.google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode[message.retentionMode] : message.retentionMode; - if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) - object.retentionDays = message.retentionDays; - return object; - }; - - /** - * Converts this AirflowMetadataRetentionPolicyConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig - * @instance - * @returns {Object.} JSON object - */ - AirflowMetadataRetentionPolicyConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AirflowMetadataRetentionPolicyConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AirflowMetadataRetentionPolicyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig"; - }; - - /** - * RetentionMode enum. - * @name google.cloud.orchestration.airflow.service.v1.AirflowMetadataRetentionPolicyConfig.RetentionMode - * @enum {number} - * @property {number} RETENTION_MODE_UNSPECIFIED=0 RETENTION_MODE_UNSPECIFIED value - * @property {number} RETENTION_MODE_ENABLED=1 RETENTION_MODE_ENABLED value - * @property {number} RETENTION_MODE_DISABLED=2 RETENTION_MODE_DISABLED value - */ - AirflowMetadataRetentionPolicyConfig.RetentionMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RETENTION_MODE_ENABLED"] = 1; - values[valuesById[2] = "RETENTION_MODE_DISABLED"] = 2; - return values; - })(); - - return AirflowMetadataRetentionPolicyConfig; - })(); - - v1.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IOperationMetadata - * @property {google.cloud.orchestration.airflow.service.v1.OperationMetadata.State|null} [state] OperationMetadata state - * @property {google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type|null} [operationType] OperationMetadata operationType - * @property {string|null} [resource] OperationMetadata resource - * @property {string|null} [resourceUuid] OperationMetadata resourceUuid - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - */ - - /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.orchestration.airflow.service.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 state. - * @member {google.cloud.orchestration.airflow.service.v1.OperationMetadata.State} state - * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.state = 0; - - /** - * OperationMetadata operationType. - * @member {google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type} operationType - * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.operationType = 0; - - /** - * OperationMetadata resource. - * @member {string} resource - * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.resource = ""; - - /** - * OperationMetadata resourceUuid. - * @member {string} resourceUuid - * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.resourceUuid = ""; - - /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata - * @static - * @param {google.cloud.orchestration.airflow.service.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.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operationType); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); - if (message.resourceUuid != null && Object.hasOwnProperty.call(message, "resourceUuid")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceUuid); - 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.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata - * @static - * @param {google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.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.orchestration.airflow.service.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.operationType = reader.int32(); - break; - } - case 3: { - message.resource = reader.string(); - break; - } - case 4: { - message.resourceUuid = reader.string(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - 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.orchestration.airflow.service.v1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.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.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 3: - case 4: - break; - } - if (message.operationType != null && message.hasOwnProperty("operationType")) - switch (message.operationType) { - default: - return "operationType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.resourceUuid != null && message.hasOwnProperty("resourceUuid")) - if (!$util.isString(message.resourceUuid)) - return "resourceUuid: 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.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - return null; - }; - - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata(); - 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 "PENDING": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "SUCCEEDED": - case 3: - message.state = 3; - break; - case "SUCCESSFUL": - case 3: - message.state = 3; - break; - case "FAILED": - case 4: - message.state = 4; - break; - } - switch (object.operationType) { - default: - if (typeof object.operationType === "number") { - message.operationType = object.operationType; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.operationType = 0; - break; - case "CREATE": - case 1: - message.operationType = 1; - break; - case "DELETE": - case 2: - message.operationType = 2; - break; - case "UPDATE": - case 3: - message.operationType = 3; - break; - case "CHECK": - case 4: - message.operationType = 4; - break; - case "SAVE_SNAPSHOT": - case 5: - message.operationType = 5; - break; - case "LOAD_SNAPSHOT": - case 6: - message.operationType = 6; - break; - case "DATABASE_FAILOVER": - case 7: - message.operationType = 7; - break; - } - if (object.resource != null) - message.resource = String(object.resource); - if (object.resourceUuid != null) - message.resourceUuid = String(object.resourceUuid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.v1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - return message; - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.OperationMetadata - * @static - * @param {google.cloud.orchestration.airflow.service.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.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.operationType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.resource = ""; - object.resourceUuid = ""; - object.createTime = null; - object.endTime = null; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata.State[message.state] : message.state; - if (message.operationType != null && message.hasOwnProperty("operationType")) - object.operationType = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type[message.operationType] === undefined ? message.operationType : $root.google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type[message.operationType] : message.operationType; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.resourceUuid != null && message.hasOwnProperty("resourceUuid")) - object.resourceUuid = message.resourceUuid; - 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); - return object; - }; - - /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.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.orchestration.airflow.service.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.orchestration.airflow.service.v1.OperationMetadata"; - }; - - /** - * State enum. - * @name google.cloud.orchestration.airflow.service.v1.OperationMetadata.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} RUNNING=2 RUNNING value - * @property {number} SUCCEEDED=3 SUCCEEDED value - * @property {number} SUCCESSFUL=3 SUCCESSFUL value - * @property {number} FAILED=4 FAILED value - */ - OperationMetadata.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "SUCCEEDED"] = 3; - values["SUCCESSFUL"] = 3; - values[valuesById[4] = "FAILED"] = 4; - return values; - })(); - - /** - * Type enum. - * @name google.cloud.orchestration.airflow.service.v1.OperationMetadata.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} CREATE=1 CREATE value - * @property {number} DELETE=2 DELETE value - * @property {number} UPDATE=3 UPDATE value - * @property {number} CHECK=4 CHECK value - * @property {number} SAVE_SNAPSHOT=5 SAVE_SNAPSHOT value - * @property {number} LOAD_SNAPSHOT=6 LOAD_SNAPSHOT value - * @property {number} DATABASE_FAILOVER=7 DATABASE_FAILOVER value - */ - OperationMetadata.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATE"] = 1; - values[valuesById[2] = "DELETE"] = 2; - values[valuesById[3] = "UPDATE"] = 3; - values[valuesById[4] = "CHECK"] = 4; - values[valuesById[5] = "SAVE_SNAPSHOT"] = 5; - values[valuesById[6] = "LOAD_SNAPSHOT"] = 6; - values[valuesById[7] = "DATABASE_FAILOVER"] = 7; - return values; - })(); - - return OperationMetadata; - })(); - - v1.ImageVersions = (function() { - - /** - * Constructs a new ImageVersions service. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents an ImageVersions - * @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 ImageVersions(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ImageVersions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ImageVersions; - - /** - * Creates new ImageVersions service using the specified rpc implementation. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersions - * @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 {ImageVersions} RPC service. Useful where requests and/or responses are streamed. - */ - ImageVersions.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1.ImageVersions|listImageVersions}. - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersions - * @typedef ListImageVersionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} [response] ListImageVersionsResponse - */ - - /** - * Calls ListImageVersions. - * @function listImageVersions - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersions - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest} request ListImageVersionsRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1.ImageVersions.ListImageVersionsCallback} callback Node-style callback called with the error, if any, and ListImageVersionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ImageVersions.prototype.listImageVersions = function listImageVersions(request, callback) { - return this.rpcCall(listImageVersions, $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest, $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse, request, callback); - }, "name", { value: "ListImageVersions" }); - - /** - * Calls ListImageVersions. - * @function listImageVersions - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersions - * @instance - * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest} request ListImageVersionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ImageVersions; - })(); - - v1.ListImageVersionsRequest = (function() { - - /** - * Properties of a ListImageVersionsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IListImageVersionsRequest - * @property {string|null} [parent] ListImageVersionsRequest parent - * @property {number|null} [pageSize] ListImageVersionsRequest pageSize - * @property {string|null} [pageToken] ListImageVersionsRequest pageToken - * @property {boolean|null} [includePastReleases] ListImageVersionsRequest includePastReleases - */ - - /** - * Constructs a new ListImageVersionsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a ListImageVersionsRequest. - * @implements IListImageVersionsRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest=} [properties] Properties to set - */ - function ListImageVersionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListImageVersionsRequest parent. - * @member {string} parent - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest - * @instance - */ - ListImageVersionsRequest.prototype.parent = ""; - - /** - * ListImageVersionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest - * @instance - */ - ListImageVersionsRequest.prototype.pageSize = 0; - - /** - * ListImageVersionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest - * @instance - */ - ListImageVersionsRequest.prototype.pageToken = ""; - - /** - * ListImageVersionsRequest includePastReleases. - * @member {boolean} includePastReleases - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest - * @instance - */ - ListImageVersionsRequest.prototype.includePastReleases = false; - - /** - * Creates a new ListImageVersionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} ListImageVersionsRequest instance - */ - ListImageVersionsRequest.create = function create(properties) { - return new ListImageVersionsRequest(properties); - }; - - /** - * Encodes the specified ListImageVersionsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest} message ListImageVersionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListImageVersionsRequest.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.includePastReleases != null && Object.hasOwnProperty.call(message, "includePastReleases")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.includePastReleases); - return writer; - }; - - /** - * Encodes the specified ListImageVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest} message ListImageVersionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListImageVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListImageVersionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} ListImageVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListImageVersionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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.includePastReleases = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListImageVersionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} ListImageVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListImageVersionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListImageVersionsRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListImageVersionsRequest.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.includePastReleases != null && message.hasOwnProperty("includePastReleases")) - if (typeof message.includePastReleases !== "boolean") - return "includePastReleases: boolean expected"; - return null; - }; - - /** - * Creates a ListImageVersionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} ListImageVersionsRequest - */ - ListImageVersionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest(); - 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.includePastReleases != null) - message.includePastReleases = Boolean(object.includePastReleases); - return message; - }; - - /** - * Creates a plain object from a ListImageVersionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest} message ListImageVersionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListImageVersionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.includePastReleases = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.includePastReleases != null && message.hasOwnProperty("includePastReleases")) - object.includePastReleases = message.includePastReleases; - return object; - }; - - /** - * Converts this ListImageVersionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListImageVersionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListImageVersionsRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListImageVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest"; - }; - - return ListImageVersionsRequest; - })(); - - v1.ListImageVersionsResponse = (function() { - - /** - * Properties of a ListImageVersionsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IListImageVersionsResponse - * @property {Array.|null} [imageVersions] ListImageVersionsResponse imageVersions - * @property {string|null} [nextPageToken] ListImageVersionsResponse nextPageToken - */ - - /** - * Constructs a new ListImageVersionsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents a ListImageVersionsResponse. - * @implements IListImageVersionsResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse=} [properties] Properties to set - */ - function ListImageVersionsResponse(properties) { - this.imageVersions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListImageVersionsResponse imageVersions. - * @member {Array.} imageVersions - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse - * @instance - */ - ListImageVersionsResponse.prototype.imageVersions = $util.emptyArray; - - /** - * ListImageVersionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse - * @instance - */ - ListImageVersionsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListImageVersionsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} ListImageVersionsResponse instance - */ - ListImageVersionsResponse.create = function create(properties) { - return new ListImageVersionsResponse(properties); - }; - - /** - * Encodes the specified ListImageVersionsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse} message ListImageVersionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListImageVersionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.imageVersions != null && message.imageVersions.length) - for (var i = 0; i < message.imageVersions.length; ++i) - $root.google.cloud.orchestration.airflow.service.v1.ImageVersion.encode(message.imageVersions[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 ListImageVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse} message ListImageVersionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListImageVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListImageVersionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} ListImageVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListImageVersionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.imageVersions && message.imageVersions.length)) - message.imageVersions = []; - message.imageVersions.push($root.google.cloud.orchestration.airflow.service.v1.ImageVersion.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListImageVersionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} ListImageVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListImageVersionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListImageVersionsResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListImageVersionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.imageVersions != null && message.hasOwnProperty("imageVersions")) { - if (!Array.isArray(message.imageVersions)) - return "imageVersions: array expected"; - for (var i = 0; i < message.imageVersions.length; ++i) { - var error = $root.google.cloud.orchestration.airflow.service.v1.ImageVersion.verify(message.imageVersions[i]); - if (error) - return "imageVersions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListImageVersionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} ListImageVersionsResponse - */ - ListImageVersionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse(); - if (object.imageVersions) { - if (!Array.isArray(object.imageVersions)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.imageVersions: array expected"); - message.imageVersions = []; - for (var i = 0; i < object.imageVersions.length; ++i) { - if (typeof object.imageVersions[i] !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse.imageVersions: object expected"); - message.imageVersions[i] = $root.google.cloud.orchestration.airflow.service.v1.ImageVersion.fromObject(object.imageVersions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListImageVersionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse} message ListImageVersionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListImageVersionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.imageVersions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.imageVersions && message.imageVersions.length) { - object.imageVersions = []; - for (var j = 0; j < message.imageVersions.length; ++j) - object.imageVersions[j] = $root.google.cloud.orchestration.airflow.service.v1.ImageVersion.toObject(message.imageVersions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListImageVersionsResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListImageVersionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListImageVersionsResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListImageVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse"; - }; - - return ListImageVersionsResponse; - })(); - - v1.ImageVersion = (function() { - - /** - * Properties of an ImageVersion. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @interface IImageVersion - * @property {string|null} [imageVersionId] ImageVersion imageVersionId - * @property {boolean|null} [isDefault] ImageVersion isDefault - * @property {Array.|null} [supportedPythonVersions] ImageVersion supportedPythonVersions - * @property {google.type.IDate|null} [releaseDate] ImageVersion releaseDate - * @property {boolean|null} [creationDisabled] ImageVersion creationDisabled - * @property {boolean|null} [upgradeDisabled] ImageVersion upgradeDisabled - */ - - /** - * Constructs a new ImageVersion. - * @memberof google.cloud.orchestration.airflow.service.v1 - * @classdesc Represents an ImageVersion. - * @implements IImageVersion - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1.IImageVersion=} [properties] Properties to set - */ - function ImageVersion(properties) { - this.supportedPythonVersions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImageVersion imageVersionId. - * @member {string} imageVersionId - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion - * @instance - */ - ImageVersion.prototype.imageVersionId = ""; - - /** - * ImageVersion isDefault. - * @member {boolean} isDefault - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion - * @instance - */ - ImageVersion.prototype.isDefault = false; - - /** - * ImageVersion supportedPythonVersions. - * @member {Array.} supportedPythonVersions - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion - * @instance - */ - ImageVersion.prototype.supportedPythonVersions = $util.emptyArray; - - /** - * ImageVersion releaseDate. - * @member {google.type.IDate|null|undefined} releaseDate - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion - * @instance - */ - ImageVersion.prototype.releaseDate = null; - - /** - * ImageVersion creationDisabled. - * @member {boolean} creationDisabled - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion - * @instance - */ - ImageVersion.prototype.creationDisabled = false; - - /** - * ImageVersion upgradeDisabled. - * @member {boolean} upgradeDisabled - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion - * @instance - */ - ImageVersion.prototype.upgradeDisabled = false; - - /** - * Creates a new ImageVersion instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IImageVersion=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1.ImageVersion} ImageVersion instance - */ - ImageVersion.create = function create(properties) { - return new ImageVersion(properties); - }; - - /** - * Encodes the specified ImageVersion message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ImageVersion.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IImageVersion} message ImageVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImageVersion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.imageVersionId != null && Object.hasOwnProperty.call(message, "imageVersionId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageVersionId); - if (message.isDefault != null && Object.hasOwnProperty.call(message, "isDefault")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDefault); - if (message.supportedPythonVersions != null && message.supportedPythonVersions.length) - for (var i = 0; i < message.supportedPythonVersions.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.supportedPythonVersions[i]); - if (message.releaseDate != null && Object.hasOwnProperty.call(message, "releaseDate")) - $root.google.type.Date.encode(message.releaseDate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.creationDisabled != null && Object.hasOwnProperty.call(message, "creationDisabled")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.creationDisabled); - if (message.upgradeDisabled != null && Object.hasOwnProperty.call(message, "upgradeDisabled")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.upgradeDisabled); - return writer; - }; - - /** - * Encodes the specified ImageVersion message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1.ImageVersion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion - * @static - * @param {google.cloud.orchestration.airflow.service.v1.IImageVersion} message ImageVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImageVersion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImageVersion message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1.ImageVersion} ImageVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImageVersion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1.ImageVersion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.imageVersionId = reader.string(); - break; - } - case 2: { - message.isDefault = reader.bool(); - break; - } - case 3: { - if (!(message.supportedPythonVersions && message.supportedPythonVersions.length)) - message.supportedPythonVersions = []; - message.supportedPythonVersions.push(reader.string()); - break; - } - case 4: { - message.releaseDate = $root.google.type.Date.decode(reader, reader.uint32()); - break; - } - case 5: { - message.creationDisabled = reader.bool(); - break; - } - case 6: { - message.upgradeDisabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImageVersion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1.ImageVersion} ImageVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImageVersion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImageVersion message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImageVersion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.imageVersionId != null && message.hasOwnProperty("imageVersionId")) - if (!$util.isString(message.imageVersionId)) - return "imageVersionId: string expected"; - if (message.isDefault != null && message.hasOwnProperty("isDefault")) - if (typeof message.isDefault !== "boolean") - return "isDefault: boolean expected"; - if (message.supportedPythonVersions != null && message.hasOwnProperty("supportedPythonVersions")) { - if (!Array.isArray(message.supportedPythonVersions)) - return "supportedPythonVersions: array expected"; - for (var i = 0; i < message.supportedPythonVersions.length; ++i) - if (!$util.isString(message.supportedPythonVersions[i])) - return "supportedPythonVersions: string[] expected"; - } - if (message.releaseDate != null && message.hasOwnProperty("releaseDate")) { - var error = $root.google.type.Date.verify(message.releaseDate); - if (error) - return "releaseDate." + error; - } - if (message.creationDisabled != null && message.hasOwnProperty("creationDisabled")) - if (typeof message.creationDisabled !== "boolean") - return "creationDisabled: boolean expected"; - if (message.upgradeDisabled != null && message.hasOwnProperty("upgradeDisabled")) - if (typeof message.upgradeDisabled !== "boolean") - return "upgradeDisabled: boolean expected"; - return null; - }; - - /** - * Creates an ImageVersion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1.ImageVersion} ImageVersion - */ - ImageVersion.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1.ImageVersion) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1.ImageVersion(); - if (object.imageVersionId != null) - message.imageVersionId = String(object.imageVersionId); - if (object.isDefault != null) - message.isDefault = Boolean(object.isDefault); - if (object.supportedPythonVersions) { - if (!Array.isArray(object.supportedPythonVersions)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1.ImageVersion.supportedPythonVersions: array expected"); - message.supportedPythonVersions = []; - for (var i = 0; i < object.supportedPythonVersions.length; ++i) - message.supportedPythonVersions[i] = String(object.supportedPythonVersions[i]); - } - if (object.releaseDate != null) { - if (typeof object.releaseDate !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1.ImageVersion.releaseDate: object expected"); - message.releaseDate = $root.google.type.Date.fromObject(object.releaseDate); - } - if (object.creationDisabled != null) - message.creationDisabled = Boolean(object.creationDisabled); - if (object.upgradeDisabled != null) - message.upgradeDisabled = Boolean(object.upgradeDisabled); - return message; - }; - - /** - * Creates a plain object from an ImageVersion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion - * @static - * @param {google.cloud.orchestration.airflow.service.v1.ImageVersion} message ImageVersion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImageVersion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.supportedPythonVersions = []; - if (options.defaults) { - object.imageVersionId = ""; - object.isDefault = false; - object.releaseDate = null; - object.creationDisabled = false; - object.upgradeDisabled = false; - } - if (message.imageVersionId != null && message.hasOwnProperty("imageVersionId")) - object.imageVersionId = message.imageVersionId; - if (message.isDefault != null && message.hasOwnProperty("isDefault")) - object.isDefault = message.isDefault; - if (message.supportedPythonVersions && message.supportedPythonVersions.length) { - object.supportedPythonVersions = []; - for (var j = 0; j < message.supportedPythonVersions.length; ++j) - object.supportedPythonVersions[j] = message.supportedPythonVersions[j]; - } - if (message.releaseDate != null && message.hasOwnProperty("releaseDate")) - object.releaseDate = $root.google.type.Date.toObject(message.releaseDate, options); - if (message.creationDisabled != null && message.hasOwnProperty("creationDisabled")) - object.creationDisabled = message.creationDisabled; - if (message.upgradeDisabled != null && message.hasOwnProperty("upgradeDisabled")) - object.upgradeDisabled = message.upgradeDisabled; - return object; - }; - - /** - * Converts this ImageVersion to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion - * @instance - * @returns {Object.} JSON object - */ - ImageVersion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImageVersion - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1.ImageVersion - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImageVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1.ImageVersion"; - }; - - return ImageVersion; - })(); - - return v1; - })(); - - return service; - })(); - - return airflow; - })(); - - return orchestration; - })(); - - return cloud; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @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) { - 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(); - 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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; - })(); - - /** - * 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) { - 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(); - 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.childType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a 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; - })(); - - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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 - */ - - /** - * 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; - - /** - * 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(); - 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) { - 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(); - 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; - } - 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; - } - 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"]); - } - 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; - } - 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); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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.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) { - 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(); - 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.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) { - 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(); - 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.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) { - 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(); - 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) { - 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(); - 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; - })(); - - 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) { - 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(); - 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; - })(); - - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - type.Date = (function() { - - /** - * Properties of a Date. - * @memberof google.type - * @interface IDate - * @property {number|null} [year] Date year - * @property {number|null} [month] Date month - * @property {number|null} [day] Date day - */ - - /** - * Constructs a new Date. - * @memberof google.type - * @classdesc Represents a Date. - * @implements IDate - * @constructor - * @param {google.type.IDate=} [properties] Properties to set - */ - function Date(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Date year. - * @member {number} year - * @memberof google.type.Date - * @instance - */ - Date.prototype.year = 0; - - /** - * Date month. - * @member {number} month - * @memberof google.type.Date - * @instance - */ - Date.prototype.month = 0; - - /** - * Date day. - * @member {number} day - * @memberof google.type.Date - * @instance - */ - Date.prototype.day = 0; - - /** - * Creates a new Date instance using the specified properties. - * @function create - * @memberof google.type.Date - * @static - * @param {google.type.IDate=} [properties] Properties to set - * @returns {google.type.Date} Date instance - */ - Date.create = function create(properties) { - return new Date(properties); - }; - - /** - * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @function encode - * @memberof google.type.Date - * @static - * @param {google.type.IDate} message Date message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Date.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.year != null && Object.hasOwnProperty.call(message, "year")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); - if (message.month != null && Object.hasOwnProperty.call(message, "month")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); - if (message.day != null && Object.hasOwnProperty.call(message, "day")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); - return writer; - }; - - /** - * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.Date - * @static - * @param {google.type.IDate} message Date message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Date.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Date message from the specified reader or buffer. - * @function decode - * @memberof google.type.Date - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.Date} Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Date.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.year = reader.int32(); - break; - } - case 2: { - message.month = reader.int32(); - break; - } - case 3: { - message.day = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Date message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.Date - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Date} Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Date.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Date message. - * @function verify - * @memberof google.type.Date - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Date.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.year != null && message.hasOwnProperty("year")) - if (!$util.isInteger(message.year)) - return "year: integer expected"; - if (message.month != null && message.hasOwnProperty("month")) - if (!$util.isInteger(message.month)) - return "month: integer expected"; - if (message.day != null && message.hasOwnProperty("day")) - if (!$util.isInteger(message.day)) - return "day: integer expected"; - return null; - }; - - /** - * Creates a Date message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.Date - * @static - * @param {Object.} object Plain object - * @returns {google.type.Date} Date - */ - Date.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Date) - return object; - var message = new $root.google.type.Date(); - if (object.year != null) - message.year = object.year | 0; - if (object.month != null) - message.month = object.month | 0; - if (object.day != null) - message.day = object.day | 0; - return message; - }; - - /** - * Creates a plain object from a Date message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.Date - * @static - * @param {google.type.Date} message Date - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Date.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.year = 0; - object.month = 0; - object.day = 0; - } - if (message.year != null && message.hasOwnProperty("year")) - object.year = message.year; - if (message.month != null && message.hasOwnProperty("month")) - object.month = message.month; - if (message.day != null && message.hasOwnProperty("day")) - object.day = message.day; - return object; - }; - - /** - * Converts this Date to JSON. - * @function toJSON - * @memberof google.type.Date - * @instance - * @returns {Object.} JSON object - */ - Date.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Date - * @function getTypeUrl - * @memberof google.type.Date - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.Date"; - }; - - return Date; - })(); - - return type; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.json deleted file mode 100644 index e51326ccc4c..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/protos/protos.json +++ /dev/null @@ -1,4446 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "orchestration": { - "nested": { - "airflow": { - "nested": { - "service": { - "nested": { - "v1": { - "options": { - "go_package": "cloud.google.com/go/orchestration/airflow/service/apiv1/servicepb;servicepb", - "java_multiple_files": true, - "java_package": "com.google.cloud.orchestration.airflow.service.v1", - "java_outer_classname": "OperationsProto" - }, - "nested": { - "Environments": { - "options": { - "(google.api.default_host)": "composer.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateEnvironment": { - "requestType": "CreateEnvironmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/environments", - "(google.api.http).body": "environment", - "(google.api.method_signature)": "parent,environment", - "(google.longrunning.operation_info).response_type": "Environment", - "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*}/environments", - "body": "environment" - } - }, - { - "(google.api.method_signature)": "parent,environment" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Environment", - "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - } - } - ] - }, - "GetEnvironment": { - "requestType": "GetEnvironmentRequest", - "responseType": "Environment", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/environments/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/environments/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListEnvironments": { - "requestType": "ListEnvironmentsRequest", - "responseType": "ListEnvironmentsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/environments", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/environments" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "UpdateEnvironment": { - "requestType": "UpdateEnvironmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{name=projects/*/locations/*/environments/*}", - "(google.api.http).body": "environment", - "(google.api.method_signature)": "name,environment,update_mask", - "(google.longrunning.operation_info).response_type": "Environment", - "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1/{name=projects/*/locations/*/environments/*}", - "body": "environment" - } - }, - { - "(google.api.method_signature)": "name,environment,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Environment", - "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - } - } - ] - }, - "DeleteEnvironment": { - "requestType": "DeleteEnvironmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/environments/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/environments/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - } - } - ] - }, - "ExecuteAirflowCommand": { - "requestType": "ExecuteAirflowCommandRequest", - "responseType": "ExecuteAirflowCommandResponse", - "options": { - "(google.api.http).post": "/v1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand", - "body": "*" - } - } - ] - }, - "StopAirflowCommand": { - "requestType": "StopAirflowCommandRequest", - "responseType": "StopAirflowCommandResponse", - "options": { - "(google.api.http).post": "/v1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand", - "body": "*" - } - } - ] - }, - "PollAirflowCommand": { - "requestType": "PollAirflowCommandRequest", - "responseType": "PollAirflowCommandResponse", - "options": { - "(google.api.http).post": "/v1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand", - "body": "*" - } - } - ] - }, - "ListWorkloads": { - "requestType": "ListWorkloadsRequest", - "responseType": "ListWorkloadsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/environments/*}/workloads", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/environments/*}/workloads" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "CheckUpgrade": { - "requestType": "CheckUpgradeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{environment=projects/*/locations/*/environments/*}:checkUpgrade", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse", - "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{environment=projects/*/locations/*/environments/*}:checkUpgrade", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse", - "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - } - } - ] - }, - "CreateUserWorkloadsSecret": { - "requestType": "CreateUserWorkloadsSecretRequest", - "responseType": "UserWorkloadsSecret", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets", - "(google.api.http).body": "user_workloads_secret", - "(google.api.method_signature)": "parent,user_workloads_secret" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets", - "body": "user_workloads_secret" - } - }, - { - "(google.api.method_signature)": "parent,user_workloads_secret" - } - ] - }, - "GetUserWorkloadsSecret": { - "requestType": "GetUserWorkloadsSecretRequest", - "responseType": "UserWorkloadsSecret", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListUserWorkloadsSecrets": { - "requestType": "ListUserWorkloadsSecretsRequest", - "responseType": "ListUserWorkloadsSecretsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "UpdateUserWorkloadsSecret": { - "requestType": "UpdateUserWorkloadsSecretRequest", - "responseType": "UserWorkloadsSecret", - "options": { - "(google.api.http).put": "/v1/{user_workloads_secret.name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}", - "(google.api.http).body": "user_workloads_secret", - "(google.api.method_signature)": "user_workloads_secret" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "put": "/v1/{user_workloads_secret.name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}", - "body": "user_workloads_secret" - } - }, - { - "(google.api.method_signature)": "user_workloads_secret" - } - ] - }, - "DeleteUserWorkloadsSecret": { - "requestType": "DeleteUserWorkloadsSecretRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateUserWorkloadsConfigMap": { - "requestType": "CreateUserWorkloadsConfigMapRequest", - "responseType": "UserWorkloadsConfigMap", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps", - "(google.api.http).body": "user_workloads_config_map", - "(google.api.method_signature)": "parent,user_workloads_config_map" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps", - "body": "user_workloads_config_map" - } - }, - { - "(google.api.method_signature)": "parent,user_workloads_config_map" - } - ] - }, - "GetUserWorkloadsConfigMap": { - "requestType": "GetUserWorkloadsConfigMapRequest", - "responseType": "UserWorkloadsConfigMap", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListUserWorkloadsConfigMaps": { - "requestType": "ListUserWorkloadsConfigMapsRequest", - "responseType": "ListUserWorkloadsConfigMapsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "UpdateUserWorkloadsConfigMap": { - "requestType": "UpdateUserWorkloadsConfigMapRequest", - "responseType": "UserWorkloadsConfigMap", - "options": { - "(google.api.http).put": "/v1/{user_workloads_config_map.name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}", - "(google.api.http).body": "user_workloads_config_map", - "(google.api.method_signature)": "user_workloads_config_map" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "put": "/v1/{user_workloads_config_map.name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}", - "body": "user_workloads_config_map" - } - }, - { - "(google.api.method_signature)": "user_workloads_config_map" - } - ] - }, - "DeleteUserWorkloadsConfigMap": { - "requestType": "DeleteUserWorkloadsConfigMapRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "SaveSnapshot": { - "requestType": "SaveSnapshotRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{environment=projects/*/locations/*/environments/*}:saveSnapshot", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse", - "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{environment=projects/*/locations/*/environments/*}:saveSnapshot", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse", - "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - } - } - ] - }, - "LoadSnapshot": { - "requestType": "LoadSnapshotRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{environment=projects/*/locations/*/environments/*}:loadSnapshot", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse", - "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{environment=projects/*/locations/*/environments/*}:loadSnapshot", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse", - "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - } - } - ] - }, - "DatabaseFailover": { - "requestType": "DatabaseFailoverRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{environment=projects/*/locations/*/environments/*}:databaseFailover", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse", - "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1/{environment=projects/*/locations/*/environments/*}:databaseFailover", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse", - "metadata_type": "google.cloud.orchestration.airflow.service.v1.OperationMetadata" - } - } - ] - }, - "FetchDatabaseProperties": { - "requestType": "FetchDatabasePropertiesRequest", - "responseType": "FetchDatabasePropertiesResponse", - "options": { - "(google.api.http).get": "/v1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties" - } - } - ] - } - } - }, - "CreateEnvironmentRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "environment": { - "type": "Environment", - "id": 2 - } - } - }, - "GetEnvironmentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "ListEnvironmentsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListEnvironmentsResponse": { - "fields": { - "environments": { - "rule": "repeated", - "type": "Environment", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "DeleteEnvironmentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "UpdateEnvironmentRequest": { - "fields": { - "name": { - "type": "string", - "id": 2 - }, - "environment": { - "type": "Environment", - "id": 1 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3 - } - } - }, - "ExecuteAirflowCommandRequest": { - "fields": { - "environment": { - "type": "string", - "id": 1 - }, - "command": { - "type": "string", - "id": 2 - }, - "subcommand": { - "type": "string", - "id": 3 - }, - "parameters": { - "rule": "repeated", - "type": "string", - "id": 4 - } - } - }, - "ExecuteAirflowCommandResponse": { - "fields": { - "executionId": { - "type": "string", - "id": 1 - }, - "pod": { - "type": "string", - "id": 2 - }, - "podNamespace": { - "type": "string", - "id": 3 - }, - "error": { - "type": "string", - "id": 4 - } - } - }, - "StopAirflowCommandRequest": { - "fields": { - "environment": { - "type": "string", - "id": 1 - }, - "executionId": { - "type": "string", - "id": 2 - }, - "pod": { - "type": "string", - "id": 3 - }, - "podNamespace": { - "type": "string", - "id": 4 - }, - "force": { - "type": "bool", - "id": 5 - } - } - }, - "StopAirflowCommandResponse": { - "fields": { - "isDone": { - "type": "bool", - "id": 1 - }, - "output": { - "rule": "repeated", - "type": "string", - "id": 2 - } - } - }, - "PollAirflowCommandRequest": { - "fields": { - "environment": { - "type": "string", - "id": 1 - }, - "executionId": { - "type": "string", - "id": 2 - }, - "pod": { - "type": "string", - "id": 3 - }, - "podNamespace": { - "type": "string", - "id": 4 - }, - "nextLineNumber": { - "type": "int32", - "id": 5 - } - } - }, - "PollAirflowCommandResponse": { - "fields": { - "output": { - "rule": "repeated", - "type": "Line", - "id": 1 - }, - "outputEnd": { - "type": "bool", - "id": 2 - }, - "exitInfo": { - "type": "ExitInfo", - "id": 3 - } - }, - "nested": { - "Line": { - "fields": { - "lineNumber": { - "type": "int32", - "id": 1 - }, - "content": { - "type": "string", - "id": 2 - } - } - }, - "ExitInfo": { - "fields": { - "exitCode": { - "type": "int32", - "id": 1 - }, - "error": { - "type": "string", - "id": 2 - } - } - } - } - }, - "CreateUserWorkloadsSecretRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/Environment" - } - }, - "userWorkloadsSecret": { - "type": "UserWorkloadsSecret", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GetUserWorkloadsSecretRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/UserWorkloadsSecret" - } - } - } - }, - "ListUserWorkloadsSecretsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/Environment" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateUserWorkloadsSecretRequest": { - "fields": { - "userWorkloadsSecret": { - "type": "UserWorkloadsSecret", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteUserWorkloadsSecretRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/UserWorkloadsSecret" - } - } - } - }, - "CreateUserWorkloadsConfigMapRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/Environment" - } - }, - "userWorkloadsConfigMap": { - "type": "UserWorkloadsConfigMap", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GetUserWorkloadsConfigMapRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/UserWorkloadsConfigMap" - } - } - } - }, - "ListUserWorkloadsConfigMapsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/Environment" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateUserWorkloadsConfigMapRequest": { - "fields": { - "userWorkloadsConfigMap": { - "type": "UserWorkloadsConfigMap", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteUserWorkloadsConfigMapRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/UserWorkloadsConfigMap" - } - } - } - }, - "UserWorkloadsSecret": { - "options": { - "(google.api.resource).type": "composer.googleapis.com/UserWorkloadsSecret", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}", - "(google.api.resource).plural": "userWorkloadsSecrets", - "(google.api.resource).singular": "userWorkloadsSecret" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "data": { - "keyType": "string", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListUserWorkloadsSecretsResponse": { - "fields": { - "userWorkloadsSecrets": { - "rule": "repeated", - "type": "UserWorkloadsSecret", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "UserWorkloadsConfigMap": { - "options": { - "(google.api.resource).type": "composer.googleapis.com/UserWorkloadsConfigMap", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}", - "(google.api.resource).plural": "userWorkloadsConfigMaps", - "(google.api.resource).singular": "userWorkloadsConfigMap" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "data": { - "keyType": "string", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListUserWorkloadsConfigMapsResponse": { - "fields": { - "userWorkloadsConfigMaps": { - "rule": "repeated", - "type": "UserWorkloadsConfigMap", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "ListWorkloadsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/Environment" - } - }, - "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" - } - } - } - }, - "ListWorkloadsResponse": { - "fields": { - "workloads": { - "rule": "repeated", - "type": "ComposerWorkload", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - }, - "nested": { - "ComposerWorkload": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "type": { - "type": "ComposerWorkloadType", - "id": 2 - }, - "status": { - "type": "ComposerWorkloadStatus", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ComposerWorkloadType": { - "values": { - "COMPOSER_WORKLOAD_TYPE_UNSPECIFIED": 0, - "CELERY_WORKER": 1, - "KUBERNETES_WORKER": 2, - "KUBERNETES_OPERATOR_POD": 3, - "SCHEDULER": 4, - "DAG_PROCESSOR": 5, - "TRIGGERER": 6, - "WEB_SERVER": 7, - "REDIS": 8 - } - }, - "ComposerWorkloadStatus": { - "fields": { - "state": { - "type": "ComposerWorkloadState", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "statusMessage": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "detailedStatusMessage": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ComposerWorkloadState": { - "values": { - "COMPOSER_WORKLOAD_STATE_UNSPECIFIED": 0, - "PENDING": 1, - "OK": 2, - "WARNING": 3, - "ERROR": 4, - "SUCCEEDED": 5, - "FAILED": 6 - } - } - } - }, - "SaveSnapshotRequest": { - "fields": { - "environment": { - "type": "string", - "id": 1 - }, - "snapshotLocation": { - "type": "string", - "id": 2 - } - } - }, - "SaveSnapshotResponse": { - "fields": { - "snapshotPath": { - "type": "string", - "id": 1 - } - } - }, - "LoadSnapshotRequest": { - "fields": { - "environment": { - "type": "string", - "id": 1 - }, - "snapshotPath": { - "type": "string", - "id": 2 - }, - "skipPypiPackagesInstallation": { - "type": "bool", - "id": 3 - }, - "skipEnvironmentVariablesSetting": { - "type": "bool", - "id": 4 - }, - "skipAirflowOverridesSetting": { - "type": "bool", - "id": 5 - }, - "skipGcsDataCopying": { - "type": "bool", - "id": 6 - } - } - }, - "LoadSnapshotResponse": { - "fields": {} - }, - "DatabaseFailoverRequest": { - "fields": { - "environment": { - "type": "string", - "id": 1 - } - } - }, - "DatabaseFailoverResponse": { - "fields": {} - }, - "FetchDatabasePropertiesRequest": { - "fields": { - "environment": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/Environment" - } - } - } - }, - "FetchDatabasePropertiesResponse": { - "fields": { - "primaryGceZone": { - "type": "string", - "id": 1 - }, - "secondaryGceZone": { - "type": "string", - "id": 2 - }, - "isFailoverReplicaAvailable": { - "type": "bool", - "id": 3 - } - } - }, - "StorageConfig": { - "fields": { - "bucket": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "EnvironmentConfig": { - "fields": { - "gkeCluster": { - "type": "string", - "id": 1 - }, - "dagGcsPrefix": { - "type": "string", - "id": 2 - }, - "nodeCount": { - "type": "int32", - "id": 3 - }, - "softwareConfig": { - "type": "SoftwareConfig", - "id": 4 - }, - "nodeConfig": { - "type": "NodeConfig", - "id": 5 - }, - "privateEnvironmentConfig": { - "type": "PrivateEnvironmentConfig", - "id": 7 - }, - "webServerNetworkAccessControl": { - "type": "WebServerNetworkAccessControl", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "databaseConfig": { - "type": "DatabaseConfig", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "webServerConfig": { - "type": "WebServerConfig", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "encryptionConfig": { - "type": "EncryptionConfig", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "maintenanceWindow": { - "type": "MaintenanceWindow", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "workloadsConfig": { - "type": "WorkloadsConfig", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "environmentSize": { - "type": "EnvironmentSize", - "id": 16, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "airflowUri": { - "type": "string", - "id": 6 - }, - "airflowByoidUri": { - "type": "string", - "id": 20, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "masterAuthorizedNetworksConfig": { - "type": "MasterAuthorizedNetworksConfig", - "id": 17, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "recoveryConfig": { - "type": "RecoveryConfig", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "resilienceMode": { - "type": "ResilienceMode", - "id": 19, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dataRetentionConfig": { - "type": "DataRetentionConfig", - "id": 21, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "EnvironmentSize": { - "values": { - "ENVIRONMENT_SIZE_UNSPECIFIED": 0, - "ENVIRONMENT_SIZE_SMALL": 1, - "ENVIRONMENT_SIZE_MEDIUM": 2, - "ENVIRONMENT_SIZE_LARGE": 3 - } - }, - "ResilienceMode": { - "values": { - "RESILIENCE_MODE_UNSPECIFIED": 0, - "HIGH_RESILIENCE": 1 - } - } - } - }, - "WebServerNetworkAccessControl": { - "fields": { - "allowedIpRanges": { - "rule": "repeated", - "type": "AllowedIpRange", - "id": 1 - } - }, - "nested": { - "AllowedIpRange": { - "fields": { - "value": { - "type": "string", - "id": 1 - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "DatabaseConfig": { - "fields": { - "machineType": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "WebServerConfig": { - "fields": { - "machineType": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "EncryptionConfig": { - "fields": { - "kmsKeyName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "MaintenanceWindow": { - "fields": { - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "recurrence": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "SoftwareConfig": { - "fields": { - "imageVersion": { - "type": "string", - "id": 1 - }, - "airflowConfigOverrides": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "pypiPackages": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "envVariables": { - "keyType": "string", - "type": "string", - "id": 4 - }, - "pythonVersion": { - "type": "string", - "id": 6 - }, - "schedulerCount": { - "type": "int32", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cloudDataLineageIntegration": { - "type": "CloudDataLineageIntegration", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "webServerPluginsMode": { - "type": "WebServerPluginsMode", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "WebServerPluginsMode": { - "values": { - "WEB_SERVER_PLUGINS_MODE_UNSPECIFIED": 0, - "PLUGINS_DISABLED": 1, - "PLUGINS_ENABLED": 2 - } - } - } - }, - "IPAllocationPolicy": { - "oneofs": { - "clusterIpAllocation": { - "oneof": [ - "clusterSecondaryRangeName", - "clusterIpv4CidrBlock" - ] - }, - "servicesIpAllocation": { - "oneof": [ - "servicesSecondaryRangeName", - "servicesIpv4CidrBlock" - ] - } - }, - "fields": { - "useIpAliases": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "clusterSecondaryRangeName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "clusterIpv4CidrBlock": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "servicesSecondaryRangeName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "servicesIpv4CidrBlock": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "NodeConfig": { - "fields": { - "location": { - "type": "string", - "id": 1 - }, - "machineType": { - "type": "string", - "id": 2 - }, - "network": { - "type": "string", - "id": 3 - }, - "subnetwork": { - "type": "string", - "id": 4 - }, - "diskSizeGb": { - "type": "int32", - "id": 5 - }, - "oauthScopes": { - "rule": "repeated", - "type": "string", - "id": 6 - }, - "serviceAccount": { - "type": "string", - "id": 7 - }, - "tags": { - "rule": "repeated", - "type": "string", - "id": 8 - }, - "ipAllocationPolicy": { - "type": "IPAllocationPolicy", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "enableIpMasqAgent": { - "type": "bool", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "composerNetworkAttachment": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "composerInternalIpv4CidrBlock": { - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "PrivateClusterConfig": { - "fields": { - "enablePrivateEndpoint": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "masterIpv4CidrBlock": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "masterIpv4ReservedRange": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "NetworkingConfig": { - "fields": { - "connectionType": { - "type": "ConnectionType", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "ConnectionType": { - "values": { - "CONNECTION_TYPE_UNSPECIFIED": 0, - "VPC_PEERING": 1, - "PRIVATE_SERVICE_CONNECT": 2 - } - } - } - }, - "PrivateEnvironmentConfig": { - "fields": { - "enablePrivateEnvironment": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "enablePrivateBuildsOnly": { - "type": "bool", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "privateClusterConfig": { - "type": "PrivateClusterConfig", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "webServerIpv4CidrBlock": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cloudSqlIpv4CidrBlock": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "webServerIpv4ReservedRange": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "cloudComposerNetworkIpv4CidrBlock": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cloudComposerNetworkIpv4ReservedRange": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "enablePrivatelyUsedPublicIps": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cloudComposerConnectionSubnetwork": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "networkingConfig": { - "type": "NetworkingConfig", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "WorkloadsConfig": { - "fields": { - "scheduler": { - "type": "SchedulerResource", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "webServer": { - "type": "WebServerResource", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "worker": { - "type": "WorkerResource", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "triggerer": { - "type": "TriggererResource", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dagProcessor": { - "type": "DagProcessorResource", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "SchedulerResource": { - "fields": { - "cpu": { - "type": "float", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "memoryGb": { - "type": "float", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "storageGb": { - "type": "float", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "count": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "WebServerResource": { - "fields": { - "cpu": { - "type": "float", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "memoryGb": { - "type": "float", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "storageGb": { - "type": "float", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "WorkerResource": { - "fields": { - "cpu": { - "type": "float", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "memoryGb": { - "type": "float", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "storageGb": { - "type": "float", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "minCount": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "maxCount": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "TriggererResource": { - "fields": { - "count": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cpu": { - "type": "float", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "memoryGb": { - "type": "float", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DagProcessorResource": { - "fields": { - "cpu": { - "type": "float", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "memoryGb": { - "type": "float", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "storageGb": { - "type": "float", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "count": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "RecoveryConfig": { - "fields": { - "scheduledSnapshotsConfig": { - "type": "ScheduledSnapshotsConfig", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ScheduledSnapshotsConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "snapshotLocation": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "snapshotCreationSchedule": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "timeZone": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "MasterAuthorizedNetworksConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "cidrBlocks": { - "rule": "repeated", - "type": "CidrBlock", - "id": 2 - } - }, - "nested": { - "CidrBlock": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "cidrBlock": { - "type": "string", - "id": 2 - } - } - } - } - }, - "CloudDataLineageIntegration": { - "fields": { - "enabled": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "Environment": { - "options": { - "(google.api.resource).type": "composer.googleapis.com/Environment", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/environments/{environment}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "config": { - "type": "EnvironmentConfig", - "id": 2 - }, - "uuid": { - "type": "string", - "id": 3 - }, - "state": { - "type": "State", - "id": 4 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 7 - }, - "satisfiesPzs": { - "type": "bool", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "satisfiesPzi": { - "type": "bool", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "storageConfig": { - "type": "StorageConfig", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "RUNNING": 2, - "UPDATING": 3, - "DELETING": 4, - "ERROR": 5 - } - } - } - }, - "CheckUpgradeRequest": { - "fields": { - "environment": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "imageVersion": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "CheckUpgradeResponse": { - "fields": { - "buildLogUri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "containsPypiModulesConflict": { - "type": "ConflictResult", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "pypiConflictBuildLogExtract": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "imageVersion": { - "type": "string", - "id": 5 - }, - "pypiDependencies": { - "keyType": "string", - "type": "string", - "id": 6 - } - }, - "nested": { - "ConflictResult": { - "values": { - "CONFLICT_RESULT_UNSPECIFIED": 0, - "CONFLICT": 1, - "NO_CONFLICT": 2 - } - } - } - }, - "DataRetentionConfig": { - "fields": { - "airflowMetadataRetentionConfig": { - "type": "AirflowMetadataRetentionPolicyConfig", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "taskLogsRetentionConfig": { - "type": "TaskLogsRetentionConfig", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "TaskLogsRetentionConfig": { - "fields": { - "storageMode": { - "type": "TaskLogsStorageMode", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "TaskLogsStorageMode": { - "values": { - "TASK_LOGS_STORAGE_MODE_UNSPECIFIED": 0, - "CLOUD_LOGGING_AND_CLOUD_STORAGE": 1, - "CLOUD_LOGGING_ONLY": 2 - } - } - } - }, - "AirflowMetadataRetentionPolicyConfig": { - "fields": { - "retentionMode": { - "type": "RetentionMode", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "retentionDays": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "RetentionMode": { - "values": { - "RETENTION_MODE_UNSPECIFIED": 0, - "RETENTION_MODE_ENABLED": 1, - "RETENTION_MODE_DISABLED": 2 - } - } - } - }, - "OperationMetadata": { - "fields": { - "state": { - "type": "State", - "id": 1 - }, - "operationType": { - "type": "Type", - "id": 2 - }, - "resource": { - "type": "string", - "id": 3 - }, - "resourceUuid": { - "type": "string", - "id": 4 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - } - }, - "nested": { - "State": { - "options": { - "allow_alias": true - }, - "values": { - "STATE_UNSPECIFIED": 0, - "PENDING": 1, - "RUNNING": 2, - "SUCCEEDED": 3, - "SUCCESSFUL": 3, - "FAILED": 4 - } - }, - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "CREATE": 1, - "DELETE": 2, - "UPDATE": 3, - "CHECK": 4, - "SAVE_SNAPSHOT": 5, - "LOAD_SNAPSHOT": 6, - "DATABASE_FAILOVER": 7 - } - } - } - }, - "ImageVersions": { - "options": { - "(google.api.default_host)": "composer.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListImageVersions": { - "requestType": "ListImageVersionsRequest", - "responseType": "ListImageVersionsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/locations/*}/imageVersions", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1/{parent=projects/*/locations/*}/imageVersions" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - } - } - }, - "ListImageVersionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "includePastReleases": { - "type": "bool", - "id": 4 - } - } - }, - "ListImageVersionsResponse": { - "fields": { - "imageVersions": { - "rule": "repeated", - "type": "ImageVersion", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "ImageVersion": { - "fields": { - "imageVersionId": { - "type": "string", - "id": 1 - }, - "isDefault": { - "type": "bool", - "id": 2 - }, - "supportedPythonVersions": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "releaseDate": { - "type": "google.type.Date", - "id": 4 - }, - "creationDisabled": { - "type": "bool", - "id": 5 - }, - "upgradeDisabled": { - "type": "bool", - "id": 6 - } - } - } - } - } - } - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "ResourceProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "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 - } - }, - "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 - } - } - } - } - }, - "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": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "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": { - "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, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "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": { - "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": { - "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": { - "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": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "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": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "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": { - "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": { - "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": { - "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, - "options": { - "packed": false - } - }, - "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": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "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": { - "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": { - "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": { - "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": { - "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": { - "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": { - "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": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "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 - } - } - } - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - } - } - }, - "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 - } - } - } - } - }, - "type": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/type/date;date", - "java_multiple_files": true, - "java_outer_classname": "DateProto", - "java_package": "com.google.type", - "objc_class_prefix": "GTP" - }, - "nested": { - "Date": { - "fields": { - "year": { - "type": "int32", - "id": 1 - }, - "month": { - "type": "int32", - "id": 2 - }, - "day": { - "type": "int32", - "id": 3 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.check_upgrade.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.check_upgrade.js deleted file mode 100644 index b594695a08f..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.check_upgrade.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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(environment) { - // [START composer_v1_generated_Environments_CheckUpgrade_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 environment to check upgrade for, in the - * form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const environment = 'abc123' - /** - * Optional. The version of the software running in the environment. - * This encapsulates both the version of Cloud Composer functionality and the - * version of Apache Airflow. It must match the regular expression - * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. - * When used as input, the server also checks if the provided version is - * supported and denies the request for an unsupported version. - * The Cloud Composer portion of the image version is a full - * semantic version (https://semver.org), or an alias in the form of major - * version number or `latest`. When an alias is provided, the server replaces - * it with the current Cloud Composer version that satisfies the alias. - * The Apache Airflow portion of the image version is a full semantic version - * that points to one of the supported Apache Airflow versions, or an alias in - * the form of only major or major.minor versions specified. When an alias is - * provided, the server replaces it with the latest Apache Airflow version - * that satisfies the alias and is supported in the given Cloud Composer - * version. - * In all cases, the resolved image version is stored in the same field. - * See also version - * list (/composer/docs/concepts/versioning/composer-versions) and versioning - * overview (/composer/docs/concepts/versioning/composer-versioning-overview). - */ - // const imageVersion = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callCheckUpgrade() { - // Construct request - const request = { - environment, - }; - - // Run request - const [operation] = await serviceClient.checkUpgrade(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCheckUpgrade(); - // [END composer_v1_generated_Environments_CheckUpgrade_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-orchestration-airflow-service/v1/samples/generated/v1/environments.create_environment.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_environment.js deleted file mode 100644 index 22f0e829ca3..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_environment.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1_generated_Environments_CreateEnvironment_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. - */ - /** - * The parent must be of the form - * "projects/{projectId}/locations/{locationId}". - */ - // const parent = 'abc123' - /** - * The environment to create. - */ - // const environment = {} - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callCreateEnvironment() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await serviceClient.createEnvironment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateEnvironment(); - // [END composer_v1_generated_Environments_CreateEnvironment_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-orchestration-airflow-service/v1/samples/generated/v1/environments.create_user_workloads_config_map.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_user_workloads_config_map.js deleted file mode 100644 index 4c20921479a..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_user_workloads_config_map.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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, userWorkloadsConfigMap) { - // [START composer_v1_generated_Environments_CreateUserWorkloadsConfigMap_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 environment name to create a ConfigMap for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const parent = 'abc123' - /** - * Required. User workloads ConfigMap to create. - */ - // const userWorkloadsConfigMap = {} - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callCreateUserWorkloadsConfigMap() { - // Construct request - const request = { - parent, - userWorkloadsConfigMap, - }; - - // Run request - const response = await serviceClient.createUserWorkloadsConfigMap(request); - console.log(response); - } - - callCreateUserWorkloadsConfigMap(); - // [END composer_v1_generated_Environments_CreateUserWorkloadsConfigMap_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-orchestration-airflow-service/v1/samples/generated/v1/environments.create_user_workloads_secret.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_user_workloads_secret.js deleted file mode 100644 index 75852c31d7f..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.create_user_workloads_secret.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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, userWorkloadsSecret) { - // [START composer_v1_generated_Environments_CreateUserWorkloadsSecret_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 environment name to create a Secret for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const parent = 'abc123' - /** - * Required. User workloads Secret to create. - */ - // const userWorkloadsSecret = {} - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callCreateUserWorkloadsSecret() { - // Construct request - const request = { - parent, - userWorkloadsSecret, - }; - - // Run request - const response = await serviceClient.createUserWorkloadsSecret(request); - console.log(response); - } - - callCreateUserWorkloadsSecret(); - // [END composer_v1_generated_Environments_CreateUserWorkloadsSecret_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-orchestration-airflow-service/v1/samples/generated/v1/environments.database_failover.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.database_failover.js deleted file mode 100644 index af9cde8a706..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.database_failover.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1_generated_Environments_DatabaseFailover_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. - */ - /** - * Target environment: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const environment = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callDatabaseFailover() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await serviceClient.databaseFailover(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDatabaseFailover(); - // [END composer_v1_generated_Environments_DatabaseFailover_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-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_environment.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_environment.js deleted file mode 100644 index b9d992858e3..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_environment.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1_generated_Environments_DeleteEnvironment_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. - */ - /** - * The environment to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const name = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callDeleteEnvironment() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await serviceClient.deleteEnvironment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteEnvironment(); - // [END composer_v1_generated_Environments_DeleteEnvironment_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-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_user_workloads_config_map.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_user_workloads_config_map.js deleted file mode 100644 index 8f28c379029..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_user_workloads_config_map.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 composer_v1_generated_Environments_DeleteUserWorkloadsConfigMap_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 ConfigMap to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - */ - // const name = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callDeleteUserWorkloadsConfigMap() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await serviceClient.deleteUserWorkloadsConfigMap(request); - console.log(response); - } - - callDeleteUserWorkloadsConfigMap(); - // [END composer_v1_generated_Environments_DeleteUserWorkloadsConfigMap_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-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_user_workloads_secret.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_user_workloads_secret.js deleted file mode 100644 index 9ac2ee56366..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.delete_user_workloads_secret.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 composer_v1_generated_Environments_DeleteUserWorkloadsSecret_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 Secret to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - */ - // const name = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callDeleteUserWorkloadsSecret() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await serviceClient.deleteUserWorkloadsSecret(request); - console.log(response); - } - - callDeleteUserWorkloadsSecret(); - // [END composer_v1_generated_Environments_DeleteUserWorkloadsSecret_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-orchestration-airflow-service/v1/samples/generated/v1/environments.execute_airflow_command.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.execute_airflow_command.js deleted file mode 100644 index af19babf6c2..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.execute_airflow_command.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1_generated_Environments_ExecuteAirflowCommand_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. - */ - /** - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - */ - // const environment = 'abc123' - /** - * Airflow command. - */ - // const command = 'abc123' - /** - * Airflow subcommand. - */ - // const subcommand = 'abc123' - /** - * Parameters for the Airflow command/subcommand as an array of arguments. - * It may contain positional arguments like `["my-dag-id"]`, key-value - * parameters like `["--foo=bar"]` or `["--foo","bar"]`, - * or other flags like `["-f"]`. - */ - // const parameters = ['abc','def'] - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callExecuteAirflowCommand() { - // Construct request - const request = { - }; - - // Run request - const response = await serviceClient.executeAirflowCommand(request); - console.log(response); - } - - callExecuteAirflowCommand(); - // [END composer_v1_generated_Environments_ExecuteAirflowCommand_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-orchestration-airflow-service/v1/samples/generated/v1/environments.fetch_database_properties.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.fetch_database_properties.js deleted file mode 100644 index 39b89991384..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.fetch_database_properties.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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(environment) { - // [START composer_v1_generated_Environments_FetchDatabaseProperties_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 environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const environment = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callFetchDatabaseProperties() { - // Construct request - const request = { - environment, - }; - - // Run request - const response = await serviceClient.fetchDatabaseProperties(request); - console.log(response); - } - - callFetchDatabaseProperties(); - // [END composer_v1_generated_Environments_FetchDatabaseProperties_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-orchestration-airflow-service/v1/samples/generated/v1/environments.get_environment.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_environment.js deleted file mode 100644 index 44e616d7efa..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_environment.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1_generated_Environments_GetEnvironment_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. - */ - /** - * The resource name of the environment to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const name = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callGetEnvironment() { - // Construct request - const request = { - }; - - // Run request - const response = await serviceClient.getEnvironment(request); - console.log(response); - } - - callGetEnvironment(); - // [END composer_v1_generated_Environments_GetEnvironment_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-orchestration-airflow-service/v1/samples/generated/v1/environments.get_user_workloads_config_map.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_user_workloads_config_map.js deleted file mode 100644 index c9fbf65a785..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_user_workloads_config_map.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 composer_v1_generated_Environments_GetUserWorkloadsConfigMap_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 ConfigMap to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - */ - // const name = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callGetUserWorkloadsConfigMap() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await serviceClient.getUserWorkloadsConfigMap(request); - console.log(response); - } - - callGetUserWorkloadsConfigMap(); - // [END composer_v1_generated_Environments_GetUserWorkloadsConfigMap_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-orchestration-airflow-service/v1/samples/generated/v1/environments.get_user_workloads_secret.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_user_workloads_secret.js deleted file mode 100644 index e81364b058f..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.get_user_workloads_secret.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 composer_v1_generated_Environments_GetUserWorkloadsSecret_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 Secret to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - */ - // const name = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callGetUserWorkloadsSecret() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await serviceClient.getUserWorkloadsSecret(request); - console.log(response); - } - - callGetUserWorkloadsSecret(); - // [END composer_v1_generated_Environments_GetUserWorkloadsSecret_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-orchestration-airflow-service/v1/samples/generated/v1/environments.list_environments.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_environments.js deleted file mode 100644 index 39900edd8d9..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_environments.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1_generated_Environments_ListEnvironments_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. - */ - /** - * List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - */ - // const parent = 'abc123' - /** - * The maximum number of environments to return. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous List request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callListEnvironments() { - // Construct request - const request = { - }; - - // Run request - const iterable = serviceClient.listEnvironmentsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEnvironments(); - // [END composer_v1_generated_Environments_ListEnvironments_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-orchestration-airflow-service/v1/samples/generated/v1/environments.list_user_workloads_config_maps.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_user_workloads_config_maps.js deleted file mode 100644 index 47e7653c6b3..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_user_workloads_config_maps.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 composer_v1_generated_Environments_ListUserWorkloadsConfigMaps_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. List ConfigMaps in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of ConfigMaps to return. - */ - // const pageSize = 1234 - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - */ - // const pageToken = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callListUserWorkloadsConfigMaps() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = serviceClient.listUserWorkloadsConfigMapsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListUserWorkloadsConfigMaps(); - // [END composer_v1_generated_Environments_ListUserWorkloadsConfigMaps_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-orchestration-airflow-service/v1/samples/generated/v1/environments.list_user_workloads_secrets.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_user_workloads_secrets.js deleted file mode 100644 index ce912dca061..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_user_workloads_secrets.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 composer_v1_generated_Environments_ListUserWorkloadsSecrets_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. List Secrets in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of Secrets to return. - */ - // const pageSize = 1234 - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - */ - // const pageToken = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callListUserWorkloadsSecrets() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = serviceClient.listUserWorkloadsSecretsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListUserWorkloadsSecrets(); - // [END composer_v1_generated_Environments_ListUserWorkloadsSecrets_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-orchestration-airflow-service/v1/samples/generated/v1/environments.list_workloads.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_workloads.js deleted file mode 100644 index 3999b121fe9..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.list_workloads.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 composer_v1_generated_Environments_ListWorkloads_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 environment name to get workloads for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of environments to return. - */ - // const pageSize = 1234 - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - */ - // const pageToken = 'abc123' - /** - * Optional. The list filter. - * Currently only supports equality on the type field. The value of a field - * specified in the filter expression must be one ComposerWorkloadType enum - * option. It's possible to get multiple types using "OR" operator, e.g.: - * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are - * returned. - */ - // const filter = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callListWorkloads() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = serviceClient.listWorkloadsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListWorkloads(); - // [END composer_v1_generated_Environments_ListWorkloads_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-orchestration-airflow-service/v1/samples/generated/v1/environments.load_snapshot.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.load_snapshot.js deleted file mode 100644 index 438863f550f..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.load_snapshot.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1_generated_Environments_LoadSnapshot_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. - */ - /** - * The resource name of the target environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const environment = 'abc123' - /** - * A Cloud Storage path to a snapshot to load, e.g.: - * "gs://my-bucket/snapshots/project_location_environment_timestamp". - */ - // const snapshotPath = 'abc123' - /** - * Whether or not to skip installing Pypi packages when loading the - * environment's state. - */ - // const skipPypiPackagesInstallation = true - /** - * Whether or not to skip setting environment variables when loading the - * environment's state. - */ - // const skipEnvironmentVariablesSetting = true - /** - * Whether or not to skip setting Airflow overrides when loading the - * environment's state. - */ - // const skipAirflowOverridesSetting = true - /** - * Whether or not to skip copying Cloud Storage data when loading the - * environment's state. - */ - // const skipGcsDataCopying = true - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callLoadSnapshot() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await serviceClient.loadSnapshot(request); - const [response] = await operation.promise(); - console.log(response); - } - - callLoadSnapshot(); - // [END composer_v1_generated_Environments_LoadSnapshot_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-orchestration-airflow-service/v1/samples/generated/v1/environments.poll_airflow_command.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.poll_airflow_command.js deleted file mode 100644 index ff29827a5df..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.poll_airflow_command.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1_generated_Environments_PollAirflowCommand_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. - */ - /** - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const environment = 'abc123' - /** - * The unique ID of the command execution. - */ - // const executionId = 'abc123' - /** - * The name of the pod where the command is executed. - */ - // const pod = 'abc123' - /** - * The namespace of the pod where the command is executed. - */ - // const podNamespace = 'abc123' - /** - * Line number from which new logs should be fetched. - */ - // const nextLineNumber = 1234 - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callPollAirflowCommand() { - // Construct request - const request = { - }; - - // Run request - const response = await serviceClient.pollAirflowCommand(request); - console.log(response); - } - - callPollAirflowCommand(); - // [END composer_v1_generated_Environments_PollAirflowCommand_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-orchestration-airflow-service/v1/samples/generated/v1/environments.save_snapshot.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.save_snapshot.js deleted file mode 100644 index 70c2382f835..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.save_snapshot.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1_generated_Environments_SaveSnapshot_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. - */ - /** - * The resource name of the source environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const environment = 'abc123' - /** - * Location in a Cloud Storage where the snapshot is going to be stored, e.g.: - * "gs://my-bucket/snapshots". - */ - // const snapshotLocation = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callSaveSnapshot() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await serviceClient.saveSnapshot(request); - const [response] = await operation.promise(); - console.log(response); - } - - callSaveSnapshot(); - // [END composer_v1_generated_Environments_SaveSnapshot_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-orchestration-airflow-service/v1/samples/generated/v1/environments.stop_airflow_command.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.stop_airflow_command.js deleted file mode 100644 index f73bb01b6e6..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.stop_airflow_command.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1_generated_Environments_StopAirflowCommand_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. - */ - /** - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - */ - // const environment = 'abc123' - /** - * The unique ID of the command execution. - */ - // const executionId = 'abc123' - /** - * The name of the pod where the command is executed. - */ - // const pod = 'abc123' - /** - * The namespace of the pod where the command is executed. - */ - // const podNamespace = 'abc123' - /** - * If true, the execution is terminated forcefully (SIGKILL). If false, the - * execution is stopped gracefully, giving it time for cleanup. - */ - // const force = true - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callStopAirflowCommand() { - // Construct request - const request = { - }; - - // Run request - const response = await serviceClient.stopAirflowCommand(request); - console.log(response); - } - - callStopAirflowCommand(); - // [END composer_v1_generated_Environments_StopAirflowCommand_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-orchestration-airflow-service/v1/samples/generated/v1/environments.update_environment.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_environment.js deleted file mode 100644 index 0282e75ad83..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_environment.js +++ /dev/null @@ -1,184 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1_generated_Environments_UpdateEnvironment_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. - */ - /** - * The relative resource name of the environment to update, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const name = 'abc123' - /** - * A patch environment. Fields specified by the `updateMask` will be copied - * from the patch environment into the environment under update. - */ - // const environment = {} - /** - * Required. A comma-separated list of paths, relative to `Environment`, of - * fields to update. - * For example, to set the version of scikit-learn to install in the - * environment to 0.19.0 and to remove an existing installation of - * numpy, the `updateMask` parameter would include the following two - * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and - * "config.softwareConfig.pypiPackages.numpy". The included patch - * environment would specify the scikit-learn version as follows: - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "scikit-learn":"==0.19.0" - * } - * } - * } - * } - * Note that in the above example, any existing PyPI packages - * other than scikit-learn and numpy will be unaffected. - * Only one update type may be included in a single request's `updateMask`. - * For example, one cannot update both the PyPI packages and - * labels in the same request. However, it is possible to update multiple - * members of a map field simultaneously in the same request. For example, - * to set the labels "label1" and "label2" while clearing "label3" (assuming - * it already exists), one can - * provide the paths "labels.label1", "labels.label2", and "labels.label3" - * and populate the patch environment as follows: - * { - * "labels":{ - * "label1":"new-label1-value" - * "label2":"new-label2-value" - * } - * } - * Note that in the above example, any existing labels that are not - * included in the `updateMask` will be unaffected. - * It is also possible to replace an entire map field by providing the - * map field's path in the `updateMask`. The new value of the field will - * be that which is provided in the patch environment. For example, to - * delete all pre-existing user-specified PyPI packages and - * install botocore at version 1.7.14, the `updateMask` would contain - * the path "config.softwareConfig.pypiPackages", and - * the patch environment would be the following: - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "botocore":"==1.7.14" - * } - * } - * } - * } - * **Note:** Only the following fields can be updated: - * * `config.softwareConfig.pypiPackages` - * * Replace all custom custom PyPI packages. If a replacement - * package map is not included in `environment`, all custom - * PyPI packages are cleared. It is an error to provide both - * this mask and a mask specifying an individual package. - * * `config.softwareConfig.pypiPackages.`packagename - * * Update the custom PyPI package *packagename*, - * preserving other packages. To delete the package, include it in - * `updateMask`, and omit the mapping for it in - * `environment.config.softwareConfig.pypiPackages`. It is an error - * to provide both a mask of this form and the - * `config.softwareConfig.pypiPackages` mask. - * * `labels` - * * Replace all environment labels. If a replacement labels map is not - * included in `environment`, all labels are cleared. It is an error to - * provide both this mask and a mask specifying one or more individual - * labels. - * * `labels.`labelName - * * Set the label named *labelName*, while preserving other - * labels. To delete the label, include it in `updateMask` and omit its - * mapping in `environment.labels`. It is an error to provide both a - * mask of this form and the `labels` mask. - * * `config.nodeCount` - * * Horizontally scale the number of nodes in the environment. An integer - * greater than or equal to 3 must be provided in the `config.nodeCount` - * field. Supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * * `config.webServerNetworkAccessControl` - * * Replace the environment's current `WebServerNetworkAccessControl`. - * * `config.softwareConfig.airflowConfigOverrides` - * * Replace all Apache Airflow config overrides. If a replacement config - * overrides map is not included in `environment`, all config overrides - * are cleared. - * It is an error to provide both this mask and a mask specifying one or - * more individual config overrides. - * * `config.softwareConfig.airflowConfigOverrides.`section-name - * * Override the Apache Airflow config property *name* in the - * section named *section*, preserving other properties. To - * delete the property override, include it in `updateMask` and omit its - * mapping in - * `environment.config.softwareConfig.airflowConfigOverrides`. - * It is an error to provide both a mask of this form and the - * `config.softwareConfig.airflowConfigOverrides` mask. - * * `config.softwareConfig.envVariables` - * * Replace all environment variables. If a replacement environment - * variable map is not included in `environment`, all custom environment - * variables are cleared. - * * `config.softwareConfig.schedulerCount` - * * Horizontally scale the number of schedulers in Airflow. A positive - * integer not greater than the number of nodes must be provided in the - * `config.softwareConfig.schedulerCount` field. Supported for Cloud - * Composer environments in versions composer-1.*.*-airflow-2.*.*. - * * `config.databaseConfig.machineType` - * * Cloud SQL machine type used by Airflow database. - * It has to be one of: db-n1-standard-2, db-n1-standard-4, - * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer - * environments in versions composer-1.*.*-airflow-*.*.*. - * * `config.webServerConfig.machineType` - * * Machine type on which Airflow web server is running. - * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 - * or composer-n1-webserver-8. Supported for Cloud Composer environments - * in versions composer-1.*.*-airflow-*.*.*. - */ - // const updateMask = {} - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callUpdateEnvironment() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await serviceClient.updateEnvironment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateEnvironment(); - // [END composer_v1_generated_Environments_UpdateEnvironment_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-orchestration-airflow-service/v1/samples/generated/v1/environments.update_user_workloads_config_map.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_user_workloads_config_map.js deleted file mode 100644 index 99cfd1b4a3e..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_user_workloads_config_map.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1_generated_Environments_UpdateUserWorkloadsConfigMap_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. User workloads ConfigMap to override. - */ - // const userWorkloadsConfigMap = {} - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callUpdateUserWorkloadsConfigMap() { - // Construct request - const request = { - }; - - // Run request - const response = await serviceClient.updateUserWorkloadsConfigMap(request); - console.log(response); - } - - callUpdateUserWorkloadsConfigMap(); - // [END composer_v1_generated_Environments_UpdateUserWorkloadsConfigMap_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-orchestration-airflow-service/v1/samples/generated/v1/environments.update_user_workloads_secret.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_user_workloads_secret.js deleted file mode 100644 index 3f12fb0b7db..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/environments.update_user_workloads_secret.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1_generated_Environments_UpdateUserWorkloadsSecret_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. User workloads Secret to override. - */ - // const userWorkloadsSecret = {} - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callUpdateUserWorkloadsSecret() { - // Construct request - const request = { - }; - - // Run request - const response = await serviceClient.updateUserWorkloadsSecret(request); - console.log(response); - } - - callUpdateUserWorkloadsSecret(); - // [END composer_v1_generated_Environments_UpdateUserWorkloadsSecret_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-orchestration-airflow-service/v1/samples/generated/v1/image_versions.list_image_versions.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/image_versions.list_image_versions.js deleted file mode 100644 index 1c70cd85eb6..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/image_versions.list_image_versions.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1_generated_ImageVersions_ListImageVersions_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. - */ - /** - * List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - */ - // const parent = 'abc123' - /** - * The maximum number of image_versions to return. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous List request, if any. - */ - // const pageToken = 'abc123' - /** - * Whether or not image versions from old releases should be included. - */ - // const includePastReleases = true - - // Imports the Service library - const {ImageVersionsClient} = require('@google-cloud/orchestration-airflow').v1; - - // Instantiates a client - const serviceClient = new ImageVersionsClient(); - - async function callListImageVersions() { - // Construct request - const request = { - }; - - // Run request - const iterable = serviceClient.listImageVersionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListImageVersions(); - // [END composer_v1_generated_ImageVersions_ListImageVersions_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-orchestration-airflow-service/v1/samples/generated/v1/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json deleted file mode 100644 index b85ea225bf1..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/samples/generated/v1/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json +++ /dev/null @@ -1,1155 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-service", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.orchestration.airflow.service.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "regionTag": "composer_v1_generated_Environments_CreateEnvironment_async", - "title": "Environments createEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Create a new environment.", - "canonical": true, - "file": "environments.create_environment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateEnvironment", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "environment", - "type": ".google.cloud.orchestration.airflow.service.v1.Environment" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "CreateEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateEnvironment", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_GetEnvironment_async", - "title": "Environments getEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Get an existing environment.", - "canonical": true, - "file": "environments.get_environment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetEnvironment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.Environment", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "GetEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetEnvironment", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_ListEnvironments_async", - "title": "Environments listEnvironments Sample", - "origin": "API_DEFINITION", - "description": " List environments.", - "canonical": true, - "file": "environments.list_environments.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEnvironments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListEnvironments", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.ListEnvironmentsResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "ListEnvironments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListEnvironments", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_UpdateEnvironment_async", - "title": "Environments updateEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Update an environment.", - "canonical": true, - "file": "environments.update_environment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 176, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateEnvironment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "environment", - "type": ".google.cloud.orchestration.airflow.service.v1.Environment" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "UpdateEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateEnvironment", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_DeleteEnvironment_async", - "title": "Environments deleteEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Delete an environment.", - "canonical": true, - "file": "environments.delete_environment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteEnvironment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "DeleteEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteEnvironment", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_ExecuteAirflowCommand_async", - "title": "Environments executeAirflowCommand Sample", - "origin": "API_DEFINITION", - "description": " Executes Airflow CLI command.", - "canonical": true, - "file": "environments.execute_airflow_command.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExecuteAirflowCommand", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ExecuteAirflowCommand", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - }, - { - "name": "command", - "type": "TYPE_STRING" - }, - { - "name": "subcommand", - "type": "TYPE_STRING" - }, - { - "name": "parameters", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "ExecuteAirflowCommand", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ExecuteAirflowCommand", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_StopAirflowCommand_async", - "title": "Environments stopAirflowCommand Sample", - "origin": "API_DEFINITION", - "description": " Stops Airflow CLI command execution.", - "canonical": true, - "file": "environments.stop_airflow_command.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "StopAirflowCommand", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.StopAirflowCommand", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - }, - { - "name": "execution_id", - "type": "TYPE_STRING" - }, - { - "name": "pod", - "type": "TYPE_STRING" - }, - { - "name": "pod_namespace", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "StopAirflowCommand", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.StopAirflowCommand", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_PollAirflowCommand_async", - "title": "Environments pollAirflowCommand Sample", - "origin": "API_DEFINITION", - "description": " Polls Airflow CLI command execution and fetches logs.", - "canonical": true, - "file": "environments.poll_airflow_command.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PollAirflowCommand", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.PollAirflowCommand", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - }, - { - "name": "execution_id", - "type": "TYPE_STRING" - }, - { - "name": "pod", - "type": "TYPE_STRING" - }, - { - "name": "pod_namespace", - "type": "TYPE_STRING" - }, - { - "name": "next_line_number", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "PollAirflowCommand", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.PollAirflowCommand", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_ListWorkloads_async", - "title": "Environments listWorkloads Sample", - "origin": "API_DEFINITION", - "description": " Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer component. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.list_workloads.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListWorkloads", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListWorkloads", - "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" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "ListWorkloads", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListWorkloads", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_CheckUpgrade_async", - "title": "Environments checkUpgrade Sample", - "origin": "API_DEFINITION", - "description": " Check if an upgrade operation on the environment will succeed. In case of problems detailed info can be found in the returned Operation.", - "canonical": true, - "file": "environments.check_upgrade.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CheckUpgrade", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CheckUpgrade", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - }, - { - "name": "image_version", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "CheckUpgrade", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CheckUpgrade", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_CreateUserWorkloadsSecret_async", - "title": "Environments createUserWorkloadsSecret Sample", - "origin": "API_DEFINITION", - "description": " Creates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.create_user_workloads_secret.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateUserWorkloadsSecret", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateUserWorkloadsSecret", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "user_workloads_secret", - "type": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "CreateUserWorkloadsSecret", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateUserWorkloadsSecret", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_GetUserWorkloadsSecret_async", - "title": "Environments getUserWorkloadsSecret Sample", - "origin": "API_DEFINITION", - "description": " Gets an existing user workloads Secret. Values of the \"data\" field in the response are cleared. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.get_user_workloads_secret.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetUserWorkloadsSecret", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetUserWorkloadsSecret", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "GetUserWorkloadsSecret", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetUserWorkloadsSecret", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_ListUserWorkloadsSecrets_async", - "title": "Environments listUserWorkloadsSecrets Sample", - "origin": "API_DEFINITION", - "description": " Lists user workloads Secrets. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.list_user_workloads_secrets.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListUserWorkloadsSecrets", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListUserWorkloadsSecrets", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "ListUserWorkloadsSecrets", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListUserWorkloadsSecrets", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_UpdateUserWorkloadsSecret_async", - "title": "Environments updateUserWorkloadsSecret Sample", - "origin": "API_DEFINITION", - "description": " Updates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.update_user_workloads_secret.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 52, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateUserWorkloadsSecret", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateUserWorkloadsSecret", - "async": true, - "parameters": [ - { - "name": "user_workloads_secret", - "type": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "UpdateUserWorkloadsSecret", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateUserWorkloadsSecret", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_DeleteUserWorkloadsSecret_async", - "title": "Environments deleteUserWorkloadsSecret Sample", - "origin": "API_DEFINITION", - "description": " Deletes a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.delete_user_workloads_secret.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteUserWorkloadsSecret", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteUserWorkloadsSecret", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "DeleteUserWorkloadsSecret", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteUserWorkloadsSecret", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_CreateUserWorkloadsConfigMap_async", - "title": "Environments createUserWorkloadsConfigMap Sample", - "origin": "API_DEFINITION", - "description": " Creates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.create_user_workloads_config_map.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateUserWorkloadsConfigMap", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateUserWorkloadsConfigMap", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "user_workloads_config_map", - "type": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "CreateUserWorkloadsConfigMap", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.CreateUserWorkloadsConfigMap", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_GetUserWorkloadsConfigMap_async", - "title": "Environments getUserWorkloadsConfigMap Sample", - "origin": "API_DEFINITION", - "description": " Gets an existing user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.get_user_workloads_config_map.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetUserWorkloadsConfigMap", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetUserWorkloadsConfigMap", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "GetUserWorkloadsConfigMap", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.GetUserWorkloadsConfigMap", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_ListUserWorkloadsConfigMaps_async", - "title": "Environments listUserWorkloadsConfigMaps Sample", - "origin": "API_DEFINITION", - "description": " Lists user workloads ConfigMaps. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.list_user_workloads_config_maps.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListUserWorkloadsConfigMaps", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListUserWorkloadsConfigMaps", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "ListUserWorkloadsConfigMaps", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.ListUserWorkloadsConfigMaps", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_UpdateUserWorkloadsConfigMap_async", - "title": "Environments updateUserWorkloadsConfigMap Sample", - "origin": "API_DEFINITION", - "description": " Updates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.update_user_workloads_config_map.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 52, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateUserWorkloadsConfigMap", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateUserWorkloadsConfigMap", - "async": true, - "parameters": [ - { - "name": "user_workloads_config_map", - "type": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "UpdateUserWorkloadsConfigMap", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.UpdateUserWorkloadsConfigMap", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_DeleteUserWorkloadsConfigMap_async", - "title": "Environments deleteUserWorkloadsConfigMap Sample", - "origin": "API_DEFINITION", - "description": " Deletes a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.delete_user_workloads_config_map.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteUserWorkloadsConfigMap", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteUserWorkloadsConfigMap", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "DeleteUserWorkloadsConfigMap", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DeleteUserWorkloadsConfigMap", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_SaveSnapshot_async", - "title": "Environments saveSnapshot Sample", - "origin": "API_DEFINITION", - "description": " Creates a snapshots of a Cloud Composer environment. As a result of this operation, snapshot of environment's state is stored in a location specified in the SaveSnapshotRequest.", - "canonical": true, - "file": "environments.save_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SaveSnapshot", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.SaveSnapshot", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - }, - { - "name": "snapshot_location", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "SaveSnapshot", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.SaveSnapshot", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_LoadSnapshot_async", - "title": "Environments loadSnapshot Sample", - "origin": "API_DEFINITION", - "description": " Loads a snapshot of a Cloud Composer environment. As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest is loaded into the environment.", - "canonical": true, - "file": "environments.load_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "LoadSnapshot", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.LoadSnapshot", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - }, - { - "name": "snapshot_path", - "type": "TYPE_STRING" - }, - { - "name": "skip_pypi_packages_installation", - "type": "TYPE_BOOL" - }, - { - "name": "skip_environment_variables_setting", - "type": "TYPE_BOOL" - }, - { - "name": "skip_airflow_overrides_setting", - "type": "TYPE_BOOL" - }, - { - "name": "skip_gcs_data_copying", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "LoadSnapshot", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.LoadSnapshot", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_DatabaseFailover_async", - "title": "Environments databaseFailover Sample", - "origin": "API_DEFINITION", - "description": " Triggers database failover (only for highly resilient environments).", - "canonical": true, - "file": "environments.database_failover.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DatabaseFailover", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DatabaseFailover", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "DatabaseFailover", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.DatabaseFailover", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_Environments_FetchDatabaseProperties_async", - "title": "Environments fetchDatabaseProperties Sample", - "origin": "API_DEFINITION", - "description": " Fetches database properties.", - "canonical": true, - "file": "environments.fetch_database_properties.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FetchDatabaseProperties", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.FetchDatabaseProperties", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.EnvironmentsClient" - }, - "method": { - "shortName": "FetchDatabaseProperties", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments.FetchDatabaseProperties", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1_generated_ImageVersions_ListImageVersions_async", - "title": "Environments listImageVersions Sample", - "origin": "API_DEFINITION", - "description": " List ImageVersions for provided location.", - "canonical": true, - "file": "image_versions.list_image_versions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListImageVersions", - "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersions.ListImageVersions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "include_past_releases", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1.ListImageVersionsResponse", - "client": { - "shortName": "ImageVersionsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersionsClient" - }, - "method": { - "shortName": "ListImageVersions", - "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersions.ListImageVersions", - "service": { - "shortName": "ImageVersions", - "fullName": "google.cloud.orchestration.airflow.service.v1.ImageVersions" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/index.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/index.ts deleted file mode 100644 index 2336d08b148..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 v1 from './v1'; -const EnvironmentsClient = v1.EnvironmentsClient; -type EnvironmentsClient = v1.EnvironmentsClient; -const ImageVersionsClient = v1.ImageVersionsClient; -type ImageVersionsClient = v1.ImageVersionsClient; -export {v1, EnvironmentsClient, ImageVersionsClient}; -export default {v1, EnvironmentsClient, ImageVersionsClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_client.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_client.ts deleted file mode 100644 index 7d3dd51e622..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_client.ts +++ /dev/null @@ -1,3311 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); - -/** - * Client JSON configuration object, loaded from - * `src/v1/environments_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './environments_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Managed Apache Airflow Environments. - * @class - * @memberof v1 - */ -export class EnvironmentsClient { - 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; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - environmentsStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of EnvironmentsClient. - * - * @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://developers.google.com/identity/protocols/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 EnvironmentsClient({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 EnvironmentsClient; - 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 = 'composer.' + 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; - } - - // 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 = { - environmentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/environments/{environment}' - ), - userWorkloadsConfigMapPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}' - ), - userWorkloadsSecretPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}' - ), - }; - - // 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 = { - listEnvironments: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'environments'), - listWorkloads: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'workloads'), - listUserWorkloadsSecrets: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'userWorkloadsSecrets'), - listUserWorkloadsConfigMaps: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'userWorkloadsConfigMaps') - }; - - const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(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.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 createEnvironmentResponse = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1.Environment') as gax.protobuf.Type; - const createEnvironmentMetadata = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1.OperationMetadata') as gax.protobuf.Type; - const updateEnvironmentResponse = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1.Environment') as gax.protobuf.Type; - const updateEnvironmentMetadata = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1.OperationMetadata') as gax.protobuf.Type; - const deleteEnvironmentResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteEnvironmentMetadata = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1.OperationMetadata') as gax.protobuf.Type; - const checkUpgradeResponse = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1.CheckUpgradeResponse') as gax.protobuf.Type; - const checkUpgradeMetadata = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1.OperationMetadata') as gax.protobuf.Type; - const saveSnapshotResponse = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1.SaveSnapshotResponse') as gax.protobuf.Type; - const saveSnapshotMetadata = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1.OperationMetadata') as gax.protobuf.Type; - const loadSnapshotResponse = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1.LoadSnapshotResponse') as gax.protobuf.Type; - const loadSnapshotMetadata = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1.OperationMetadata') as gax.protobuf.Type; - const databaseFailoverResponse = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverResponse') as gax.protobuf.Type; - const databaseFailoverMetadata = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createEnvironment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createEnvironmentResponse.decode.bind(createEnvironmentResponse), - createEnvironmentMetadata.decode.bind(createEnvironmentMetadata)), - updateEnvironment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateEnvironmentResponse.decode.bind(updateEnvironmentResponse), - updateEnvironmentMetadata.decode.bind(updateEnvironmentMetadata)), - deleteEnvironment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteEnvironmentResponse.decode.bind(deleteEnvironmentResponse), - deleteEnvironmentMetadata.decode.bind(deleteEnvironmentMetadata)), - checkUpgrade: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - checkUpgradeResponse.decode.bind(checkUpgradeResponse), - checkUpgradeMetadata.decode.bind(checkUpgradeMetadata)), - saveSnapshot: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - saveSnapshotResponse.decode.bind(saveSnapshotResponse), - saveSnapshotMetadata.decode.bind(saveSnapshotMetadata)), - loadSnapshot: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - loadSnapshotResponse.decode.bind(loadSnapshotResponse), - loadSnapshotMetadata.decode.bind(loadSnapshotMetadata)), - databaseFailover: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - databaseFailoverResponse.decode.bind(databaseFailoverResponse), - databaseFailoverMetadata.decode.bind(databaseFailoverMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.orchestration.airflow.service.v1.Environments', 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.environmentsStub) { - return this.environmentsStub; - } - - // Put together the "service stub" for - // google.cloud.orchestration.airflow.service.v1.Environments. - this.environmentsStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.orchestration.airflow.service.v1.Environments') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.orchestration.airflow.service.v1.Environments, - 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 environmentsStubMethods = - ['createEnvironment', 'getEnvironment', 'listEnvironments', 'updateEnvironment', 'deleteEnvironment', 'executeAirflowCommand', 'stopAirflowCommand', 'pollAirflowCommand', 'listWorkloads', 'checkUpgrade', 'createUserWorkloadsSecret', 'getUserWorkloadsSecret', 'listUserWorkloadsSecrets', 'updateUserWorkloadsSecret', 'deleteUserWorkloadsSecret', 'createUserWorkloadsConfigMap', 'getUserWorkloadsConfigMap', 'listUserWorkloadsConfigMaps', 'updateUserWorkloadsConfigMap', 'deleteUserWorkloadsConfigMap', 'saveSnapshot', 'loadSnapshot', 'databaseFailover', 'fetchDatabaseProperties']; - for (const methodName of environmentsStubMethods) { - const callPromise = this.environmentsStub.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.environmentsStub; - } - - /** - * 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 'composer.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 'composer.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 -- - // ------------------- -/** - * Get an existing environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource name of the environment to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @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.orchestration.airflow.service.v1.Environment|Environment}. - * 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/environments.get_environment.js - * region_tag:composer_v1_generated_Environments_GetEnvironment_async - */ - getEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest|undefined, {}|undefined - ]>; - getEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>): void; - getEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>): void; - getEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1.IGetEnvironmentRequest|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(); - return this.innerApiCalls.getEnvironment(request, options, callback); - } -/** - * Executes Airflow CLI command. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - * @param {string} request.command - * Airflow command. - * @param {string} request.subcommand - * Airflow subcommand. - * @param {string[]} request.parameters - * Parameters for the Airflow command/subcommand as an array of arguments. - * It may contain positional arguments like `["my-dag-id"]`, key-value - * parameters like `["--foo=bar"]` or `["--foo","bar"]`, - * or other flags like `["-f"]`. - * @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.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse|ExecuteAirflowCommandResponse}. - * 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/environments.execute_airflow_command.js - * region_tag:composer_v1_generated_Environments_ExecuteAirflowCommand_async - */ - executeAirflowCommand( - request?: protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest|undefined, {}|undefined - ]>; - executeAirflowCommand( - request: protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest|null|undefined, - {}|null|undefined>): void; - executeAirflowCommand( - request: protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest|null|undefined, - {}|null|undefined>): void; - executeAirflowCommand( - request?: protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandRequest|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({ - 'environment': request.environment ?? '', - }); - this.initialize(); - return this.innerApiCalls.executeAirflowCommand(request, options, callback); - } -/** - * Stops Airflow CLI command execution. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - * @param {string} request.executionId - * The unique ID of the command execution. - * @param {string} request.pod - * The name of the pod where the command is executed. - * @param {string} request.podNamespace - * The namespace of the pod where the command is executed. - * @param {boolean} request.force - * If true, the execution is terminated forcefully (SIGKILL). If false, the - * execution is stopped gracefully, giving it time for cleanup. - * @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.orchestration.airflow.service.v1.StopAirflowCommandResponse|StopAirflowCommandResponse}. - * 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/environments.stop_airflow_command.js - * region_tag:composer_v1_generated_Environments_StopAirflowCommand_async - */ - stopAirflowCommand( - request?: protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest|undefined, {}|undefined - ]>; - stopAirflowCommand( - request: protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest|null|undefined, - {}|null|undefined>): void; - stopAirflowCommand( - request: protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest|null|undefined, - {}|null|undefined>): void; - stopAirflowCommand( - request?: protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandRequest|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({ - 'environment': request.environment ?? '', - }); - this.initialize(); - return this.innerApiCalls.stopAirflowCommand(request, options, callback); - } -/** - * Polls Airflow CLI command execution and fetches logs. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {string} request.executionId - * The unique ID of the command execution. - * @param {string} request.pod - * The name of the pod where the command is executed. - * @param {string} request.podNamespace - * The namespace of the pod where the command is executed. - * @param {number} request.nextLineNumber - * Line number from which new logs should be fetched. - * @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.orchestration.airflow.service.v1.PollAirflowCommandResponse|PollAirflowCommandResponse}. - * 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/environments.poll_airflow_command.js - * region_tag:composer_v1_generated_Environments_PollAirflowCommand_async - */ - pollAirflowCommand( - request?: protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest|undefined, {}|undefined - ]>; - pollAirflowCommand( - request: protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest|null|undefined, - {}|null|undefined>): void; - pollAirflowCommand( - request: protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest|null|undefined, - {}|null|undefined>): void; - pollAirflowCommand( - request?: protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandRequest|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({ - 'environment': request.environment ?? '', - }); - this.initialize(); - return this.innerApiCalls.pollAirflowCommand(request, options, callback); - } -/** - * Creates a user workloads Secret. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The environment name to create a Secret for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} request.userWorkloadsSecret - * Required. User workloads Secret to create. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret|UserWorkloadsSecret}. - * 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/environments.create_user_workloads_secret.js - * region_tag:composer_v1_generated_Environments_CreateUserWorkloadsSecret_async - */ - createUserWorkloadsSecret( - request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest|undefined, {}|undefined - ]>; - createUserWorkloadsSecret( - request: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): void; - createUserWorkloadsSecret( - request: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): void; - createUserWorkloadsSecret( - request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsSecretRequest|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(); - return this.innerApiCalls.createUserWorkloadsSecret(request, options, callback); - } -/** - * Gets an existing user workloads Secret. - * Values of the "data" field in the response are cleared. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the Secret to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * @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.orchestration.airflow.service.v1.UserWorkloadsSecret|UserWorkloadsSecret}. - * 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/environments.get_user_workloads_secret.js - * region_tag:composer_v1_generated_Environments_GetUserWorkloadsSecret_async - */ - getUserWorkloadsSecret( - request?: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest|undefined, {}|undefined - ]>; - getUserWorkloadsSecret( - request: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): void; - getUserWorkloadsSecret( - request: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): void; - getUserWorkloadsSecret( - request?: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsSecretRequest|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(); - return this.innerApiCalls.getUserWorkloadsSecret(request, options, callback); - } -/** - * Updates a user workloads Secret. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret} [request.userWorkloadsSecret] - * Optional. User workloads Secret to override. - * @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.orchestration.airflow.service.v1.UserWorkloadsSecret|UserWorkloadsSecret}. - * 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/environments.update_user_workloads_secret.js - * region_tag:composer_v1_generated_Environments_UpdateUserWorkloadsSecret_async - */ - updateUserWorkloadsSecret( - request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest|undefined, {}|undefined - ]>; - updateUserWorkloadsSecret( - request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): void; - updateUserWorkloadsSecret( - request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): void; - updateUserWorkloadsSecret( - request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsSecretRequest|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({ - 'user_workloads_secret.name': request.userWorkloadsSecret!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateUserWorkloadsSecret(request, options, callback); - } -/** - * Deletes a user workloads Secret. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The Secret to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * @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.protobuf.Empty|Empty}. - * 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/environments.delete_user_workloads_secret.js - * region_tag:composer_v1_generated_Environments_DeleteUserWorkloadsSecret_async - */ - deleteUserWorkloadsSecret( - request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest|undefined, {}|undefined - ]>; - deleteUserWorkloadsSecret( - request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): void; - deleteUserWorkloadsSecret( - request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): void; - deleteUserWorkloadsSecret( - request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsSecretRequest|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(); - return this.innerApiCalls.deleteUserWorkloadsSecret(request, options, callback); - } -/** - * Creates a user workloads ConfigMap. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The environment name to create a ConfigMap for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} request.userWorkloadsConfigMap - * Required. User workloads ConfigMap to create. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. - * 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/environments.create_user_workloads_config_map.js - * region_tag:composer_v1_generated_Environments_CreateUserWorkloadsConfigMap_async - */ - createUserWorkloadsConfigMap( - request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest|undefined, {}|undefined - ]>; - createUserWorkloadsConfigMap( - request: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): void; - createUserWorkloadsConfigMap( - request: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): void; - createUserWorkloadsConfigMap( - request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.ICreateUserWorkloadsConfigMapRequest|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(); - return this.innerApiCalls.createUserWorkloadsConfigMap(request, options, callback); - } -/** - * Gets an existing user workloads ConfigMap. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the ConfigMap to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * @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.orchestration.airflow.service.v1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. - * 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/environments.get_user_workloads_config_map.js - * region_tag:composer_v1_generated_Environments_GetUserWorkloadsConfigMap_async - */ - getUserWorkloadsConfigMap( - request?: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest|undefined, {}|undefined - ]>; - getUserWorkloadsConfigMap( - request: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): void; - getUserWorkloadsConfigMap( - request: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): void; - getUserWorkloadsConfigMap( - request?: protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.IGetUserWorkloadsConfigMapRequest|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(); - return this.innerApiCalls.getUserWorkloadsConfigMap(request, options, callback); - } -/** - * Updates a user workloads ConfigMap. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap} [request.userWorkloadsConfigMap] - * Optional. User workloads ConfigMap to override. - * @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.orchestration.airflow.service.v1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. - * 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/environments.update_user_workloads_config_map.js - * region_tag:composer_v1_generated_Environments_UpdateUserWorkloadsConfigMap_async - */ - updateUserWorkloadsConfigMap( - request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest|undefined, {}|undefined - ]>; - updateUserWorkloadsConfigMap( - request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): void; - updateUserWorkloadsConfigMap( - request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): void; - updateUserWorkloadsConfigMap( - request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1.IUpdateUserWorkloadsConfigMapRequest|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({ - 'user_workloads_config_map.name': request.userWorkloadsConfigMap!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateUserWorkloadsConfigMap(request, options, callback); - } -/** - * Deletes a user workloads ConfigMap. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The ConfigMap to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * @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.protobuf.Empty|Empty}. - * 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/environments.delete_user_workloads_config_map.js - * region_tag:composer_v1_generated_Environments_DeleteUserWorkloadsConfigMap_async - */ - deleteUserWorkloadsConfigMap( - request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest|undefined, {}|undefined - ]>; - deleteUserWorkloadsConfigMap( - request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): void; - deleteUserWorkloadsConfigMap( - request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): void; - deleteUserWorkloadsConfigMap( - request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1.IDeleteUserWorkloadsConfigMapRequest|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(); - return this.innerApiCalls.deleteUserWorkloadsConfigMap(request, options, callback); - } -/** - * Fetches database properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * Required. The resource name of the environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @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.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse|FetchDatabasePropertiesResponse}. - * 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/environments.fetch_database_properties.js - * region_tag:composer_v1_generated_Environments_FetchDatabaseProperties_async - */ - fetchDatabaseProperties( - request?: protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, - protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest|undefined, {}|undefined - ]>; - fetchDatabaseProperties( - request: protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, - protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest|null|undefined, - {}|null|undefined>): void; - fetchDatabaseProperties( - request: protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, - protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest|null|undefined, - {}|null|undefined>): void; - fetchDatabaseProperties( - request?: protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, - protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, - protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse, - protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesRequest|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({ - 'environment': request.environment ?? '', - }); - this.initialize(); - return this.innerApiCalls.fetchDatabaseProperties(request, options, callback); - } - -/** - * Create a new environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The parent must be of the form - * "projects/{projectId}/locations/{locationId}". - * @param {google.cloud.orchestration.airflow.service.v1.Environment} request.environment - * The environment to create. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1/environments.create_environment.js - * region_tag:composer_v1_generated_Environments_CreateEnvironment_async - */ - createEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1.ICreateEnvironmentRequest, - 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(); - return this.innerApiCalls.createEnvironment(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createEnvironment()`. - * @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/environments.create_environment.js - * region_tag:composer_v1_generated_Environments_CreateEnvironment_async - */ - async checkCreateEnvironmentProgress(name: string): Promise>{ - 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.createEnvironment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Update an environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The relative resource name of the environment to update, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {google.cloud.orchestration.airflow.service.v1.Environment} request.environment - * A patch environment. Fields specified by the `updateMask` will be copied - * from the patch environment into the environment under update. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. A comma-separated list of paths, relative to `Environment`, of - * fields to update. - * For example, to set the version of scikit-learn to install in the - * environment to 0.19.0 and to remove an existing installation of - * numpy, the `updateMask` parameter would include the following two - * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and - * "config.softwareConfig.pypiPackages.numpy". The included patch - * environment would specify the scikit-learn version as follows: - * - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "scikit-learn":"==0.19.0" - * } - * } - * } - * } - * - * Note that in the above example, any existing PyPI packages - * other than scikit-learn and numpy will be unaffected. - * - * Only one update type may be included in a single request's `updateMask`. - * For example, one cannot update both the PyPI packages and - * labels in the same request. However, it is possible to update multiple - * members of a map field simultaneously in the same request. For example, - * to set the labels "label1" and "label2" while clearing "label3" (assuming - * it already exists), one can - * provide the paths "labels.label1", "labels.label2", and "labels.label3" - * and populate the patch environment as follows: - * - * { - * "labels":{ - * "label1":"new-label1-value" - * "label2":"new-label2-value" - * } - * } - * - * Note that in the above example, any existing labels that are not - * included in the `updateMask` will be unaffected. - * - * It is also possible to replace an entire map field by providing the - * map field's path in the `updateMask`. The new value of the field will - * be that which is provided in the patch environment. For example, to - * delete all pre-existing user-specified PyPI packages and - * install botocore at version 1.7.14, the `updateMask` would contain - * the path "config.softwareConfig.pypiPackages", and - * the patch environment would be the following: - * - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "botocore":"==1.7.14" - * } - * } - * } - * } - * - * **Note:** Only the following fields can be updated: - * - * * `config.softwareConfig.pypiPackages` - * * Replace all custom custom PyPI packages. If a replacement - * package map is not included in `environment`, all custom - * PyPI packages are cleared. It is an error to provide both - * this mask and a mask specifying an individual package. - * * `config.softwareConfig.pypiPackages.`packagename - * * Update the custom PyPI package *packagename*, - * preserving other packages. To delete the package, include it in - * `updateMask`, and omit the mapping for it in - * `environment.config.softwareConfig.pypiPackages`. It is an error - * to provide both a mask of this form and the - * `config.softwareConfig.pypiPackages` mask. - * * `labels` - * * Replace all environment labels. If a replacement labels map is not - * included in `environment`, all labels are cleared. It is an error to - * provide both this mask and a mask specifying one or more individual - * labels. - * * `labels.`labelName - * * Set the label named *labelName*, while preserving other - * labels. To delete the label, include it in `updateMask` and omit its - * mapping in `environment.labels`. It is an error to provide both a - * mask of this form and the `labels` mask. - * * `config.nodeCount` - * * Horizontally scale the number of nodes in the environment. An integer - * greater than or equal to 3 must be provided in the `config.nodeCount` - * field. Supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * * `config.webServerNetworkAccessControl` - * * Replace the environment's current `WebServerNetworkAccessControl`. - * * `config.softwareConfig.airflowConfigOverrides` - * * Replace all Apache Airflow config overrides. If a replacement config - * overrides map is not included in `environment`, all config overrides - * are cleared. - * It is an error to provide both this mask and a mask specifying one or - * more individual config overrides. - * * `config.softwareConfig.airflowConfigOverrides.`section-name - * * Override the Apache Airflow config property *name* in the - * section named *section*, preserving other properties. To - * delete the property override, include it in `updateMask` and omit its - * mapping in - * `environment.config.softwareConfig.airflowConfigOverrides`. - * It is an error to provide both a mask of this form and the - * `config.softwareConfig.airflowConfigOverrides` mask. - * * `config.softwareConfig.envVariables` - * * Replace all environment variables. If a replacement environment - * variable map is not included in `environment`, all custom environment - * variables are cleared. - * * `config.softwareConfig.schedulerCount` - * * Horizontally scale the number of schedulers in Airflow. A positive - * integer not greater than the number of nodes must be provided in the - * `config.softwareConfig.schedulerCount` field. Supported for Cloud - * Composer environments in versions composer-1.*.*-airflow-2.*.*. - * * `config.databaseConfig.machineType` - * * Cloud SQL machine type used by Airflow database. - * It has to be one of: db-n1-standard-2, db-n1-standard-4, - * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer - * environments in versions composer-1.*.*-airflow-*.*.*. - * * `config.webServerConfig.machineType` - * * Machine type on which Airflow web server is running. - * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 - * or composer-n1-webserver-8. Supported for Cloud Composer environments - * in versions composer-1.*.*-airflow-*.*.*. - * @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/environments.update_environment.js - * region_tag:composer_v1_generated_Environments_UpdateEnvironment_async - */ - updateEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1.IUpdateEnvironmentRequest, - 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(); - return this.innerApiCalls.updateEnvironment(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateEnvironment()`. - * @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/environments.update_environment.js - * region_tag:composer_v1_generated_Environments_UpdateEnvironment_async - */ - async checkUpdateEnvironmentProgress(name: string): Promise>{ - 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.updateEnvironment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Delete an environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The environment to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @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/environments.delete_environment.js - * region_tag:composer_v1_generated_Environments_DeleteEnvironment_async - */ - deleteEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1.IDeleteEnvironmentRequest, - 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(); - return this.innerApiCalls.deleteEnvironment(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteEnvironment()`. - * @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/environments.delete_environment.js - * region_tag:composer_v1_generated_Environments_DeleteEnvironment_async - */ - async checkDeleteEnvironmentProgress(name: string): Promise>{ - 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.deleteEnvironment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Check if an upgrade operation on the environment will succeed. - * - * In case of problems detailed info can be found in the returned Operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * Required. The resource name of the environment to check upgrade for, in the - * form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {string} [request.imageVersion] - * Optional. The version of the software running in the environment. - * This encapsulates both the version of Cloud Composer functionality and the - * version of Apache Airflow. It must match the regular expression - * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. - * When used as input, the server also checks if the provided version is - * supported and denies the request for an unsupported version. - * - * The Cloud Composer portion of the image version is a full - * [semantic version](https://semver.org), or an alias in the form of major - * version number or `latest`. When an alias is provided, the server replaces - * it with the current Cloud Composer version that satisfies the alias. - * - * The Apache Airflow portion of the image version is a full semantic version - * that points to one of the supported Apache Airflow versions, or an alias in - * the form of only major or major.minor versions specified. When an alias is - * provided, the server replaces it with the latest Apache Airflow version - * that satisfies the alias and is supported in the given Cloud Composer - * version. - * - * In all cases, the resolved image version is stored in the same field. - * - * See also [version - * list](/composer/docs/concepts/versioning/composer-versions) and [versioning - * overview](/composer/docs/concepts/versioning/composer-versioning-overview). - * @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/environments.check_upgrade.js - * region_tag:composer_v1_generated_Environments_CheckUpgrade_async - */ - checkUpgrade( - request?: protos.google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - checkUpgrade( - request: protos.google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - checkUpgrade( - request: protos.google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - checkUpgrade( - request?: protos.google.cloud.orchestration.airflow.service.v1.ICheckUpgradeRequest, - 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({ - 'environment': request.environment ?? '', - }); - this.initialize(); - return this.innerApiCalls.checkUpgrade(request, options, callback); - } -/** - * Check the status of the long running operation returned by `checkUpgrade()`. - * @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/environments.check_upgrade.js - * region_tag:composer_v1_generated_Environments_CheckUpgrade_async - */ - async checkCheckUpgradeProgress(name: string): Promise>{ - 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.checkUpgrade, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a snapshots of a Cloud Composer environment. - * - * As a result of this operation, snapshot of environment's state is stored - * in a location specified in the SaveSnapshotRequest. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * The resource name of the source environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {string} request.snapshotLocation - * Location in a Cloud Storage where the snapshot is going to be stored, e.g.: - * "gs://my-bucket/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/environments.save_snapshot.js - * region_tag:composer_v1_generated_Environments_SaveSnapshot_async - */ - saveSnapshot( - request?: protos.google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - saveSnapshot( - request: protos.google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - saveSnapshot( - request: protos.google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - saveSnapshot( - request?: protos.google.cloud.orchestration.airflow.service.v1.ISaveSnapshotRequest, - 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({ - 'environment': request.environment ?? '', - }); - this.initialize(); - return this.innerApiCalls.saveSnapshot(request, options, callback); - } -/** - * Check the status of the long running operation returned by `saveSnapshot()`. - * @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/environments.save_snapshot.js - * region_tag:composer_v1_generated_Environments_SaveSnapshot_async - */ - async checkSaveSnapshotProgress(name: string): Promise>{ - 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.saveSnapshot, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Loads a snapshot of a Cloud Composer environment. - * - * As a result of this operation, a snapshot of environment's specified in - * LoadSnapshotRequest is loaded into the environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * The resource name of the target environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {string} request.snapshotPath - * A Cloud Storage path to a snapshot to load, e.g.: - * "gs://my-bucket/snapshots/project_location_environment_timestamp". - * @param {boolean} request.skipPypiPackagesInstallation - * Whether or not to skip installing Pypi packages when loading the - * environment's state. - * @param {boolean} request.skipEnvironmentVariablesSetting - * Whether or not to skip setting environment variables when loading the - * environment's state. - * @param {boolean} request.skipAirflowOverridesSetting - * Whether or not to skip setting Airflow overrides when loading the - * environment's state. - * @param {boolean} request.skipGcsDataCopying - * Whether or not to skip copying Cloud Storage data when loading the - * environment's state. - * @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/environments.load_snapshot.js - * region_tag:composer_v1_generated_Environments_LoadSnapshot_async - */ - loadSnapshot( - request?: protos.google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - loadSnapshot( - request: protos.google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - loadSnapshot( - request: protos.google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - loadSnapshot( - request?: protos.google.cloud.orchestration.airflow.service.v1.ILoadSnapshotRequest, - 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({ - 'environment': request.environment ?? '', - }); - this.initialize(); - return this.innerApiCalls.loadSnapshot(request, options, callback); - } -/** - * Check the status of the long running operation returned by `loadSnapshot()`. - * @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/environments.load_snapshot.js - * region_tag:composer_v1_generated_Environments_LoadSnapshot_async - */ - async checkLoadSnapshotProgress(name: string): Promise>{ - 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.loadSnapshot, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Triggers database failover (only for highly resilient environments). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * Target environment: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @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/environments.database_failover.js - * region_tag:composer_v1_generated_Environments_DatabaseFailover_async - */ - databaseFailover( - request?: protos.google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - databaseFailover( - request: protos.google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - databaseFailover( - request: protos.google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - databaseFailover( - request?: protos.google.cloud.orchestration.airflow.service.v1.IDatabaseFailoverRequest, - 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({ - 'environment': request.environment ?? '', - }); - this.initialize(); - return this.innerApiCalls.databaseFailover(request, options, callback); - } -/** - * Check the status of the long running operation returned by `databaseFailover()`. - * @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/environments.database_failover.js - * region_tag:composer_v1_generated_Environments_DatabaseFailover_async - */ - async checkDatabaseFailoverProgress(name: string): Promise>{ - 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.databaseFailover, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * List environments. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of environments to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @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.orchestration.airflow.service.v1.Environment|Environment}. - * 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 `listEnvironmentsAsync()` - * 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. - */ - listEnvironments( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment[], - protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse - ]>; - listEnvironments( - request: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment>): void; - listEnvironments( - request: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment>): void; - listEnvironments( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment>, - callback?: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IEnvironment[], - protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsResponse - ]>|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(); - return this.innerApiCalls.listEnvironments(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of environments to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @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.orchestration.airflow.service.v1.Environment|Environment} 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 `listEnvironmentsAsync()` - * 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. - */ - listEnvironmentsStream( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, - 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['listEnvironments']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEnvironments.createStream( - this.innerApiCalls.listEnvironments as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listEnvironments`, 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 - * List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of environments to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @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.orchestration.airflow.service.v1.Environment|Environment}. 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/environments.list_environments.js - * region_tag:composer_v1_generated_Environments_ListEnvironments_async - */ - listEnvironmentsAsync( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListEnvironmentsRequest, - 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['listEnvironments']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEnvironments.asyncIterate( - this.innerApiCalls['listEnvironments'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists workloads in a Cloud Composer environment. Workload is a unit that - * runs a single Composer component. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The environment name to get workloads for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of environments to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @param {string} [request.filter] - * Optional. The list filter. - * Currently only supports equality on the type field. The value of a field - * specified in the filter expression must be one ComposerWorkloadType enum - * option. It's possible to get multiple types using "OR" operator, e.g.: - * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are - * returned. - * @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.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload|ComposerWorkload}. - * 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 `listWorkloadsAsync()` - * 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. - */ - listWorkloads( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload[], - protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse - ]>; - listWorkloads( - request: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload>): void; - listWorkloads( - request: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload>): void; - listWorkloads( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload>, - callback?: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload[], - protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsResponse - ]>|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(); - return this.innerApiCalls.listWorkloads(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The environment name to get workloads for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of environments to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @param {string} [request.filter] - * Optional. The list filter. - * Currently only supports equality on the type field. The value of a field - * specified in the filter expression must be one ComposerWorkloadType enum - * option. It's possible to get multiple types using "OR" operator, e.g.: - * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are - * returned. - * @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.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload|ComposerWorkload} 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 `listWorkloadsAsync()` - * 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. - */ - listWorkloadsStream( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, - 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['listWorkloads']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listWorkloads.createStream( - this.innerApiCalls.listWorkloads as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listWorkloads`, 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 environment name to get workloads for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of environments to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @param {string} [request.filter] - * Optional. The list filter. - * Currently only supports equality on the type field. The value of a field - * specified in the filter expression must be one ComposerWorkloadType enum - * option. It's possible to get multiple types using "OR" operator, e.g.: - * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are - * returned. - * @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.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload|ComposerWorkload}. 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/environments.list_workloads.js - * region_tag:composer_v1_generated_Environments_ListWorkloads_async - */ - listWorkloadsAsync( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListWorkloadsRequest, - 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['listWorkloads']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listWorkloads.asyncIterate( - this.innerApiCalls['listWorkloads'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists user workloads Secrets. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. List Secrets in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of Secrets to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @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.orchestration.airflow.service.v1.UserWorkloadsSecret|UserWorkloadsSecret}. - * 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 `listUserWorkloadsSecretsAsync()` - * 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. - */ - listUserWorkloadsSecrets( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret[], - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse - ]>; - listUserWorkloadsSecrets( - request: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret>): void; - listUserWorkloadsSecrets( - request: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret>): void; - listUserWorkloadsSecrets( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret>, - callback?: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret[], - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsResponse - ]>|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(); - return this.innerApiCalls.listUserWorkloadsSecrets(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. List Secrets in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of Secrets to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @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.orchestration.airflow.service.v1.UserWorkloadsSecret|UserWorkloadsSecret} 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 `listUserWorkloadsSecretsAsync()` - * 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. - */ - listUserWorkloadsSecretsStream( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, - 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['listUserWorkloadsSecrets']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listUserWorkloadsSecrets.createStream( - this.innerApiCalls.listUserWorkloadsSecrets as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listUserWorkloadsSecrets`, 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. List Secrets in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of Secrets to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @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.orchestration.airflow.service.v1.UserWorkloadsSecret|UserWorkloadsSecret}. 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/environments.list_user_workloads_secrets.js - * region_tag:composer_v1_generated_Environments_ListUserWorkloadsSecrets_async - */ - listUserWorkloadsSecretsAsync( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsSecretsRequest, - 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['listUserWorkloadsSecrets']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listUserWorkloadsSecrets.asyncIterate( - this.innerApiCalls['listUserWorkloadsSecrets'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists user workloads ConfigMaps. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. List ConfigMaps in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of ConfigMaps to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @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.orchestration.airflow.service.v1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. - * 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 `listUserWorkloadsConfigMapsAsync()` - * 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. - */ - listUserWorkloadsConfigMaps( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap[], - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse - ]>; - listUserWorkloadsConfigMaps( - request: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap>): void; - listUserWorkloadsConfigMaps( - request: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap>): void; - listUserWorkloadsConfigMaps( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap>, - callback?: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap[], - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsResponse - ]>|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(); - return this.innerApiCalls.listUserWorkloadsConfigMaps(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. List ConfigMaps in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of ConfigMaps to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @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.orchestration.airflow.service.v1.UserWorkloadsConfigMap|UserWorkloadsConfigMap} 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 `listUserWorkloadsConfigMapsAsync()` - * 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. - */ - listUserWorkloadsConfigMapsStream( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, - 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['listUserWorkloadsConfigMaps']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listUserWorkloadsConfigMaps.createStream( - this.innerApiCalls.listUserWorkloadsConfigMaps as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listUserWorkloadsConfigMaps`, 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. List ConfigMaps in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of ConfigMaps to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @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.orchestration.airflow.service.v1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. 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/environments.list_user_workloads_config_maps.js - * region_tag:composer_v1_generated_Environments_ListUserWorkloadsConfigMaps_async - */ - listUserWorkloadsConfigMapsAsync( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListUserWorkloadsConfigMapsRequest, - 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['listUserWorkloadsConfigMaps']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate( - this.innerApiCalls['listUserWorkloadsConfigMaps'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * 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, - options?: - | 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]> { - 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 { - 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, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.CancelOperationRequest, - {} | undefined | null - >, - callback?: Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - > - ): Promise { - 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, - options?: - | 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 { - return this.operationsClient.deleteOperation(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified environment resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} environment - * @returns {string} Resource name string. - */ - environmentPath(project:string,location:string,environment:string) { - return this.pathTemplates.environmentPathTemplate.render({ - project: project, - location: location, - environment: environment, - }); - } - - /** - * Parse the project from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).project; - } - - /** - * Parse the location from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).location; - } - - /** - * Parse the environment from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; - } - - /** - * Return a fully-qualified userWorkloadsConfigMap resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} environment - * @param {string} user_workloads_config_map - * @returns {string} Resource name string. - */ - userWorkloadsConfigMapPath(project:string,location:string,environment:string,userWorkloadsConfigMap:string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.render({ - project: project, - location: location, - environment: environment, - user_workloads_config_map: userWorkloadsConfigMap, - }); - } - - /** - * Parse the project from UserWorkloadsConfigMap resource. - * - * @param {string} userWorkloadsConfigMapName - * A fully-qualified path representing UserWorkloadsConfigMap resource. - * @returns {string} A string representing the project. - */ - matchProjectFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).project; - } - - /** - * Parse the location from UserWorkloadsConfigMap resource. - * - * @param {string} userWorkloadsConfigMapName - * A fully-qualified path representing UserWorkloadsConfigMap resource. - * @returns {string} A string representing the location. - */ - matchLocationFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).location; - } - - /** - * Parse the environment from UserWorkloadsConfigMap resource. - * - * @param {string} userWorkloadsConfigMapName - * A fully-qualified path representing UserWorkloadsConfigMap resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).environment; - } - - /** - * Parse the user_workloads_config_map from UserWorkloadsConfigMap resource. - * - * @param {string} userWorkloadsConfigMapName - * A fully-qualified path representing UserWorkloadsConfigMap resource. - * @returns {string} A string representing the user_workloads_config_map. - */ - matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).user_workloads_config_map; - } - - /** - * Return a fully-qualified userWorkloadsSecret resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} environment - * @param {string} user_workloads_secret - * @returns {string} Resource name string. - */ - userWorkloadsSecretPath(project:string,location:string,environment:string,userWorkloadsSecret:string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.render({ - project: project, - location: location, - environment: environment, - user_workloads_secret: userWorkloadsSecret, - }); - } - - /** - * Parse the project from UserWorkloadsSecret resource. - * - * @param {string} userWorkloadsSecretName - * A fully-qualified path representing UserWorkloadsSecret resource. - * @returns {string} A string representing the project. - */ - matchProjectFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).project; - } - - /** - * Parse the location from UserWorkloadsSecret resource. - * - * @param {string} userWorkloadsSecretName - * A fully-qualified path representing UserWorkloadsSecret resource. - * @returns {string} A string representing the location. - */ - matchLocationFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).location; - } - - /** - * Parse the environment from UserWorkloadsSecret resource. - * - * @param {string} userWorkloadsSecretName - * A fully-qualified path representing UserWorkloadsSecret resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).environment; - } - - /** - * Parse the user_workloads_secret from UserWorkloadsSecret resource. - * - * @param {string} userWorkloadsSecretName - * A fully-qualified path representing UserWorkloadsSecret resource. - * @returns {string} A string representing the user_workloads_secret. - */ - matchUserWorkloadsSecretFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).user_workloads_secret; - } - - /** - * 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.environmentsStub && !this._terminated) { - return this.environmentsStub.then(stub => { - this._terminated = true; - stub.close(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_client_config.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_client_config.json deleted file mode 100644 index 151b1adc1d0..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_client_config.json +++ /dev/null @@ -1,122 +0,0 @@ -{ - "interfaces": { - "google.cloud.orchestration.airflow.service.v1.Environments": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "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 - } - }, - "methods": { - "CreateEnvironment": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetEnvironment": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListEnvironments": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateEnvironment": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteEnvironment": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ExecuteAirflowCommand": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "StopAirflowCommand": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "PollAirflowCommand": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListWorkloads": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CheckUpgrade": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateUserWorkloadsSecret": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetUserWorkloadsSecret": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListUserWorkloadsSecrets": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateUserWorkloadsSecret": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteUserWorkloadsSecret": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateUserWorkloadsConfigMap": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetUserWorkloadsConfigMap": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListUserWorkloadsConfigMaps": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateUserWorkloadsConfigMap": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteUserWorkloadsConfigMap": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SaveSnapshot": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "LoadSnapshot": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DatabaseFailover": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "FetchDatabaseProperties": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_proto_list.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_proto_list.json deleted file mode 100644 index 674df9932cf..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/environments_proto_list.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - "../../protos/google/cloud/orchestration/airflow/service/v1/environments.proto", - "../../protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto", - "../../protos/google/cloud/orchestration/airflow/service/v1/operations.proto" -] diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/gapic_metadata.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/gapic_metadata.json deleted file mode 100644 index fd6919aa2c7..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/gapic_metadata.json +++ /dev/null @@ -1,307 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.orchestration.airflow.service.v1", - "libraryPackage": "@google-cloud/orchestration-airflow", - "services": { - "Environments": { - "clients": { - "grpc": { - "libraryClient": "EnvironmentsClient", - "rpcs": { - "GetEnvironment": { - "methods": [ - "getEnvironment" - ] - }, - "ExecuteAirflowCommand": { - "methods": [ - "executeAirflowCommand" - ] - }, - "StopAirflowCommand": { - "methods": [ - "stopAirflowCommand" - ] - }, - "PollAirflowCommand": { - "methods": [ - "pollAirflowCommand" - ] - }, - "CreateUserWorkloadsSecret": { - "methods": [ - "createUserWorkloadsSecret" - ] - }, - "GetUserWorkloadsSecret": { - "methods": [ - "getUserWorkloadsSecret" - ] - }, - "UpdateUserWorkloadsSecret": { - "methods": [ - "updateUserWorkloadsSecret" - ] - }, - "DeleteUserWorkloadsSecret": { - "methods": [ - "deleteUserWorkloadsSecret" - ] - }, - "CreateUserWorkloadsConfigMap": { - "methods": [ - "createUserWorkloadsConfigMap" - ] - }, - "GetUserWorkloadsConfigMap": { - "methods": [ - "getUserWorkloadsConfigMap" - ] - }, - "UpdateUserWorkloadsConfigMap": { - "methods": [ - "updateUserWorkloadsConfigMap" - ] - }, - "DeleteUserWorkloadsConfigMap": { - "methods": [ - "deleteUserWorkloadsConfigMap" - ] - }, - "FetchDatabaseProperties": { - "methods": [ - "fetchDatabaseProperties" - ] - }, - "CreateEnvironment": { - "methods": [ - "createEnvironment" - ] - }, - "UpdateEnvironment": { - "methods": [ - "updateEnvironment" - ] - }, - "DeleteEnvironment": { - "methods": [ - "deleteEnvironment" - ] - }, - "CheckUpgrade": { - "methods": [ - "checkUpgrade" - ] - }, - "SaveSnapshot": { - "methods": [ - "saveSnapshot" - ] - }, - "LoadSnapshot": { - "methods": [ - "loadSnapshot" - ] - }, - "DatabaseFailover": { - "methods": [ - "databaseFailover" - ] - }, - "ListEnvironments": { - "methods": [ - "listEnvironments", - "listEnvironmentsStream", - "listEnvironmentsAsync" - ] - }, - "ListWorkloads": { - "methods": [ - "listWorkloads", - "listWorkloadsStream", - "listWorkloadsAsync" - ] - }, - "ListUserWorkloadsSecrets": { - "methods": [ - "listUserWorkloadsSecrets", - "listUserWorkloadsSecretsStream", - "listUserWorkloadsSecretsAsync" - ] - }, - "ListUserWorkloadsConfigMaps": { - "methods": [ - "listUserWorkloadsConfigMaps", - "listUserWorkloadsConfigMapsStream", - "listUserWorkloadsConfigMapsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "EnvironmentsClient", - "rpcs": { - "GetEnvironment": { - "methods": [ - "getEnvironment" - ] - }, - "ExecuteAirflowCommand": { - "methods": [ - "executeAirflowCommand" - ] - }, - "StopAirflowCommand": { - "methods": [ - "stopAirflowCommand" - ] - }, - "PollAirflowCommand": { - "methods": [ - "pollAirflowCommand" - ] - }, - "CreateUserWorkloadsSecret": { - "methods": [ - "createUserWorkloadsSecret" - ] - }, - "GetUserWorkloadsSecret": { - "methods": [ - "getUserWorkloadsSecret" - ] - }, - "UpdateUserWorkloadsSecret": { - "methods": [ - "updateUserWorkloadsSecret" - ] - }, - "DeleteUserWorkloadsSecret": { - "methods": [ - "deleteUserWorkloadsSecret" - ] - }, - "CreateUserWorkloadsConfigMap": { - "methods": [ - "createUserWorkloadsConfigMap" - ] - }, - "GetUserWorkloadsConfigMap": { - "methods": [ - "getUserWorkloadsConfigMap" - ] - }, - "UpdateUserWorkloadsConfigMap": { - "methods": [ - "updateUserWorkloadsConfigMap" - ] - }, - "DeleteUserWorkloadsConfigMap": { - "methods": [ - "deleteUserWorkloadsConfigMap" - ] - }, - "FetchDatabaseProperties": { - "methods": [ - "fetchDatabaseProperties" - ] - }, - "CreateEnvironment": { - "methods": [ - "createEnvironment" - ] - }, - "UpdateEnvironment": { - "methods": [ - "updateEnvironment" - ] - }, - "DeleteEnvironment": { - "methods": [ - "deleteEnvironment" - ] - }, - "CheckUpgrade": { - "methods": [ - "checkUpgrade" - ] - }, - "SaveSnapshot": { - "methods": [ - "saveSnapshot" - ] - }, - "LoadSnapshot": { - "methods": [ - "loadSnapshot" - ] - }, - "DatabaseFailover": { - "methods": [ - "databaseFailover" - ] - }, - "ListEnvironments": { - "methods": [ - "listEnvironments", - "listEnvironmentsStream", - "listEnvironmentsAsync" - ] - }, - "ListWorkloads": { - "methods": [ - "listWorkloads", - "listWorkloadsStream", - "listWorkloadsAsync" - ] - }, - "ListUserWorkloadsSecrets": { - "methods": [ - "listUserWorkloadsSecrets", - "listUserWorkloadsSecretsStream", - "listUserWorkloadsSecretsAsync" - ] - }, - "ListUserWorkloadsConfigMaps": { - "methods": [ - "listUserWorkloadsConfigMaps", - "listUserWorkloadsConfigMapsStream", - "listUserWorkloadsConfigMapsAsync" - ] - } - } - } - } - }, - "ImageVersions": { - "clients": { - "grpc": { - "libraryClient": "ImageVersionsClient", - "rpcs": { - "ListImageVersions": { - "methods": [ - "listImageVersions", - "listImageVersionsStream", - "listImageVersionsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "ImageVersionsClient", - "rpcs": { - "ListImageVersions": { - "methods": [ - "listImageVersions", - "listImageVersionsStream", - "listImageVersionsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_client.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_client.ts deleted file mode 100644 index c63f5309111..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_client.ts +++ /dev/null @@ -1,714 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); - -/** - * Client JSON configuration object, loaded from - * `src/v1/image_versions_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './image_versions_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Readonly service to query available ImageVersions. - * @class - * @memberof v1 - */ -export class ImageVersionsClient { - 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; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - imageVersionsStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of ImageVersionsClient. - * - * @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://developers.google.com/identity/protocols/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 ImageVersionsClient({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 ImageVersionsClient; - 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 = 'composer.' + 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; - } - - // 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 = { - environmentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/environments/{environment}' - ), - userWorkloadsConfigMapPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}' - ), - userWorkloadsSecretPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}' - ), - }; - - // 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 = { - listImageVersions: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'imageVersions') - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.orchestration.airflow.service.v1.ImageVersions', 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.imageVersionsStub) { - return this.imageVersionsStub; - } - - // Put together the "service stub" for - // google.cloud.orchestration.airflow.service.v1.ImageVersions. - this.imageVersionsStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.orchestration.airflow.service.v1.ImageVersions') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.orchestration.airflow.service.v1.ImageVersions, - 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 imageVersionsStubMethods = - ['listImageVersions']; - for (const methodName of imageVersionsStubMethods) { - const callPromise = this.imageVersionsStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { - throw err; - }); - - const descriptor = - this.descriptors.page[methodName] || - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.imageVersionsStub; - } - - /** - * 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 'composer.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 'composer.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 -- - // ------------------- - - /** - * List ImageVersions for provided location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of image_versions to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @param {boolean} request.includePastReleases - * Whether or not image versions from old releases should be included. - * @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.orchestration.airflow.service.v1.ImageVersion|ImageVersion}. - * 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 `listImageVersionsAsync()` - * 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. - */ - listImageVersions( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IImageVersion[], - protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse - ]>; - listImageVersions( - request: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.IImageVersion>): void; - listImageVersions( - request: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.IImageVersion>): void; - listImageVersions( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.IImageVersion>, - callback?: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, - protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1.IImageVersion>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1.IImageVersion[], - protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsResponse - ]>|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(); - return this.innerApiCalls.listImageVersions(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of image_versions to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @param {boolean} request.includePastReleases - * Whether or not image versions from old releases should be included. - * @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.orchestration.airflow.service.v1.ImageVersion|ImageVersion} 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 `listImageVersionsAsync()` - * 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. - */ - listImageVersionsStream( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, - 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['listImageVersions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listImageVersions.createStream( - this.innerApiCalls.listImageVersions as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listImageVersions`, 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 - * List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of image_versions to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @param {boolean} request.includePastReleases - * Whether or not image versions from old releases should be included. - * @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.orchestration.airflow.service.v1.ImageVersion|ImageVersion}. 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/image_versions.list_image_versions.js - * region_tag:composer_v1_generated_ImageVersions_ListImageVersions_async - */ - listImageVersionsAsync( - request?: protos.google.cloud.orchestration.airflow.service.v1.IListImageVersionsRequest, - 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['listImageVersions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listImageVersions.asyncIterate( - this.innerApiCalls['listImageVersions'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified environment resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} environment - * @returns {string} Resource name string. - */ - environmentPath(project:string,location:string,environment:string) { - return this.pathTemplates.environmentPathTemplate.render({ - project: project, - location: location, - environment: environment, - }); - } - - /** - * Parse the project from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).project; - } - - /** - * Parse the location from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).location; - } - - /** - * Parse the environment from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; - } - - /** - * Return a fully-qualified userWorkloadsConfigMap resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} environment - * @param {string} user_workloads_config_map - * @returns {string} Resource name string. - */ - userWorkloadsConfigMapPath(project:string,location:string,environment:string,userWorkloadsConfigMap:string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.render({ - project: project, - location: location, - environment: environment, - user_workloads_config_map: userWorkloadsConfigMap, - }); - } - - /** - * Parse the project from UserWorkloadsConfigMap resource. - * - * @param {string} userWorkloadsConfigMapName - * A fully-qualified path representing UserWorkloadsConfigMap resource. - * @returns {string} A string representing the project. - */ - matchProjectFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).project; - } - - /** - * Parse the location from UserWorkloadsConfigMap resource. - * - * @param {string} userWorkloadsConfigMapName - * A fully-qualified path representing UserWorkloadsConfigMap resource. - * @returns {string} A string representing the location. - */ - matchLocationFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).location; - } - - /** - * Parse the environment from UserWorkloadsConfigMap resource. - * - * @param {string} userWorkloadsConfigMapName - * A fully-qualified path representing UserWorkloadsConfigMap resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).environment; - } - - /** - * Parse the user_workloads_config_map from UserWorkloadsConfigMap resource. - * - * @param {string} userWorkloadsConfigMapName - * A fully-qualified path representing UserWorkloadsConfigMap resource. - * @returns {string} A string representing the user_workloads_config_map. - */ - matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).user_workloads_config_map; - } - - /** - * Return a fully-qualified userWorkloadsSecret resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} environment - * @param {string} user_workloads_secret - * @returns {string} Resource name string. - */ - userWorkloadsSecretPath(project:string,location:string,environment:string,userWorkloadsSecret:string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.render({ - project: project, - location: location, - environment: environment, - user_workloads_secret: userWorkloadsSecret, - }); - } - - /** - * Parse the project from UserWorkloadsSecret resource. - * - * @param {string} userWorkloadsSecretName - * A fully-qualified path representing UserWorkloadsSecret resource. - * @returns {string} A string representing the project. - */ - matchProjectFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).project; - } - - /** - * Parse the location from UserWorkloadsSecret resource. - * - * @param {string} userWorkloadsSecretName - * A fully-qualified path representing UserWorkloadsSecret resource. - * @returns {string} A string representing the location. - */ - matchLocationFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).location; - } - - /** - * Parse the environment from UserWorkloadsSecret resource. - * - * @param {string} userWorkloadsSecretName - * A fully-qualified path representing UserWorkloadsSecret resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).environment; - } - - /** - * Parse the user_workloads_secret from UserWorkloadsSecret resource. - * - * @param {string} userWorkloadsSecretName - * A fully-qualified path representing UserWorkloadsSecret resource. - * @returns {string} A string representing the user_workloads_secret. - */ - matchUserWorkloadsSecretFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).user_workloads_secret; - } - - /** - * 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.imageVersionsStub && !this._terminated) { - return this.imageVersionsStub.then(stub => { - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_client_config.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_client_config.json deleted file mode 100644 index 6ae2b5fc9c6..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_client_config.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "interfaces": { - "google.cloud.orchestration.airflow.service.v1.ImageVersions": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "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 - } - }, - "methods": { - "ListImageVersions": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_proto_list.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_proto_list.json deleted file mode 100644 index 674df9932cf..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/image_versions_proto_list.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - "../../protos/google/cloud/orchestration/airflow/service/v1/environments.proto", - "../../protos/google/cloud/orchestration/airflow/service/v1/image_versions.proto", - "../../protos/google/cloud/orchestration/airflow/service/v1/operations.proto" -] diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/index.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/index.ts deleted file mode 100644 index 38cec48d623..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/src/v1/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 {EnvironmentsClient} from './environments_client'; -export {ImageVersionsClient} from './image_versions_client'; diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 2ef4b0dcd16..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 service = require('@google-cloud/orchestration-airflow'); - -function main() { - const environmentsClient = new service.EnvironmentsClient(); - const imageVersionsClient = new service.ImageVersionsClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index dd47e569943..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 {EnvironmentsClient, ImageVersionsClient} from '@google-cloud/orchestration-airflow'; - -// check that the client class type name can be used -function doStuffWithEnvironmentsClient(client: EnvironmentsClient) { - client.close(); -} -function doStuffWithImageVersionsClient(client: ImageVersionsClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const environmentsClient = new EnvironmentsClient(); - doStuffWithEnvironmentsClient(environmentsClient); - // check that the client instance can be created - const imageVersionsClient = new ImageVersionsClient(); - doStuffWithImageVersionsClient(imageVersionsClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/install.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/install.ts deleted file mode 100644 index fd5bfdc71d5..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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-orchestration-airflow-service/v1/test/gapic_environments_v1.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/test/gapic_environments_v1.ts deleted file mode 100644 index 5b3ae585219..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/test/gapic_environments_v1.ts +++ /dev/null @@ -1,4159 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 environmentsModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos} 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.EnvironmentsClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new environmentsModule.v1.EnvironmentsClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'composer.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new environmentsModule.v1.EnvironmentsClient(); - 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 = environmentsModule.v1.EnvironmentsClient.servicePath; - assert.strictEqual(servicePath, 'composer.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = environmentsModule.v1.EnvironmentsClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'composer.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new environmentsModule.v1.EnvironmentsClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'composer.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new environmentsModule.v1.EnvironmentsClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'composer.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 environmentsModule.v1.EnvironmentsClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'composer.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 environmentsModule.v1.EnvironmentsClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'composer.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 environmentsModule.v1.EnvironmentsClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = environmentsModule.v1.EnvironmentsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new environmentsModule.v1.EnvironmentsClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.environmentsStub, undefined); - await client.initialize(); - assert(client.environmentsStub); - }); - - it('has close method for the initialized client', done => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.environmentsStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.environmentsStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new environmentsModule.v1.EnvironmentsClient({ - 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 environmentsModule.v1.EnvironmentsClient({ - 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('getEnvironment', () => { - it('invokes getEnvironment without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.Environment() - ); - client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); - const [response] = await client.getEnvironment(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEnvironment without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.Environment() - ); - client.innerApiCalls.getEnvironment = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEnvironment( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IEnvironment|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEnvironment with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getEnvironment = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getEnvironment(request), expectedError); - const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEnvironment with closed client', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getEnvironment(request), expectedError); - }); - }); - - describe('executeAirflowCommand', () => { - it('invokes executeAirflowCommand without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse() - ); - client.innerApiCalls.executeAirflowCommand = stubSimpleCall(expectedResponse); - const [response] = await client.executeAirflowCommand(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.executeAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeAirflowCommand without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandResponse() - ); - client.innerApiCalls.executeAirflowCommand = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.executeAirflowCommand( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IExecuteAirflowCommandResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.executeAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeAirflowCommand with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.executeAirflowCommand = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.executeAirflowCommand(request), expectedError); - const actualRequest = (client.innerApiCalls.executeAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeAirflowCommand with closed client', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ExecuteAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.executeAirflowCommand(request), expectedError); - }); - }); - - describe('stopAirflowCommand', () => { - it('invokes stopAirflowCommand without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse() - ); - client.innerApiCalls.stopAirflowCommand = stubSimpleCall(expectedResponse); - const [response] = await client.stopAirflowCommand(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.stopAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.stopAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes stopAirflowCommand without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandResponse() - ); - client.innerApiCalls.stopAirflowCommand = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.stopAirflowCommand( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IStopAirflowCommandResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.stopAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.stopAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes stopAirflowCommand with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.stopAirflowCommand = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.stopAirflowCommand(request), expectedError); - const actualRequest = (client.innerApiCalls.stopAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.stopAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes stopAirflowCommand with closed client', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.StopAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.stopAirflowCommand(request), expectedError); - }); - }); - - describe('pollAirflowCommand', () => { - it('invokes pollAirflowCommand without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse() - ); - client.innerApiCalls.pollAirflowCommand = stubSimpleCall(expectedResponse); - const [response] = await client.pollAirflowCommand(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.pollAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.pollAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes pollAirflowCommand without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandResponse() - ); - client.innerApiCalls.pollAirflowCommand = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.pollAirflowCommand( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IPollAirflowCommandResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.pollAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.pollAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes pollAirflowCommand with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.pollAirflowCommand = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.pollAirflowCommand(request), expectedError); - const actualRequest = (client.innerApiCalls.pollAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.pollAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes pollAirflowCommand with closed client', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.PollAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.pollAirflowCommand(request), expectedError); - }); - }); - - describe('createUserWorkloadsSecret', () => { - it('invokes createUserWorkloadsSecret without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret() - ); - client.innerApiCalls.createUserWorkloadsSecret = stubSimpleCall(expectedResponse); - const [response] = await client.createUserWorkloadsSecret(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createUserWorkloadsSecret without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret() - ); - client.innerApiCalls.createUserWorkloadsSecret = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createUserWorkloadsSecret( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createUserWorkloadsSecret with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createUserWorkloadsSecret = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createUserWorkloadsSecret(request), expectedError); - const actualRequest = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createUserWorkloadsSecret with closed client', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsSecretRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createUserWorkloadsSecret(request), expectedError); - }); - }); - - describe('getUserWorkloadsSecret', () => { - it('invokes getUserWorkloadsSecret without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret() - ); - client.innerApiCalls.getUserWorkloadsSecret = stubSimpleCall(expectedResponse); - const [response] = await client.getUserWorkloadsSecret(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getUserWorkloadsSecret without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret() - ); - client.innerApiCalls.getUserWorkloadsSecret = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getUserWorkloadsSecret( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getUserWorkloadsSecret with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getUserWorkloadsSecret = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getUserWorkloadsSecret(request), expectedError); - const actualRequest = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getUserWorkloadsSecret with closed client', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsSecretRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getUserWorkloadsSecret(request), expectedError); - }); - }); - - describe('updateUserWorkloadsSecret', () => { - it('invokes updateUserWorkloadsSecret without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest() - ); - request.userWorkloadsSecret ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest', ['userWorkloadsSecret', 'name']); - request.userWorkloadsSecret.name = defaultValue1; - const expectedHeaderRequestParams = `user_workloads_secret.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret() - ); - client.innerApiCalls.updateUserWorkloadsSecret = stubSimpleCall(expectedResponse); - const [response] = await client.updateUserWorkloadsSecret(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateUserWorkloadsSecret without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest() - ); - request.userWorkloadsSecret ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest', ['userWorkloadsSecret', 'name']); - request.userWorkloadsSecret.name = defaultValue1; - const expectedHeaderRequestParams = `user_workloads_secret.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret() - ); - client.innerApiCalls.updateUserWorkloadsSecret = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateUserWorkloadsSecret( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateUserWorkloadsSecret with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest() - ); - request.userWorkloadsSecret ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest', ['userWorkloadsSecret', 'name']); - request.userWorkloadsSecret.name = defaultValue1; - const expectedHeaderRequestParams = `user_workloads_secret.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateUserWorkloadsSecret = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateUserWorkloadsSecret(request), expectedError); - const actualRequest = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateUserWorkloadsSecret with closed client', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest() - ); - request.userWorkloadsSecret ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsSecretRequest', ['userWorkloadsSecret', 'name']); - request.userWorkloadsSecret.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateUserWorkloadsSecret(request), expectedError); - }); - }); - - describe('deleteUserWorkloadsSecret', () => { - it('invokes deleteUserWorkloadsSecret without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteUserWorkloadsSecret = stubSimpleCall(expectedResponse); - const [response] = await client.deleteUserWorkloadsSecret(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteUserWorkloadsSecret without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteUserWorkloadsSecret = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteUserWorkloadsSecret( - request, - (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteUserWorkloadsSecret with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteUserWorkloadsSecret = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteUserWorkloadsSecret(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteUserWorkloadsSecret with closed client', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsSecretRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteUserWorkloadsSecret(request), expectedError); - }); - }); - - describe('createUserWorkloadsConfigMap', () => { - it('invokes createUserWorkloadsConfigMap without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap() - ); - client.innerApiCalls.createUserWorkloadsConfigMap = stubSimpleCall(expectedResponse); - const [response] = await client.createUserWorkloadsConfigMap(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createUserWorkloadsConfigMap without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap() - ); - client.innerApiCalls.createUserWorkloadsConfigMap = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createUserWorkloadsConfigMap( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createUserWorkloadsConfigMap with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createUserWorkloadsConfigMap = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createUserWorkloadsConfigMap(request), expectedError); - const actualRequest = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createUserWorkloadsConfigMap with closed client', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateUserWorkloadsConfigMapRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createUserWorkloadsConfigMap(request), expectedError); - }); - }); - - describe('getUserWorkloadsConfigMap', () => { - it('invokes getUserWorkloadsConfigMap without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap() - ); - client.innerApiCalls.getUserWorkloadsConfigMap = stubSimpleCall(expectedResponse); - const [response] = await client.getUserWorkloadsConfigMap(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getUserWorkloadsConfigMap without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap() - ); - client.innerApiCalls.getUserWorkloadsConfigMap = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getUserWorkloadsConfigMap( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getUserWorkloadsConfigMap with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getUserWorkloadsConfigMap = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getUserWorkloadsConfigMap(request), expectedError); - const actualRequest = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getUserWorkloadsConfigMap with closed client', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.GetUserWorkloadsConfigMapRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getUserWorkloadsConfigMap(request), expectedError); - }); - }); - - describe('updateUserWorkloadsConfigMap', () => { - it('invokes updateUserWorkloadsConfigMap without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest() - ); - request.userWorkloadsConfigMap ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest', ['userWorkloadsConfigMap', 'name']); - request.userWorkloadsConfigMap.name = defaultValue1; - const expectedHeaderRequestParams = `user_workloads_config_map.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap() - ); - client.innerApiCalls.updateUserWorkloadsConfigMap = stubSimpleCall(expectedResponse); - const [response] = await client.updateUserWorkloadsConfigMap(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateUserWorkloadsConfigMap without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest() - ); - request.userWorkloadsConfigMap ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest', ['userWorkloadsConfigMap', 'name']); - request.userWorkloadsConfigMap.name = defaultValue1; - const expectedHeaderRequestParams = `user_workloads_config_map.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap() - ); - client.innerApiCalls.updateUserWorkloadsConfigMap = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateUserWorkloadsConfigMap( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateUserWorkloadsConfigMap with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest() - ); - request.userWorkloadsConfigMap ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest', ['userWorkloadsConfigMap', 'name']); - request.userWorkloadsConfigMap.name = defaultValue1; - const expectedHeaderRequestParams = `user_workloads_config_map.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateUserWorkloadsConfigMap = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateUserWorkloadsConfigMap(request), expectedError); - const actualRequest = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateUserWorkloadsConfigMap with closed client', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest() - ); - request.userWorkloadsConfigMap ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateUserWorkloadsConfigMapRequest', ['userWorkloadsConfigMap', 'name']); - request.userWorkloadsConfigMap.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateUserWorkloadsConfigMap(request), expectedError); - }); - }); - - describe('deleteUserWorkloadsConfigMap', () => { - it('invokes deleteUserWorkloadsConfigMap without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteUserWorkloadsConfigMap = stubSimpleCall(expectedResponse); - const [response] = await client.deleteUserWorkloadsConfigMap(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteUserWorkloadsConfigMap without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteUserWorkloadsConfigMap = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteUserWorkloadsConfigMap( - request, - (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteUserWorkloadsConfigMap with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteUserWorkloadsConfigMap = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteUserWorkloadsConfigMap(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteUserWorkloadsConfigMap with closed client', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteUserWorkloadsConfigMapRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteUserWorkloadsConfigMap(request), expectedError); - }); - }); - - describe('fetchDatabaseProperties', () => { - it('invokes fetchDatabaseProperties without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse() - ); - client.innerApiCalls.fetchDatabaseProperties = stubSimpleCall(expectedResponse); - const [response] = await client.fetchDatabaseProperties(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchDatabaseProperties without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesResponse() - ); - client.innerApiCalls.fetchDatabaseProperties = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.fetchDatabaseProperties( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IFetchDatabasePropertiesResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchDatabaseProperties with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.fetchDatabaseProperties = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.fetchDatabaseProperties(request), expectedError); - const actualRequest = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchDatabaseProperties with closed client', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.FetchDatabasePropertiesRequest', ['environment']); - request.environment = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.fetchDatabaseProperties(request), expectedError); - }); - }); - - describe('createEnvironment', () => { - it('invokes createEnvironment without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createEnvironment = stubLongRunningCall(expectedResponse); - const [operation] = await client.createEnvironment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEnvironment without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createEnvironment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createEnvironment( - 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.createEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEnvironment with call error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEnvironment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createEnvironment(request), expectedError); - const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEnvironment with LRO error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CreateEnvironmentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEnvironment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createEnvironment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateEnvironmentProgress without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.checkCreateEnvironmentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateEnvironmentProgress with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateEnvironmentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateEnvironment', () => { - it('invokes updateEnvironment without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateEnvironment = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateEnvironment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEnvironment without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateEnvironment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateEnvironment( - 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.updateEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEnvironment with call error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEnvironment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateEnvironment(request), expectedError); - const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEnvironment with LRO error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.UpdateEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEnvironment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateEnvironment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateEnvironmentProgress without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.checkUpdateEnvironmentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateEnvironmentProgress with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkUpdateEnvironmentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteEnvironment', () => { - it('invokes deleteEnvironment without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteEnvironment = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteEnvironment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEnvironment without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteEnvironment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteEnvironment( - 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.deleteEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEnvironment with call error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEnvironment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteEnvironment(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEnvironment with LRO error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DeleteEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEnvironment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteEnvironment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteEnvironmentProgress without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.checkDeleteEnvironmentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteEnvironmentProgress with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteEnvironmentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('checkUpgrade', () => { - it('invokes checkUpgrade without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.checkUpgrade = stubLongRunningCall(expectedResponse); - const [operation] = await client.checkUpgrade(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpgrade without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.checkUpgrade = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.checkUpgrade( - 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.checkUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpgrade with call error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.checkUpgrade = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.checkUpgrade(request), expectedError); - const actualRequest = (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpgrade with LRO error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.CheckUpgradeRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.checkUpgrade = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.checkUpgrade(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCheckUpgradeProgress without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.checkCheckUpgradeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCheckUpgradeProgress with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCheckUpgradeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('saveSnapshot', () => { - it('invokes saveSnapshot without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.saveSnapshot = stubLongRunningCall(expectedResponse); - const [operation] = await client.saveSnapshot(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.saveSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.saveSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes saveSnapshot without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.saveSnapshot = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.saveSnapshot( - 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.saveSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.saveSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes saveSnapshot with call error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.saveSnapshot = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.saveSnapshot(request), expectedError); - const actualRequest = (client.innerApiCalls.saveSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.saveSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes saveSnapshot with LRO error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.SaveSnapshotRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.saveSnapshot = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.saveSnapshot(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.saveSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.saveSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkSaveSnapshotProgress without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.checkSaveSnapshotProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkSaveSnapshotProgress with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkSaveSnapshotProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('loadSnapshot', () => { - it('invokes loadSnapshot without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.loadSnapshot = stubLongRunningCall(expectedResponse); - const [operation] = await client.loadSnapshot(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.loadSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.loadSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes loadSnapshot without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.loadSnapshot = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.loadSnapshot( - 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.loadSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.loadSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes loadSnapshot with call error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.loadSnapshot = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.loadSnapshot(request), expectedError); - const actualRequest = (client.innerApiCalls.loadSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.loadSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes loadSnapshot with LRO error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.LoadSnapshotRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.loadSnapshot = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.loadSnapshot(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.loadSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.loadSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkLoadSnapshotProgress without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.checkLoadSnapshotProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkLoadSnapshotProgress with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkLoadSnapshotProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('databaseFailover', () => { - it('invokes databaseFailover without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.databaseFailover = stubLongRunningCall(expectedResponse); - const [operation] = await client.databaseFailover(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.databaseFailover as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.databaseFailover as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes databaseFailover without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.databaseFailover = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.databaseFailover( - 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.databaseFailover as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.databaseFailover as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes databaseFailover with call error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.databaseFailover = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.databaseFailover(request), expectedError); - const actualRequest = (client.innerApiCalls.databaseFailover as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.databaseFailover as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes databaseFailover with LRO error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.DatabaseFailoverRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.databaseFailover = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.databaseFailover(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.databaseFailover as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.databaseFailover as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDatabaseFailoverProgress without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.checkDatabaseFailoverProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDatabaseFailoverProgress with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDatabaseFailoverProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listEnvironments', () => { - it('invokes listEnvironments without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), - ]; - client.innerApiCalls.listEnvironments = stubSimpleCall(expectedResponse); - const [response] = await client.listEnvironments(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEnvironments without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), - ]; - client.innerApiCalls.listEnvironments = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listEnvironments( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IEnvironment[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEnvironments with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listEnvironments = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listEnvironments(request), expectedError); - const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEnvironmentsStream without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), - ]; - client.descriptors.page.listEnvironments.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listEnvironmentsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1.Environment[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.Environment) => { - 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.listEnvironments.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listEnvironments, request)); - assert( - (client.descriptors.page.listEnvironments.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listEnvironmentsStream with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEnvironments.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listEnvironmentsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1.Environment[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.Environment) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listEnvironments.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listEnvironments, request)); - assert( - (client.descriptors.page.listEnvironments.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEnvironments without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.Environment()), - ]; - client.descriptors.page.listEnvironments.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.orchestration.airflow.service.v1.IEnvironment[] = []; - const iterable = client.listEnvironmentsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEnvironments with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEnvironments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listEnvironmentsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.orchestration.airflow.service.v1.IEnvironment[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listWorkloads', () => { - it('invokes listWorkloads without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), - ]; - client.innerApiCalls.listWorkloads = stubSimpleCall(expectedResponse); - const [response] = await client.listWorkloads(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listWorkloads as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listWorkloads as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listWorkloads without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), - ]; - client.innerApiCalls.listWorkloads = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listWorkloads( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listWorkloads as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listWorkloads as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listWorkloads with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listWorkloads = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listWorkloads(request), expectedError); - const actualRequest = (client.innerApiCalls.listWorkloads as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listWorkloads as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listWorkloadsStream without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), - ]; - client.descriptors.page.listWorkloads.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listWorkloadsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload) => { - 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.listWorkloads.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listWorkloads, request)); - assert( - (client.descriptors.page.listWorkloads.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listWorkloadsStream with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listWorkloads.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listWorkloadsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listWorkloads.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listWorkloads, request)); - assert( - (client.descriptors.page.listWorkloads.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listWorkloads without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.ComposerWorkload()), - ]; - client.descriptors.page.listWorkloads.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload[] = []; - const iterable = client.listWorkloadsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listWorkloads.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listWorkloads.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listWorkloads with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListWorkloadsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listWorkloads.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listWorkloadsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.orchestration.airflow.service.v1.ListWorkloadsResponse.IComposerWorkload[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listWorkloads.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listWorkloads.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listUserWorkloadsSecrets', () => { - it('invokes listUserWorkloadsSecrets without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), - ]; - client.innerApiCalls.listUserWorkloadsSecrets = stubSimpleCall(expectedResponse); - const [response] = await client.listUserWorkloadsSecrets(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUserWorkloadsSecrets without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), - ]; - client.innerApiCalls.listUserWorkloadsSecrets = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listUserWorkloadsSecrets( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUserWorkloadsSecrets with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listUserWorkloadsSecrets = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listUserWorkloadsSecrets(request), expectedError); - const actualRequest = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUserWorkloadsSecretsStream without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), - ]; - client.descriptors.page.listUserWorkloadsSecrets.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listUserWorkloadsSecretsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret) => { - 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.listUserWorkloadsSecrets.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listUserWorkloadsSecrets, request)); - assert( - (client.descriptors.page.listUserWorkloadsSecrets.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listUserWorkloadsSecretsStream with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listUserWorkloadsSecrets.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listUserWorkloadsSecretsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listUserWorkloadsSecrets.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listUserWorkloadsSecrets, request)); - assert( - (client.descriptors.page.listUserWorkloadsSecrets.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listUserWorkloadsSecrets without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsSecret()), - ]; - client.descriptors.page.listUserWorkloadsSecrets.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret[] = []; - const iterable = client.listUserWorkloadsSecretsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listUserWorkloadsSecrets.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listUserWorkloadsSecrets.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listUserWorkloadsSecrets with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsSecretsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listUserWorkloadsSecrets.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listUserWorkloadsSecretsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsSecret[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listUserWorkloadsSecrets.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listUserWorkloadsSecrets.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listUserWorkloadsConfigMaps', () => { - it('invokes listUserWorkloadsConfigMaps without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), - ]; - client.innerApiCalls.listUserWorkloadsConfigMaps = stubSimpleCall(expectedResponse); - const [response] = await client.listUserWorkloadsConfigMaps(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUserWorkloadsConfigMaps without error using callback', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), - ]; - client.innerApiCalls.listUserWorkloadsConfigMaps = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listUserWorkloadsConfigMaps( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUserWorkloadsConfigMaps with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listUserWorkloadsConfigMaps = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listUserWorkloadsConfigMaps(request), expectedError); - const actualRequest = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUserWorkloadsConfigMapsStream without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), - ]; - client.descriptors.page.listUserWorkloadsConfigMaps.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listUserWorkloadsConfigMapsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap) => { - 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.listUserWorkloadsConfigMaps.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listUserWorkloadsConfigMaps, request)); - assert( - (client.descriptors.page.listUserWorkloadsConfigMaps.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listUserWorkloadsConfigMapsStream with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listUserWorkloadsConfigMaps.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listUserWorkloadsConfigMapsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listUserWorkloadsConfigMaps.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listUserWorkloadsConfigMaps, request)); - assert( - (client.descriptors.page.listUserWorkloadsConfigMaps.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listUserWorkloadsConfigMaps without error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.UserWorkloadsConfigMap()), - ]; - client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap[] = []; - const iterable = client.listUserWorkloadsConfigMapsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listUserWorkloadsConfigMaps with error', async () => { - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListUserWorkloadsConfigMapsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listUserWorkloadsConfigMapsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.orchestration.airflow.service.v1.IUserWorkloadsConfigMap[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listUserWorkloadsConfigMaps.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 environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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 environmentsModule.v1.EnvironmentsClient({ - 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); - } - }); - }); - 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 environmentsModule.v1.EnvironmentsClient({ - 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 environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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 environmentsModule.v1.EnvironmentsClient({ - 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); - } - }); - }); - 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 environmentsModule.v1.EnvironmentsClient({ - 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 environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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 environmentsModule.v1.EnvironmentsClient({ - 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); - } - }); - }); - 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 environmentsModule.v1.EnvironmentsClient({ - 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 environmentsModule.v1.EnvironmentsClient({ - 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.ListOperationsResponse[] = []; - 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 environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.ListOperationsResponse[] = []; - 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('environment', () => { - const fakePath = "/rendered/path/environment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - environment: "environmentValue", - }; - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.environmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.environmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('environmentPath', () => { - const result = client.environmentPath("projectValue", "locationValue", "environmentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEnvironmentName', () => { - const result = client.matchProjectFromEnvironmentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEnvironmentName', () => { - const result = client.matchLocationFromEnvironmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromEnvironmentName', () => { - const result = client.matchEnvironmentFromEnvironmentName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('userWorkloadsConfigMap', () => { - const fakePath = "/rendered/path/userWorkloadsConfigMap"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - environment: "environmentValue", - user_workloads_config_map: "userWorkloadsConfigMapValue", - }; - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.userWorkloadsConfigMapPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.userWorkloadsConfigMapPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('userWorkloadsConfigMapPath', () => { - const result = client.userWorkloadsConfigMapPath("projectValue", "locationValue", "environmentValue", "userWorkloadsConfigMapValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromUserWorkloadsConfigMapName', () => { - const result = client.matchProjectFromUserWorkloadsConfigMapName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromUserWorkloadsConfigMapName', () => { - const result = client.matchLocationFromUserWorkloadsConfigMapName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromUserWorkloadsConfigMapName', () => { - const result = client.matchEnvironmentFromUserWorkloadsConfigMapName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName', () => { - const result = client.matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(fakePath); - assert.strictEqual(result, "userWorkloadsConfigMapValue"); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('userWorkloadsSecret', () => { - const fakePath = "/rendered/path/userWorkloadsSecret"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - environment: "environmentValue", - user_workloads_secret: "userWorkloadsSecretValue", - }; - const client = new environmentsModule.v1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.userWorkloadsSecretPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.userWorkloadsSecretPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('userWorkloadsSecretPath', () => { - const result = client.userWorkloadsSecretPath("projectValue", "locationValue", "environmentValue", "userWorkloadsSecretValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromUserWorkloadsSecretName', () => { - const result = client.matchProjectFromUserWorkloadsSecretName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromUserWorkloadsSecretName', () => { - const result = client.matchLocationFromUserWorkloadsSecretName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromUserWorkloadsSecretName', () => { - const result = client.matchEnvironmentFromUserWorkloadsSecretName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchUserWorkloadsSecretFromUserWorkloadsSecretName', () => { - const result = client.matchUserWorkloadsSecretFromUserWorkloadsSecretName(fakePath); - assert.strictEqual(result, "userWorkloadsSecretValue"); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/test/gapic_image_versions_v1.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/test/gapic_image_versions_v1.ts deleted file mode 100644 index dc1217ab83e..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/test/gapic_image_versions_v1.ts +++ /dev/null @@ -1,663 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 imageversionsModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1.ImageVersionsClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new imageversionsModule.v1.ImageVersionsClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'composer.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new imageversionsModule.v1.ImageVersionsClient(); - 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 = imageversionsModule.v1.ImageVersionsClient.servicePath; - assert.strictEqual(servicePath, 'composer.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = imageversionsModule.v1.ImageVersionsClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'composer.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new imageversionsModule.v1.ImageVersionsClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'composer.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new imageversionsModule.v1.ImageVersionsClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'composer.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 imageversionsModule.v1.ImageVersionsClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'composer.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 imageversionsModule.v1.ImageVersionsClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'composer.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 imageversionsModule.v1.ImageVersionsClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = imageversionsModule.v1.ImageVersionsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new imageversionsModule.v1.ImageVersionsClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new imageversionsModule.v1.ImageVersionsClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.imageVersionsStub, undefined); - await client.initialize(); - assert(client.imageVersionsStub); - }); - - it('has close method for the initialized client', done => { - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.imageVersionsStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.imageVersionsStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new imageversionsModule.v1.ImageVersionsClient({ - 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 imageversionsModule.v1.ImageVersionsClient({ - 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('listImageVersions', () => { - it('invokes listImageVersions without error', async () => { - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), - ]; - client.innerApiCalls.listImageVersions = stubSimpleCall(expectedResponse); - const [response] = await client.listImageVersions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listImageVersions without error using callback', async () => { - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), - ]; - client.innerApiCalls.listImageVersions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listImageVersions( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1.IImageVersion[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listImageVersions with error', async () => { - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listImageVersions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listImageVersions(request), expectedError); - const actualRequest = (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listImageVersionsStream without error', async () => { - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), - ]; - client.descriptors.page.listImageVersions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listImageVersionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1.ImageVersion[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.ImageVersion) => { - 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.listImageVersions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listImageVersions, request)); - assert( - (client.descriptors.page.listImageVersions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listImageVersionsStream with error', async () => { - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listImageVersions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listImageVersionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1.ImageVersion[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1.ImageVersion) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listImageVersions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listImageVersions, request)); - assert( - (client.descriptors.page.listImageVersions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listImageVersions without error', async () => { - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1.ImageVersion()), - ]; - client.descriptors.page.listImageVersions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.orchestration.airflow.service.v1.IImageVersion[] = []; - const iterable = client.listImageVersionsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listImageVersions with error', async () => { - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1.ListImageVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listImageVersions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listImageVersionsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.orchestration.airflow.service.v1.IImageVersion[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('Path templates', () => { - - describe('environment', () => { - const fakePath = "/rendered/path/environment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - environment: "environmentValue", - }; - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.environmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.environmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('environmentPath', () => { - const result = client.environmentPath("projectValue", "locationValue", "environmentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEnvironmentName', () => { - const result = client.matchProjectFromEnvironmentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEnvironmentName', () => { - const result = client.matchLocationFromEnvironmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromEnvironmentName', () => { - const result = client.matchEnvironmentFromEnvironmentName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('userWorkloadsConfigMap', () => { - const fakePath = "/rendered/path/userWorkloadsConfigMap"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - environment: "environmentValue", - user_workloads_config_map: "userWorkloadsConfigMapValue", - }; - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.userWorkloadsConfigMapPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.userWorkloadsConfigMapPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('userWorkloadsConfigMapPath', () => { - const result = client.userWorkloadsConfigMapPath("projectValue", "locationValue", "environmentValue", "userWorkloadsConfigMapValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromUserWorkloadsConfigMapName', () => { - const result = client.matchProjectFromUserWorkloadsConfigMapName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromUserWorkloadsConfigMapName', () => { - const result = client.matchLocationFromUserWorkloadsConfigMapName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromUserWorkloadsConfigMapName', () => { - const result = client.matchEnvironmentFromUserWorkloadsConfigMapName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName', () => { - const result = client.matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(fakePath); - assert.strictEqual(result, "userWorkloadsConfigMapValue"); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('userWorkloadsSecret', () => { - const fakePath = "/rendered/path/userWorkloadsSecret"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - environment: "environmentValue", - user_workloads_secret: "userWorkloadsSecretValue", - }; - const client = new imageversionsModule.v1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.userWorkloadsSecretPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.userWorkloadsSecretPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('userWorkloadsSecretPath', () => { - const result = client.userWorkloadsSecretPath("projectValue", "locationValue", "environmentValue", "userWorkloadsSecretValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromUserWorkloadsSecretName', () => { - const result = client.matchProjectFromUserWorkloadsSecretName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromUserWorkloadsSecretName', () => { - const result = client.matchLocationFromUserWorkloadsSecretName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromUserWorkloadsSecretName', () => { - const result = client.matchEnvironmentFromUserWorkloadsSecretName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchUserWorkloadsSecretFromUserWorkloadsSecretName', () => { - const result = client.matchUserWorkloadsSecretFromUserWorkloadsSecretName(fakePath); - assert.strictEqual(result, "userWorkloadsSecretValue"); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/tsconfig.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2018", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts" - ] -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/webpack.config.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/webpack.config.js deleted file mode 100644 index 9b7becac60a..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1/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: 'Environments', - filename: './environments.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/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.eslintignore b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.eslintignore deleted file mode 100644 index cfc348ec4d1..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.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-orchestration-airflow-service/v1beta1/.eslintrc.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.eslintrc.json deleted file mode 100644 index 78215349546..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.eslintrc.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./node_modules/gts" -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.gitignore b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.gitignore deleted file mode 100644 index d4f03a0df2e..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.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-orchestration-airflow-service/v1beta1/.jsdoc.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.jsdoc.js deleted file mode 100644 index 86e4179a983..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 2024 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/orchestration-airflow', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.mocharc.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.mocharc.js deleted file mode 100644 index 13b67c34edc..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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-orchestration-airflow-service/v1beta1/.prettierrc.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.prettierrc.js deleted file mode 100644 index 9a8fd690982..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/.prettierrc.js +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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-orchestration-airflow-service/v1beta1/README.md b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/README.md deleted file mode 100644 index 536af38a9bb..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/README.md +++ /dev/null @@ -1 +0,0 @@ -Service: Nodejs Client diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/package.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/package.json deleted file mode 100644 index 5d2f497a88a..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/package.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "name": "@google-cloud/orchestration-airflow", - "version": "0.1.0", - "description": "Service client for Node.js", - "repository": "googleapis/nodejs-service", - "license": "Apache-2.0", - "author": "Google LLC", - "main": "build/src/index.js", - "files": [ - "build/src", - "build/protos" - ], - "keywords": [ - "google apis client", - "google api client", - "google apis", - "google api", - "google", - "google cloud platform", - "google cloud", - "cloud", - "google service", - "service", - "environments", - "image versions" - ], - "scripts": { - "clean": "gts clean", - "compile": "tsc -p . && cp -r protos build/ && minifyProtoJson", - "compile-protos": "compileProtos src", - "docs": "jsdoc -c .jsdoc.js", - "fix": "gts fix", - "lint": "gts check", - "prepare": "npm run compile-protos && npm run compile", - "system-test": "c8 mocha build/system-test", - "test": "c8 mocha build/test" - }, - "dependencies": { - "google-gax": "^4.3.4" - }, - "devDependencies": { - "@types/mocha": "^10.0.6", - "@types/node": "^20.12.12", - "@types/sinon": "^10.0.20", - "c8": "^9.1.0", - "gapic-tools": "^0.4.2", - "gts": "5.3.0", - "jsdoc": "^4.0.3", - "jsdoc-fresh": "^3.0.0", - "jsdoc-region-tag": "^3.0.0", - "mocha": "^10.4.0", - "pack-n-play": "^2.0.3", - "sinon": "^15.2.0", - "typescript": "5.1.6" - }, - "engines": { - "node": ">=v14" - } -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto deleted file mode 100644 index cd66e2d6e18..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto +++ /dev/null @@ -1,2145 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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.orchestration.airflow.service.v1beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/orchestration/airflow/service/v1beta1/operations.proto"; -import "google/longrunning/operations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -option go_package = "cloud.google.com/go/orchestration/airflow/service/apiv1beta1/servicepb;servicepb"; -option java_multiple_files = true; -option java_package = "com.google.cloud.orchestration.airflow.service.v1beta1"; - -// Managed Apache Airflow Environments. -service Environments { - option (google.api.default_host) = "composer.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Create a new environment. - rpc CreateEnvironment(CreateEnvironmentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*}/environments" - body: "environment" - }; - option (google.api.method_signature) = "parent,environment"; - option (google.longrunning.operation_info) = { - response_type: "Environment" - metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - }; - } - - // Get an existing environment. - rpc GetEnvironment(GetEnvironmentRequest) returns (Environment) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/environments/*}" - }; - option (google.api.method_signature) = "name"; - } - - // List environments. - rpc ListEnvironments(ListEnvironmentsRequest) - returns (ListEnvironmentsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/environments" - }; - option (google.api.method_signature) = "parent"; - } - - // Update an environment. - rpc UpdateEnvironment(UpdateEnvironmentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - patch: "/v1beta1/{name=projects/*/locations/*/environments/*}" - body: "environment" - }; - option (google.api.method_signature) = "name,environment,update_mask"; - option (google.longrunning.operation_info) = { - response_type: "Environment" - metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - }; - } - - // Delete an environment. - rpc DeleteEnvironment(DeleteEnvironmentRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/environments/*}" - }; - option (google.api.method_signature) = "name"; - option (google.longrunning.operation_info) = { - response_type: "google.protobuf.Empty" - metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - }; - } - - // Restart Airflow web server. - rpc RestartWebServer(RestartWebServerRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{name=projects/*/locations/*/environments/*}:restartWebServer" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "Environment" - metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - }; - } - - // Check if an upgrade operation on the environment will succeed. - // - // In case of problems detailed info can be found in the returned Operation. - rpc CheckUpgrade(CheckUpgradeRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:checkUpgrade" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse" - metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - }; - } - - // Executes Airflow CLI command. - rpc ExecuteAirflowCommand(ExecuteAirflowCommandRequest) - returns (ExecuteAirflowCommandResponse) { - option (google.api.http) = { - post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand" - body: "*" - }; - } - - // Stops Airflow CLI command execution. - rpc StopAirflowCommand(StopAirflowCommandRequest) - returns (StopAirflowCommandResponse) { - option (google.api.http) = { - post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand" - body: "*" - }; - } - - // Polls Airflow CLI command execution and fetches logs. - rpc PollAirflowCommand(PollAirflowCommandRequest) - returns (PollAirflowCommandResponse) { - option (google.api.http) = { - post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand" - body: "*" - }; - } - - // Lists workloads in a Cloud Composer environment. Workload is a unit that - // runs a single Composer component. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc ListWorkloads(ListWorkloadsRequest) returns (ListWorkloadsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*/environments/*}/workloads" - }; - option (google.api.method_signature) = "parent"; - } - - // Creates a user workloads Secret. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc CreateUserWorkloadsSecret(CreateUserWorkloadsSecretRequest) - returns (UserWorkloadsSecret) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets" - body: "user_workloads_secret" - }; - option (google.api.method_signature) = "parent,user_workloads_secret"; - } - - // Gets an existing user workloads Secret. - // Values of the "data" field in the response are cleared. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc GetUserWorkloadsSecret(GetUserWorkloadsSecretRequest) - returns (UserWorkloadsSecret) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists user workloads Secrets. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc ListUserWorkloadsSecrets(ListUserWorkloadsSecretsRequest) - returns (ListUserWorkloadsSecretsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets" - }; - option (google.api.method_signature) = "parent"; - } - - // Updates a user workloads Secret. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc UpdateUserWorkloadsSecret(UpdateUserWorkloadsSecretRequest) - returns (UserWorkloadsSecret) { - option (google.api.http) = { - put: "/v1beta1/{user_workloads_secret.name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" - body: "user_workloads_secret" - }; - option (google.api.method_signature) = "user_workloads_secret"; - } - - // Deletes a user workloads Secret. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc DeleteUserWorkloadsSecret(DeleteUserWorkloadsSecretRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a user workloads ConfigMap. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc CreateUserWorkloadsConfigMap(CreateUserWorkloadsConfigMapRequest) - returns (UserWorkloadsConfigMap) { - option (google.api.http) = { - post: "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps" - body: "user_workloads_config_map" - }; - option (google.api.method_signature) = "parent,user_workloads_config_map"; - } - - // Gets an existing user workloads ConfigMap. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc GetUserWorkloadsConfigMap(GetUserWorkloadsConfigMapRequest) - returns (UserWorkloadsConfigMap) { - option (google.api.http) = { - get: "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists user workloads ConfigMaps. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc ListUserWorkloadsConfigMaps(ListUserWorkloadsConfigMapsRequest) - returns (ListUserWorkloadsConfigMapsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps" - }; - option (google.api.method_signature) = "parent"; - } - - // Updates a user workloads ConfigMap. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc UpdateUserWorkloadsConfigMap(UpdateUserWorkloadsConfigMapRequest) - returns (UserWorkloadsConfigMap) { - option (google.api.http) = { - put: "/v1beta1/{user_workloads_config_map.name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" - body: "user_workloads_config_map" - }; - option (google.api.method_signature) = "user_workloads_config_map"; - } - - // Deletes a user workloads ConfigMap. - // - // This method is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - rpc DeleteUserWorkloadsConfigMap(DeleteUserWorkloadsConfigMapRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Creates a snapshots of a Cloud Composer environment. - // - // As a result of this operation, snapshot of environment's state is stored - // in a location specified in the SaveSnapshotRequest. - rpc SaveSnapshot(SaveSnapshotRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:saveSnapshot" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse" - metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - }; - } - - // Loads a snapshot of a Cloud Composer environment. - // - // As a result of this operation, a snapshot of environment's specified in - // LoadSnapshotRequest is loaded into the environment. - rpc LoadSnapshot(LoadSnapshotRequest) returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:loadSnapshot" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse" - metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - }; - } - - // Triggers database failover (only for highly resilient environments). - rpc DatabaseFailover(DatabaseFailoverRequest) - returns (google.longrunning.Operation) { - option (google.api.http) = { - post: "/v1beta1/{environment=projects/*/locations/*/environments/*}:databaseFailover" - body: "*" - }; - option (google.longrunning.operation_info) = { - response_type: "google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse" - metadata_type: "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - }; - } - - // Fetches database properties. - rpc FetchDatabaseProperties(FetchDatabasePropertiesRequest) - returns (FetchDatabasePropertiesResponse) { - option (google.api.http) = { - get: "/v1beta1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties" - }; - } -} - -// Create a new environment. -message CreateEnvironmentRequest { - // The parent must be of the form - // "projects/{projectId}/locations/{locationId}". - string parent = 1; - - // The environment to create. - Environment environment = 2; -} - -// Get an environment. -message GetEnvironmentRequest { - // The resource name of the environment to get, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string name = 1; -} - -// List environments in a project and location. -message ListEnvironmentsRequest { - // List environments in the given project and location, in the form: - // "projects/{projectId}/locations/{locationId}" - string parent = 1; - - // The maximum number of environments to return. - int32 page_size = 2; - - // The next_page_token value returned from a previous List request, if any. - string page_token = 3; -} - -// The environments in a project and location. -message ListEnvironmentsResponse { - // The list of environments returned by a ListEnvironmentsRequest. - repeated Environment environments = 1; - - // The page token used to query for the next page if one exists. - string next_page_token = 2; -} - -// Delete an environment. -message DeleteEnvironmentRequest { - // The environment to delete, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string name = 1; -} - -// Update an environment. -message UpdateEnvironmentRequest { - // The relative resource name of the environment to update, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string name = 2; - - // A patch environment. Fields specified by the `updateMask` will be copied - // from the patch environment into the environment under update. - Environment environment = 1; - - // Required. A comma-separated list of paths, relative to `Environment`, of - // fields to update. - // For example, to set the version of scikit-learn to install in the - // environment to 0.19.0 and to remove an existing installation of - // argparse, the `updateMask` parameter would include the following two - // `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and - // "config.softwareConfig.pypiPackages.argparse". The included patch - // environment would specify the scikit-learn version as follows: - // - // { - // "config":{ - // "softwareConfig":{ - // "pypiPackages":{ - // "scikit-learn":"==0.19.0" - // } - // } - // } - // } - // - // Note that in the above example, any existing PyPI packages - // other than scikit-learn and argparse will be unaffected. - // - // Only one update type may be included in a single request's `updateMask`. - // For example, one cannot update both the PyPI packages and - // labels in the same request. However, it is possible to update multiple - // members of a map field simultaneously in the same request. For example, - // to set the labels "label1" and "label2" while clearing "label3" (assuming - // it already exists), one can - // provide the paths "labels.label1", "labels.label2", and "labels.label3" - // and populate the patch environment as follows: - // - // { - // "labels":{ - // "label1":"new-label1-value" - // "label2":"new-label2-value" - // } - // } - // - // Note that in the above example, any existing labels that are not - // included in the `updateMask` will be unaffected. - // - // It is also possible to replace an entire map field by providing the - // map field's path in the `updateMask`. The new value of the field will - // be that which is provided in the patch environment. For example, to - // delete all pre-existing user-specified PyPI packages and - // install botocore at version 1.7.14, the `updateMask` would contain - // the path "config.softwareConfig.pypiPackages", and - // the patch environment would be the following: - // - // { - // "config":{ - // "softwareConfig":{ - // "pypiPackages":{ - // "botocore":"==1.7.14" - // } - // } - // } - // } - // - // **Note:** Only the following fields can be updated: - // - // * `config.softwareConfig.pypiPackages` - // * Replace all custom custom PyPI packages. If a replacement - // package map is not included in `environment`, all custom - // PyPI packages are cleared. It is an error to provide both - // this mask and a mask specifying an individual package. - // * `config.softwareConfig.pypiPackages.`packagename - // * Update the custom PyPI package *packagename*, - // preserving other packages. To delete the package, include it in - // `updateMask`, and omit the mapping for it in - // `environment.config.softwareConfig.pypiPackages`. It is an error - // to provide both a mask of this form and the - // `config.softwareConfig.pypiPackages` mask. - // * `labels` - // * Replace all environment labels. If a replacement labels map is not - // included in `environment`, all labels are cleared. It is an error to - // provide both this mask and a mask specifying one or more individual - // labels. - // * `labels.`labelName - // * Set the label named *labelName*, while preserving other - // labels. To delete the label, include it in `updateMask` and omit its - // mapping in `environment.labels`. It is an error to provide both a - // mask of this form and the `labels` mask. - // * `config.nodeCount` - // * Horizontally scale the number of nodes in the environment. An integer - // greater than or equal to 3 must be provided in the `config.nodeCount` - // field. Supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - // * `config.webServerNetworkAccessControl` - // * Replace the environment's current WebServerNetworkAccessControl. - // * `config.softwareConfig.airflowConfigOverrides` - // * Replace all Apache Airflow config overrides. If a replacement config - // overrides map is not included in `environment`, all config overrides - // are cleared. - // It is an error to provide both this mask and a mask specifying one or - // more individual config overrides. - // * `config.softwareConfig.airflowConfigOverrides.`section-name - // * Override the Apache Airflow config property *name* in the - // section named *section*, preserving other properties. To - // delete the property override, include it in `updateMask` and omit its - // mapping in - // `environment.config.softwareConfig.airflowConfigOverrides`. - // It is an error to provide both a mask of this form and the - // `config.softwareConfig.airflowConfigOverrides` mask. - // * `config.softwareConfig.envVariables` - // * Replace all environment variables. If a replacement environment - // variable map is not included in `environment`, all custom environment - // variables are cleared. - // * `config.softwareConfig.imageVersion` - // * Upgrade the version of the environment in-place. Refer to - // `SoftwareConfig.image_version` for information on how to format the - // new image version. Additionally, the new image version cannot effect - // a version downgrade, and must match the current image version's - // Composer and Airflow major versions. Consult the [Cloud Composer - // version list](/composer/docs/concepts/versioning/composer-versions) - // for valid values. - // * `config.softwareConfig.schedulerCount` - // * Horizontally scale the number of schedulers in Airflow. A positive - // integer not greater than the number of nodes must be provided in the - // `config.softwareConfig.schedulerCount` field. Supported for Cloud - // Composer environments in versions composer-1.*.*-airflow-2.*.*. - // * `config.softwareConfig.cloudDataLineageIntegration` - // * Configuration for Cloud Data Lineage integration. - // * `config.databaseConfig.machineType` - // * Cloud SQL machine type used by Airflow database. - // It has to be one of: db-n1-standard-2, db-n1-standard-4, - // db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer - // environments in versions composer-1.*.*-airflow-*.*.*. - // * `config.webServerConfig.machineType` - // * Machine type on which Airflow web server is running. - // It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 - // or composer-n1-webserver-8. Supported for Cloud Composer environments - // in versions composer-1.*.*-airflow-*.*.*. - // * `config.maintenanceWindow` - // * Maintenance window during which Cloud Composer components may be - // under maintenance. - // * `config.workloadsConfig` - // * The workloads configuration settings for the GKE cluster associated - // with the Cloud Composer environment. Supported for Cloud Composer - // environments in versions composer-2.*.*-airflow-*.*.* and newer. - // * `config.environmentSize` - // * The size of the Cloud Composer environment. Supported for Cloud - // Composer environments in versions composer-2.*.*-airflow-*.*.* and - // newer. - google.protobuf.FieldMask update_mask = 3 - [(google.api.field_behavior) = REQUIRED]; -} - -// Restart Airflow web server. -message RestartWebServerRequest { - // The resource name of the environment to restart the web server for, in the - // form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string name = 1; -} - -// Execute Airflow Command request. -message ExecuteAirflowCommandRequest { - // The resource name of the environment in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - string environment = 1; - - // Airflow command. - string command = 2; - - // Airflow subcommand. - string subcommand = 3; - - // Parameters for the Airflow command/subcommand as an array of arguments. - // It may contain positional arguments like `["my-dag-id"]`, key-value - // parameters like `["--foo=bar"]` or `["--foo","bar"]`, - // or other flags like `["-f"]`. - repeated string parameters = 4; -} - -// Response to ExecuteAirflowCommandRequest. -message ExecuteAirflowCommandResponse { - // The unique ID of the command execution for polling. - string execution_id = 1; - - // The name of the pod where the command is executed. - string pod = 2; - - // The namespace of the pod where the command is executed. - string pod_namespace = 3; - - // Error message. Empty if there was no error. - string error = 4; -} - -// Stop Airflow Command request. -message StopAirflowCommandRequest { - // The resource name of the environment in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - string environment = 1; - - // The unique ID of the command execution. - string execution_id = 2; - - // The name of the pod where the command is executed. - string pod = 3; - - // The namespace of the pod where the command is executed. - string pod_namespace = 4; - - // If true, the execution is terminated forcefully (SIGKILL). If false, the - // execution is stopped gracefully, giving it time for cleanup. - bool force = 5; -} - -// Response to StopAirflowCommandRequest. -message StopAirflowCommandResponse { - // Whether the execution is still running. - bool is_done = 1; - - // Output message from stopping execution request. - repeated string output = 2; -} - -// Poll Airflow Command request. -message PollAirflowCommandRequest { - // The resource name of the environment in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string environment = 1; - - // The unique ID of the command execution. - string execution_id = 2; - - // The name of the pod where the command is executed. - string pod = 3; - - // The namespace of the pod where the command is executed. - string pod_namespace = 4; - - // Line number from which new logs should be fetched. - int32 next_line_number = 5; -} - -// Response to PollAirflowCommandRequest. -message PollAirflowCommandResponse { - // Contains information about a single line from logs. - message Line { - // Number of the line. - int32 line_number = 1; - - // Text content of the log line. - string content = 2; - } - - // Information about how a command ended. - message ExitInfo { - // The exit code from the command execution. - int32 exit_code = 1; - - // Error message. Empty if there was no error. - string error = 2; - } - - // Output from the command execution. It may not contain the full output - // and the caller may need to poll for more lines. - repeated Line output = 1; - - // Whether the command execution has finished and there is no more output. - bool output_end = 2; - - // The result exit status of the command. - ExitInfo exit_info = 3; -} - -// Create user workloads Secret request. -message CreateUserWorkloadsSecretRequest { - // Required. The environment name to create a Secret for, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/Environment" - } - ]; - - // Required. User workloads Secret to create. - UserWorkloadsSecret user_workloads_secret = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// Get user workloads Secret request. -message GetUserWorkloadsSecretRequest { - // Required. The resource name of the Secret to get, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/UserWorkloadsSecret" - } - ]; -} - -// List user workloads Secrets request. -message ListUserWorkloadsSecretsRequest { - // Required. List Secrets in the given environment, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/Environment" - } - ]; - - // Optional. The maximum number of Secrets to return. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous List request, - // if any. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update user workloads Secret request. -message UpdateUserWorkloadsSecretRequest { - // Optional. User workloads Secret to override. - UserWorkloadsSecret user_workloads_secret = 1 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Delete user workloads Secret request. -message DeleteUserWorkloadsSecretRequest { - // Required. The Secret to delete, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/UserWorkloadsSecret" - } - ]; -} - -// Create user workloads ConfigMap request. -message CreateUserWorkloadsConfigMapRequest { - // Required. The environment name to create a ConfigMap for, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/Environment" - } - ]; - - // Required. User workloads ConfigMap to create. - UserWorkloadsConfigMap user_workloads_config_map = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// Get user workloads ConfigMap request. -message GetUserWorkloadsConfigMapRequest { - // Required. The resource name of the ConfigMap to get, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/UserWorkloadsConfigMap" - } - ]; -} - -// List user workloads ConfigMaps request. -message ListUserWorkloadsConfigMapsRequest { - // Required. List ConfigMaps in the given environment, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/Environment" - } - ]; - - // Optional. The maximum number of ConfigMaps to return. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous List request, - // if any. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; -} - -// Update user workloads ConfigMap request. -message UpdateUserWorkloadsConfigMapRequest { - // Optional. User workloads ConfigMap to override. - UserWorkloadsConfigMap user_workloads_config_map = 1 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Delete user workloads ConfigMap request. -message DeleteUserWorkloadsConfigMapRequest { - // Required. The ConfigMap to delete, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/UserWorkloadsConfigMap" - } - ]; -} - -// User workloads Secret used by Airflow tasks that run with Kubernetes executor -// or KubernetesPodOperator. -message UserWorkloadsSecret { - option (google.api.resource) = { - type: "composer.googleapis.com/UserWorkloadsSecret" - pattern: "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}" - plural: "userWorkloadsSecrets" - singular: "userWorkloadsSecret" - }; - - // Identifier. The resource name of the Secret, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Optional. The "data" field of Kubernetes Secret, organized in key-value - // pairs, which can contain sensitive values such as a password, a token, or a - // key. The values for all keys have to be base64-encoded strings. For details - // see: https://kubernetes.io/docs/concepts/configuration/secret/ - map data = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The user workloads Secrets for a given environment. -message ListUserWorkloadsSecretsResponse { - // The list of Secrets returned by a ListUserWorkloadsSecretsRequest. - repeated UserWorkloadsSecret user_workloads_secrets = 1; - - // The page token used to query for the next page if one exists. - string next_page_token = 2; -} - -// User workloads ConfigMap used by Airflow tasks that run with Kubernetes -// executor or KubernetesPodOperator. -message UserWorkloadsConfigMap { - option (google.api.resource) = { - type: "composer.googleapis.com/UserWorkloadsConfigMap" - pattern: "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}" - plural: "userWorkloadsConfigMaps" - singular: "userWorkloadsConfigMap" - }; - - // Identifier. The resource name of the ConfigMap, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - string name = 1 [(google.api.field_behavior) = IDENTIFIER]; - - // Optional. The "data" field of Kubernetes ConfigMap, organized in key-value - // pairs. For details see: - // https://kubernetes.io/docs/concepts/configuration/configmap/ - map data = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The user workloads ConfigMaps for a given environment. -message ListUserWorkloadsConfigMapsResponse { - // The list of ConfigMaps returned by a ListUserWorkloadsConfigMapsRequest. - repeated UserWorkloadsConfigMap user_workloads_config_maps = 1; - - // The page token used to query for the next page if one exists. - string next_page_token = 2; -} - -// Request for listing workloads in a Cloud Composer environment. -message ListWorkloadsRequest { - // Required. The environment name to get workloads for, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/Environment" - } - ]; - - // Optional. The maximum number of environments to return. - int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The next_page_token value returned from a previous List request, - // if any. - string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The list filter. - // Currently only supports equality on the type field. The value of a field - // specified in the filter expression must be one ComposerWorkloadType enum - // option. It's possible to get multiple types using "OR" operator, e.g.: - // "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are - // returned. - string filter = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response to ListWorkloadsRequest. -message ListWorkloadsResponse { - // Information about a single workload. - message ComposerWorkload { - // Name of a workload. - string name = 1; - - // Type of a workload. - ComposerWorkloadType type = 2; - - // Output only. Status of a workload. - ComposerWorkloadStatus status = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Supported workload types. - enum ComposerWorkloadType { - // Not able to determine the type of the workload. - COMPOSER_WORKLOAD_TYPE_UNSPECIFIED = 0; - - // Celery worker. - CELERY_WORKER = 1; - - // Kubernetes worker. - KUBERNETES_WORKER = 2; - - // Workload created by Kubernetes Pod Operator. - KUBERNETES_OPERATOR_POD = 3; - - // Airflow scheduler. - SCHEDULER = 4; - - // Airflow Dag processor. - DAG_PROCESSOR = 5; - - // Airflow triggerer. - TRIGGERER = 6; - - // Airflow web server UI. - WEB_SERVER = 7; - - // Redis. - REDIS = 8; - } - - // Workload status. - message ComposerWorkloadStatus { - // Output only. Workload state. - ComposerWorkloadState state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Text to provide more descriptive status. - string status_message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Detailed message of the status. - string detailed_status_message = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - } - - // Workload states. - enum ComposerWorkloadState { - // Not able to determine the status of the workload. - COMPOSER_WORKLOAD_STATE_UNSPECIFIED = 0; - - // Workload is in pending state and has not yet started. - PENDING = 1; - - // Workload is running fine. - OK = 2; - - // Workload is running but there are some non-critical problems. - WARNING = 3; - - // Workload is not running due to an error. - ERROR = 4; - - // Workload has finished execution with success. - SUCCEEDED = 5; - - // Workload has finished execution with failure. - FAILED = 6; - } - - // The list of environment workloads. - repeated ComposerWorkload workloads = 1; - - // The page token used to query for the next page if one exists. - string next_page_token = 2; -} - -// Request to create a snapshot of a Cloud Composer environment. -message SaveSnapshotRequest { - // The resource name of the source environment in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string environment = 1; - - // Location in a Cloud Storage where the snapshot is going to be stored, e.g.: - // "gs://my-bucket/snapshots". - string snapshot_location = 2; -} - -// Response to SaveSnapshotRequest. -message SaveSnapshotResponse { - // The fully-resolved Cloud Storage path of the created snapshot, - // e.g.: - // "gs://my-bucket/snapshots/project_location_environment_timestamp". - // This field is populated only if the snapshot creation was successful. - string snapshot_path = 1; -} - -// Request to load a snapshot into a Cloud Composer environment. -message LoadSnapshotRequest { - // The resource name of the target environment in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string environment = 1; - - // A Cloud Storage path to a snapshot to load, e.g.: - // "gs://my-bucket/snapshots/project_location_environment_timestamp". - string snapshot_path = 2; - - // Whether or not to skip installing Pypi packages when loading the - // environment's state. - bool skip_pypi_packages_installation = 3; - - // Whether or not to skip setting environment variables when loading the - // environment's state. - bool skip_environment_variables_setting = 4; - - // Whether or not to skip setting Airflow overrides when loading the - // environment's state. - bool skip_airflow_overrides_setting = 5; - - // Whether or not to skip copying Cloud Storage data when loading the - // environment's state. - bool skip_gcs_data_copying = 6; -} - -// Response to LoadSnapshotRequest. -message LoadSnapshotResponse {} - -// Request to trigger database failover (only for highly resilient -// environments). -message DatabaseFailoverRequest { - // Target environment: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string environment = 1; -} - -// Response for DatabaseFailoverRequest. -message DatabaseFailoverResponse {} - -// Request to fetch properties of environment's database. -message FetchDatabasePropertiesRequest { - // Required. The resource name of the environment, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string environment = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "composer.googleapis.com/Environment" - } - ]; -} - -// Response for FetchDatabasePropertiesRequest. -message FetchDatabasePropertiesResponse { - // The Compute Engine zone that the instance is currently serving from. - string primary_gce_zone = 1; - - // The Compute Engine zone that the failover instance is currently serving - // from for a regional Cloud SQL instance. - string secondary_gce_zone = 2; - - // The availability status of the failover replica. A false status indicates - // that the failover replica is out of sync. The primary instance can only - // fail over to the failover replica when the status is true. - bool is_failover_replica_available = 3; -} - -// Configuration information for an environment. -message EnvironmentConfig { - // The size of the Cloud Composer environment. - enum EnvironmentSize { - // The size of the environment is unspecified. - ENVIRONMENT_SIZE_UNSPECIFIED = 0; - - // The environment size is small. - ENVIRONMENT_SIZE_SMALL = 1; - - // The environment size is medium. - ENVIRONMENT_SIZE_MEDIUM = 2; - - // The environment size is large. - ENVIRONMENT_SIZE_LARGE = 3; - } - - // Resilience mode of the Cloud Composer Environment. - enum ResilienceMode { - // Default mode doesn't change environment parameters. - RESILIENCE_MODE_UNSPECIFIED = 0; - - // Enabled High Resilience mode, including Cloud SQL HA. - HIGH_RESILIENCE = 1; - } - - // Output only. The Kubernetes Engine cluster used to run this environment. - string gke_cluster = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The Cloud Storage prefix of the DAGs for this environment. - // Although Cloud Storage objects reside in a flat namespace, a hierarchical - // file tree can be simulated using "/"-delimited object name prefixes. DAG - // objects for this environment reside in a simulated directory with the given - // prefix. - string dag_gcs_prefix = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The number of nodes in the Kubernetes Engine cluster that will be - // used to run this environment. - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - int32 node_count = 3; - - // The configuration settings for software inside the environment. - SoftwareConfig software_config = 4; - - // The configuration used for the Kubernetes Engine cluster. - NodeConfig node_config = 5; - - // The configuration used for the Private IP Cloud Composer environment. - PrivateEnvironmentConfig private_environment_config = 7; - - // Optional. The network-level access control policy for the Airflow web - // server. If unspecified, no network-level access restrictions will be - // applied. - WebServerNetworkAccessControl web_server_network_access_control = 9 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The configuration settings for Cloud SQL instance used internally - // by Apache Airflow software. - DatabaseConfig database_config = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The configuration settings for the Airflow web server App Engine - // instance. - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - WebServerConfig web_server_config = 11 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The URI of the Apache Airflow Web UI hosted within this - // environment (see [Airflow web - // interface](/composer/docs/how-to/accessing/airflow-web-interface)). - string airflow_uri = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The 'bring your own identity' variant of the URI of the Apache - // Airflow Web UI hosted within this environment, to be accessed with external - // identities using workforce identity federation (see [Access environments - // with workforce identity - // federation](/composer/docs/composer-2/access-environments-with-workforce-identity-federation)). - string airflow_byoid_uri = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The encryption options for the Cloud Composer environment and its - // dependencies. Cannot be updated. - EncryptionConfig encryption_config = 12 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The maintenance window is the period when Cloud Composer - // components may undergo maintenance. It is defined so that maintenance is - // not executed during peak hours or critical time periods. - // - // The system will not be under maintenance for every occurrence of this - // window, but when maintenance is planned, it will be scheduled - // during the window. - // - // The maintenance window period must encompass at least 12 hours per week. - // This may be split into multiple chunks, each with a size of - // at least 4 hours. - // - // If this value is omitted, the default value for maintenance window is - // applied. By default, maintenance windows are from 00:00:00 to 04:00:00 - // (GMT) on Friday, Saturday, and Sunday every week. - MaintenanceWindow maintenance_window = 13 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The workloads configuration settings for the GKE cluster - // associated with the Cloud Composer environment. The GKE cluster runs - // Airflow scheduler, web server and workers workloads. - // - // This field is supported for Cloud Composer environments in versions - // composer-2.*.*-airflow-*.*.* and newer. - WorkloadsConfig workloads_config = 15 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The size of the Cloud Composer environment. - // - // This field is supported for Cloud Composer environments in versions - // composer-2.*.*-airflow-*.*.* and newer. - EnvironmentSize environment_size = 16 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The configuration options for GKE cluster master authorized - // networks. By default master authorized networks feature is: - // - in case of private environment: enabled with no external networks - // allowlisted. - // - in case of public environment: disabled. - MasterAuthorizedNetworksConfig master_authorized_networks_config = 17 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Recovery settings configuration of an environment. - // - // This field is supported for Cloud Composer environments in versions - // composer-2.*.*-airflow-*.*.* and newer. - RecoveryConfig recovery_config = 18 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The configuration setting for Airflow database data retention - // mechanism. - DataRetentionConfig data_retention_config = 19 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Resilience mode of the Cloud Composer Environment. - // - // This field is supported for Cloud Composer environments in versions - // composer-2.2.0-airflow-*.*.* and newer. - ResilienceMode resilience_mode = 20 [(google.api.field_behavior) = OPTIONAL]; -} - -// Network-level access control policy for the Airflow web server. -message WebServerNetworkAccessControl { - // Allowed IP range with user-provided description. - message AllowedIpRange { - // IP address or range, defined using CIDR notation, of requests that this - // rule applies to. - // Examples: `192.168.1.1` or `192.168.0.0/16` or `2001:db8::/32` - // or `2001:0db8:0000:0042:0000:8a2e:0370:7334`. - // - // IP range prefixes should be properly truncated. For example, - // `1.2.3.4/24` should be truncated to `1.2.3.0/24`. Similarly, for IPv6, - // `2001:db8::1/32` should be truncated to `2001:db8::/32`. - string value = 1; - - // Optional. User-provided description. It must contain at most 300 - // characters. - string description = 2 [(google.api.field_behavior) = OPTIONAL]; - } - - // A collection of allowed IP ranges with descriptions. - repeated AllowedIpRange allowed_ip_ranges = 1; -} - -// Specifies the selection and configuration of software inside the environment. -message SoftwareConfig { - // Web server plugins mode of the Cloud Composer environment. - enum WebServerPluginsMode { - // Default mode. - WEB_SERVER_PLUGINS_MODE_UNSPECIFIED = 0; - - // Web server plugins are not supported. - PLUGINS_DISABLED = 1; - - // Web server plugins are supported. - PLUGINS_ENABLED = 2; - } - - // The version of the software running in the environment. - // This encapsulates both the version of Cloud Composer functionality and the - // version of Apache Airflow. It must match the regular expression - // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. - // When used as input, the server also checks if the provided version is - // supported and denies the request for an unsupported version. - // - // The Cloud Composer portion of the image version is a full - // [semantic version](https://semver.org), or an alias in the form of major - // version number or `latest`. When an alias is provided, the server replaces - // it with the current Cloud Composer version that satisfies the alias. - // - // The Apache Airflow portion of the image version is a full semantic version - // that points to one of the supported Apache Airflow versions, or an alias in - // the form of only major or major.minor versions specified. When an alias is - // provided, the server replaces it with the latest Apache Airflow version - // that satisfies the alias and is supported in the given Cloud Composer - // version. - // - // In all cases, the resolved image version is stored in the same field. - // - // See also [version - // list](/composer/docs/concepts/versioning/composer-versions) and [versioning - // overview](/composer/docs/concepts/versioning/composer-versioning-overview). - string image_version = 1; - - // Optional. Apache Airflow configuration properties to override. - // - // Property keys contain the section and property names, separated by a - // hyphen, for example "core-dags_are_paused_at_creation". Section names must - // not contain hyphens ("-"), opening square brackets ("["), or closing - // square brackets ("]"). The property name must not be empty and must not - // contain an equals sign ("=") or semicolon (";"). Section and property names - // must not contain a period ("."). Apache Airflow configuration property - // names must be written in - // [snake_case](https://en.wikipedia.org/wiki/Snake_case). Property values can - // contain any character, and can be written in any lower/upper case format. - // - // Certain Apache Airflow configuration property values are - // [blocked](/composer/docs/concepts/airflow-configurations), - // and cannot be overridden. - map airflow_config_overrides = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Custom Python Package Index (PyPI) packages to be installed in - // the environment. - // - // Keys refer to the lowercase package name such as "numpy" - // and values are the lowercase extras and version specifier such as - // "==1.12.0", "[devel,gcp_api]", or "[devel]>=1.8.2, <1.9.2". To specify a - // package without pinning it to a version specifier, use the empty string as - // the value. - map pypi_packages = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Additional environment variables to provide to the Apache Airflow - // scheduler, worker, and webserver processes. - // - // Environment variable names must match the regular expression - // `[a-zA-Z_][a-zA-Z0-9_]*`. They cannot specify Apache Airflow - // software configuration overrides (they cannot match the regular expression - // `AIRFLOW__[A-Z0-9_]+__[A-Z0-9_]+`), and they cannot match any of the - // following reserved names: - // - // * `AIRFLOW_HOME` - // * `C_FORCE_ROOT` - // * `CONTAINER_NAME` - // * `DAGS_FOLDER` - // * `GCP_PROJECT` - // * `GCS_BUCKET` - // * `GKE_CLUSTER_NAME` - // * `SQL_DATABASE` - // * `SQL_INSTANCE` - // * `SQL_PASSWORD` - // * `SQL_PROJECT` - // * `SQL_REGION` - // * `SQL_USER` - map env_variables = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The major version of Python used to run the Apache Airflow - // scheduler, worker, and webserver processes. - // - // Can be set to '2' or '3'. If not specified, the default is '3'. Cannot be - // updated. - // - // This field is only supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. Environments in newer versions always use - // Python major version 3. - string python_version = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of schedulers for Airflow. - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-2.*.*. - int32 scheduler_count = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The configuration for Cloud Data Lineage integration. - CloudDataLineageIntegration cloud_data_lineage_integration = 8 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Whether or not the web server uses custom plugins. - // If unspecified, the field defaults to `PLUGINS_ENABLED`. - // - // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - WebServerPluginsMode web_server_plugins_mode = 10 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration for controlling how IPs are allocated in the -// GKE cluster. -message IPAllocationPolicy { - // Optional. Whether or not to enable Alias IPs in the GKE cluster. - // If `true`, a VPC-native cluster is created. - // - // This field is only supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. Environments in newer versions always use - // VPC-native GKE clusters. - bool use_ip_aliases = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The name of the cluster's secondary range used to allocate - // IP addresses to pods. Specify either `cluster_secondary_range_name` - // or `cluster_ipv4_cidr_block` but not both. - // - // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - // this field is applicable only when `use_ip_aliases` is true. - string cluster_secondary_range_name = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The name of the services' secondary range used to allocate - // IP addresses to the cluster. Specify either `services_secondary_range_name` - // or `services_ipv4_cidr_block` but not both. - // - // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - // this field is applicable only when `use_ip_aliases` is true. - string services_secondary_range_name = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The IP address range used to allocate IP addresses to pods in - // the cluster. - // - // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - // this field is applicable only when `use_ip_aliases` is true. - // - // Set to blank to have GKE choose a range with the default size. - // - // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific - // netmask. - // - // Set to a - // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - // to use. - // Specify `cluster_secondary_range_name` or `cluster_ipv4_cidr_block` - // but not both. - string cluster_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The IP address range of the services IP addresses in this - // cluster. - // - // For Cloud Composer environments in versions composer-1.*.*-airflow-*.*.*, - // this field is applicable only when `use_ip_aliases` is true. - // - // Set to blank to have GKE choose a range with the default size. - // - // Set to /netmask (e.g. `/14`) to have GKE choose a range with a specific - // netmask. - // - // Set to a - // [CIDR](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing) - // notation (e.g. `10.96.0.0/14`) from the RFC-1918 private networks (e.g. - // `10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`) to pick a specific range - // to use. - // Specify `services_secondary_range_name` or `services_ipv4_cidr_block` - // but not both. - string services_ipv4_cidr_block = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// The configuration information for the Kubernetes Engine nodes running -// the Apache Airflow software. -message NodeConfig { - // Optional. The Compute Engine [zone](/compute/docs/regions-zones) in which - // to deploy the VMs used to run the Apache Airflow software, specified as a - // [relative resource - // name](/apis/design/resource_names#relative_resource_name). For example: - // "projects/{projectId}/zones/{zoneId}". - // - // This `location` must belong to the enclosing environment's project and - // location. If both this field and `nodeConfig.machineType` are specified, - // `nodeConfig.machineType` must belong to this `location`; if both are - // unspecified, the service will pick a zone in the Compute Engine region - // corresponding to the Cloud Composer location, and propagate that choice to - // both fields. If only one field (`location` or `nodeConfig.machineType`) is - // specified, the location information from the specified field will be - // propagated to the unspecified field. - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - string location = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Compute Engine - // [machine type](/compute/docs/machine-types) used for cluster instances, - // specified as a - // [relative resource - // name](/apis/design/resource_names#relative_resource_name). For example: - // "projects/{projectId}/zones/{zoneId}/machineTypes/{machineTypeId}". - // - // The `machineType` must belong to the enclosing environment's project and - // location. If both this field and `nodeConfig.location` are specified, - // this `machineType` must belong to the `nodeConfig.location`; if both are - // unspecified, the service will pick a zone in the Compute Engine region - // corresponding to the Cloud Composer location, and propagate that choice to - // both fields. If exactly one of this field and `nodeConfig.location` is - // specified, the location information from the specified field will be - // propagated to the unspecified field. - // - // The `machineTypeId` must not be a [shared-core machine - // type](/compute/docs/machine-types#sharedcore). - // - // If this field is unspecified, the `machineTypeId` defaults - // to "n1-standard-1". - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - string machine_type = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Compute Engine network to be used for machine - // communications, specified as a - // [relative resource - // name](/apis/design/resource_names#relative_resource_name). For example: - // "projects/{projectId}/global/networks/{networkId}". - // - // If unspecified, the default network in the environment's project is used. - // If a [Custom Subnet Network](/vpc/docs/vpc#vpc_networks_and_subnets) - // is provided, `nodeConfig.subnetwork` must also be provided. For - // [Shared VPC](/vpc/docs/shared-vpc) subnetwork requirements, see - // `nodeConfig.subnetwork`. - string network = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Compute Engine subnetwork to be used for machine - // communications, specified as a - // [relative resource - // name](/apis/design/resource_names#relative_resource_name). For example: - // "projects/{projectId}/regions/{regionId}/subnetworks/{subnetworkId}" - // - // If a subnetwork is provided, `nodeConfig.network` must also be provided, - // and the subnetwork must belong to the enclosing environment's project and - // location. - string subnetwork = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The disk size in GB used for node VMs. Minimum size is 30GB. - // If unspecified, defaults to 100GB. Cannot be updated. - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - int32 disk_size_gb = 5 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The set of Google API scopes to be made available on all - // node VMs. If `oauth_scopes` is empty, defaults to - // ["https://www.googleapis.com/auth/cloud-platform"]. Cannot be updated. - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - repeated string oauth_scopes = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Google Cloud Platform Service Account to be used by the - // workloads. If a service account is not specified, the "default" Compute - // Engine service account is used. Cannot be updated. - string service_account = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The list of instance tags applied to all node VMs. Tags are used - // to identify valid sources or targets for network firewalls. Each tag within - // the list must comply with [RFC1035](https://www.ietf.org/rfc/rfc1035.txt). - // Cannot be updated. - repeated string tags = 8 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The IPAllocationPolicy fields for the GKE cluster. - IPAllocationPolicy ip_allocation_policy = 9 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The maximum number of pods per node in the Cloud Composer GKE - // cluster. The value must be between 8 and 110 and it can be set only if the - // environment is VPC-native. The default value is 32. Values of this field - // will be propagated both to the `default-pool` node pool of the newly - // created GKE cluster, and to the default "Maximum Pods per Node" value which - // is used for newly created node pools if their value is not explicitly set - // during node pool creation. For more information, see [Optimizing IP address - // allocation] - // (https://cloud.google.com/kubernetes-engine/docs/how-to/flexible-pod-cidr). - // Cannot be updated. - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - int32 max_pods_per_node = 10 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Deploys 'ip-masq-agent' daemon set in the GKE cluster and defines - // nonMasqueradeCIDRs equals to pod IP range so IP masquerading is used for - // all destination addresses, except between pods traffic. - // - // See: - // https://cloud.google.com/kubernetes-engine/docs/how-to/ip-masquerade-agent - bool enable_ip_masq_agent = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Network Attachment that Cloud Composer environment is connected - // to, which provides connectivity with a user's VPC network. Takes precedence - // over network and subnetwork settings. If not provided, but network and - // subnetwork are defined during environment, it will be provisioned. If not - // provided and network and subnetwork are also empty, then connectivity to - // user's VPC network is disabled. Network attachment must be provided in - // format - // projects/{project}/regions/{region}/networkAttachments/{networkAttachment}. - // - // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - string composer_network_attachment = 12 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The IP range in CIDR notation to use internally by Cloud - // Composer. IP addresses are not reserved - and the same range can be used by - // multiple Cloud Composer environments. In case of overlap, IPs from this - // range will not be accessible in the user's VPC network. Cannot be updated. - // If not specified, the default value of '100.64.128.0/20' is used. - // - // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - string composer_internal_ipv4_cidr_block = 13 - [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration options for the private GKE cluster in a Cloud Composer -// environment. -message PrivateClusterConfig { - // Optional. If `true`, access to the public endpoint of the GKE cluster is - // denied. - bool enable_private_endpoint = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The CIDR block from which IPv4 range for GKE master will be - // reserved. If left blank, the default value of '172.16.0.0/23' is used. - string master_ipv4_cidr_block = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The IP range in CIDR notation to use for the hosted master - // network. This range is used for assigning internal IP addresses to the - // cluster master or set of masters and to the internal load balancer virtual - // IP. This range must not overlap with any other ranges in use within the - // cluster's network. - string master_ipv4_reserved_range = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// Configuration options for networking connections in the Composer 2 -// environment. -message NetworkingConfig { - // Represents connection type between Composer environment in Customer - // Project and the corresponding Tenant project, from a predefined list - // of available connection modes. - enum ConnectionType { - // No specific connection type was requested, so the environment uses - // the default value corresponding to the rest of its configuration. - CONNECTION_TYPE_UNSPECIFIED = 0; - - // Requests the use of VPC peerings for connecting the Customer and Tenant - // projects. - VPC_PEERING = 1; - - // Requests the use of Private Service Connect for connecting the Customer - // and Tenant projects. - PRIVATE_SERVICE_CONNECT = 2; - } - - // Optional. Indicates the user requested specifc connection type between - // Tenant and Customer projects. You cannot set networking connection type in - // public IP environment. - ConnectionType connection_type = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// The configuration information for configuring a Private IP Cloud Composer -// environment. -message PrivateEnvironmentConfig { - // Optional. If `true`, a Private IP Cloud Composer environment is created. - // If this field is set to true, `IPAllocationPolicy.use_ip_aliases` must be - // set to true for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - bool enable_private_environment = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If `true`, builds performed during operations that install Python - // packages have only private connectivity to Google services (including - // Artifact Registry) and VPC network (if either `NodeConfig.network` and - // `NodeConfig.subnetwork` fields or `NodeConfig.composer_network_attachment` - // field are specified). If `false`, the builds also have access to the - // internet. - // - // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - bool enable_private_builds_only = 11 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration for the private GKE cluster for a Private IP - // Cloud Composer environment. - PrivateClusterConfig private_cluster_config = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The CIDR block from which IP range for web server will be - // reserved. Needs to be disjoint from - // private_cluster_config.master_ipv4_cidr_block and - // cloud_sql_ipv4_cidr_block. - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - string web_server_ipv4_cidr_block = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The CIDR block from which IP range in tenant project will be - // reserved for Cloud SQL. Needs to be disjoint from - // web_server_ipv4_cidr_block - string cloud_sql_ipv4_cidr_block = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The IP range reserved for the tenant project's App Engine VMs. - // - // This field is supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - string web_server_ipv4_reserved_range = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. The CIDR block from which IP range for Cloud Composer Network in - // tenant project will be reserved. Needs to be disjoint from - // private_cluster_config.master_ipv4_cidr_block and - // cloud_sql_ipv4_cidr_block. - // - // This field is supported for Cloud Composer environments in versions - // composer-2.*.*-airflow-*.*.* and newer. - string cloud_composer_network_ipv4_cidr_block = 7 - [(google.api.field_behavior) = OPTIONAL]; - - // Output only. The IP range reserved for the tenant project's Cloud Composer - // network. - // - // This field is supported for Cloud Composer environments in versions - // composer-2.*.*-airflow-*.*.* and newer. - string cloud_composer_network_ipv4_reserved_range = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. When enabled, IPs from public (non-RFC1918) ranges can be used - // for `IPAllocationPolicy.cluster_ipv4_cidr_block` and - // `IPAllocationPolicy.service_ipv4_cidr_block`. - bool enable_privately_used_public_ips = 6 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. When specified, the environment will use Private Service Connect - // instead of VPC peerings to connect to Cloud SQL in the Tenant Project, - // and the PSC endpoint in the Customer Project will use an IP address from - // this subnetwork. - string cloud_composer_connection_subnetwork = 9 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Configuration for the network connections configuration in the - // environment. - NetworkingConfig networking_config = 10 - [(google.api.field_behavior) = OPTIONAL]; -} - -// The configuration of Cloud SQL instance that is used by the Apache Airflow -// software. -message DatabaseConfig { - // Optional. Cloud SQL machine type used by Airflow database. - // It has to be one of: db-n1-standard-2, db-n1-standard-4, db-n1-standard-8 - // or db-n1-standard-16. If not specified, db-n1-standard-2 will be used. - // Supported for Cloud Composer environments in versions - // composer-1.*.*-airflow-*.*.*. - string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Compute Engine zone where the Airflow database is created. If - // zone is provided, it must be in the region selected for the environment. If - // zone is not provided, a zone is automatically selected. The zone can only - // be set during environment creation. Supported for Cloud Composer - // environments in versions composer-2.*.*-airflow-*.*.*. - string zone = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The configuration settings for the Airflow web server App Engine instance. -// Supported for Cloud Composer environments in versions -// composer-1.*.*-airflow-*.*.*. -message WebServerConfig { - // Optional. Machine type on which Airflow web server is running. - // It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 or - // composer-n1-webserver-8. - // If not specified, composer-n1-webserver-2 will be used. - // Value custom is returned only in response, if Airflow web server parameters - // were manually changed to a non-standard values. - string machine_type = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// The encryption options for the Cloud Composer environment and its -// dependencies. Supported for Cloud Composer environments in versions -// composer-1.*.*-airflow-*.*.*. -message EncryptionConfig { - // Optional. Customer-managed Encryption Key available through Google's Key - // Management Service. Cannot be updated. If not specified, Google-managed key - // will be used. - string kms_key_name = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// The configuration settings for Cloud Composer maintenance window. -// The following example: -// -// ``` -// { -// "startTime":"2019-08-01T01:00:00Z" -// "endTime":"2019-08-01T07:00:00Z" -// "recurrence":"FREQ=WEEKLY;BYDAY=TU,WE" -// } -// ``` -// -// would define a maintenance window between 01 and 07 hours UTC during -// each Tuesday and Wednesday. -message MaintenanceWindow { - // Required. Start time of the first recurrence of the maintenance window. - google.protobuf.Timestamp start_time = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Maintenance window end time. It is used only to calculate the - // duration of the maintenance window. The value for end_time must be in the - // future, relative to `start_time`. - google.protobuf.Timestamp end_time = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Required. Maintenance window recurrence. Format is a subset of - // [RFC-5545](https://tools.ietf.org/html/rfc5545) `RRULE`. The only allowed - // values for `FREQ` field are `FREQ=DAILY` and `FREQ=WEEKLY;BYDAY=...` - // Example values: `FREQ=WEEKLY;BYDAY=TU,WE`, `FREQ=DAILY`. - string recurrence = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The Kubernetes workloads configuration for GKE cluster associated with the -// Cloud Composer environment. Supported for Cloud Composer environments in -// versions composer-2.*.*-airflow-*.*.* and newer. -message WorkloadsConfig { - // Configuration for resources used by Airflow schedulers. - message SchedulerResource { - // Optional. CPU request and limit for a single Airflow scheduler replica. - float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Memory (GB) request and limit for a single Airflow scheduler - // replica. - float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Storage (GB) request and limit for a single Airflow scheduler - // replica. - float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of schedulers. - int32 count = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // Configuration for resources used by Airflow web server. - message WebServerResource { - // Optional. CPU request and limit for Airflow web server. - float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Memory (GB) request and limit for Airflow web server. - float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Storage (GB) request and limit for Airflow web server. - float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // Configuration for resources used by Airflow workers. - message WorkerResource { - // Optional. CPU request and limit for a single Airflow worker replica. - float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Memory (GB) request and limit for a single Airflow worker - // replica. - float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Storage (GB) request and limit for a single Airflow worker - // replica. - float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Minimum number of workers for autoscaling. - int32 min_count = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Maximum number of workers for autoscaling. - int32 max_count = 5 [(google.api.field_behavior) = OPTIONAL]; - } - - // Configuration for resources used by Airflow triggerers. - message TriggererResource { - // Optional. The number of triggerers. - int32 count = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. CPU request and limit for a single Airflow triggerer replica. - float cpu = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Memory (GB) request and limit for a single Airflow triggerer - // replica. - float memory_gb = 3 [(google.api.field_behavior) = OPTIONAL]; - } - - // Configuration for resources used by Airflow DAG processors. - // - // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - message DagProcessorResource { - // Optional. CPU request and limit for a single Airflow DAG processor - // replica. - float cpu = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Memory (GB) request and limit for a single Airflow DAG - // processor replica. - float memory_gb = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Storage (GB) request and limit for a single Airflow DAG - // processor replica. - float storage_gb = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The number of DAG processors. If not provided or set to 0, a - // single DAG processor instance will be created. - int32 count = 4 [(google.api.field_behavior) = OPTIONAL]; - } - - // Optional. Resources used by Airflow schedulers. - SchedulerResource scheduler = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Resources used by Airflow web server. - WebServerResource web_server = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Resources used by Airflow workers. - WorkerResource worker = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Resources used by Airflow triggerers. - TriggererResource triggerer = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Resources used by Airflow DAG processors. - // - // This field is supported for Cloud Composer environments in versions - // composer-3.*.*-airflow-*.*.* and newer. - DagProcessorResource dag_processor = 5 - [(google.api.field_behavior) = OPTIONAL]; -} - -// The configuration setting for Airflow database data retention mechanism. -message DataRetentionConfig { - // Optional. The number of days describing for how long to store event-based - // records in airflow database. If the retention mechanism is enabled this - // value must be a positive integer otherwise, value should be set to 0. - int32 airflow_database_retention_days = 1 - [deprecated = true, (google.api.field_behavior) = OPTIONAL]; - - // Optional. The configuration settings for task logs retention - TaskLogsRetentionConfig task_logs_retention_config = 4 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The retention policy for airflow metadata database. - AirflowMetadataRetentionPolicyConfig airflow_metadata_retention_config = 5 - [(google.api.field_behavior) = OPTIONAL]; -} - -// The configuration setting for Task Logs. -message TaskLogsRetentionConfig { - // The definition of task_logs_storage_mode. - enum TaskLogsStorageMode { - // This configuration is not specified by the user. - TASK_LOGS_STORAGE_MODE_UNSPECIFIED = 0; - - // Store task logs in Cloud Logging and in the environment's Cloud Storage - // bucket. - CLOUD_LOGGING_AND_CLOUD_STORAGE = 1; - - // Store task logs in Cloud Logging only. - CLOUD_LOGGING_ONLY = 2; - } - - // Optional. The mode of storage for Airflow workers task logs. - TaskLogsStorageMode storage_mode = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The policy for airflow metadata database retention. -message AirflowMetadataRetentionPolicyConfig { - // Describes retention policy. - enum RetentionMode { - // Default mode doesn't change environment parameters. - RETENTION_MODE_UNSPECIFIED = 0; - - // Retention policy is enabled. - RETENTION_MODE_ENABLED = 1; - - // Retention policy is disabled. - RETENTION_MODE_DISABLED = 2; - } - - // Optional. Retention can be either enabled or disabled. - RetentionMode retention_mode = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. How many days data should be retained for. - int32 retention_days = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// The configuration for data storage in the environment. -message StorageConfig { - // Optional. The name of the Cloud Storage bucket used by the environment. No - // `gs://` prefix. - string bucket = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// The Recovery settings of an environment. -message RecoveryConfig { - // Optional. The configuration for scheduled snapshot creation mechanism. - ScheduledSnapshotsConfig scheduled_snapshots_config = 1 - [(google.api.field_behavior) = OPTIONAL]; -} - -// The configuration for scheduled snapshot creation mechanism. -message ScheduledSnapshotsConfig { - // Optional. Whether scheduled snapshots creation is enabled. - bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The Cloud Storage location for storing automatically created - // snapshots. - string snapshot_location = 6 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The cron expression representing the time when snapshots creation - // mechanism runs. This field is subject to additional validation around - // frequency of execution. - string snapshot_creation_schedule = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Time zone that sets the context to interpret - // snapshot_creation_schedule. - string time_zone = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Configuration options for the master authorized networks feature. Enabled -// master authorized networks will disallow all external traffic to access -// Kubernetes master through HTTPS except traffic from the given CIDR blocks, -// Google Compute Engine Public IPs and Google Prod IPs. -message MasterAuthorizedNetworksConfig { - // CIDR block with an optional name. - message CidrBlock { - // User-defined name that identifies the CIDR block. - string display_name = 1; - - // CIDR block that must be specified in CIDR notation. - string cidr_block = 2; - } - - // Whether or not master authorized networks feature is enabled. - bool enabled = 1; - - // Up to 50 external networks that could access Kubernetes master through - // HTTPS. - repeated CidrBlock cidr_blocks = 2; -} - -// Configuration for Cloud Data Lineage integration. -message CloudDataLineageIntegration { - // Optional. Whether or not Cloud Data Lineage integration is enabled. - bool enabled = 1 [(google.api.field_behavior) = OPTIONAL]; -} - -// An environment for running orchestration tasks. -message Environment { - option (google.api.resource) = { - type: "composer.googleapis.com/Environment" - pattern: "projects/{project}/locations/{location}/environments/{environment}" - }; - - // State of the environment. - enum State { - // The state of the environment is unknown. - STATE_UNSPECIFIED = 0; - - // The environment is in the process of being created. - CREATING = 1; - - // The environment is currently running and healthy. It is ready for use. - RUNNING = 2; - - // The environment is being updated. It remains usable but cannot receive - // additional update requests or be deleted at this time. - UPDATING = 3; - - // The environment is undergoing deletion. It cannot be used. - DELETING = 4; - - // The environment has encountered an error and cannot be used. - ERROR = 5; - } - - // The resource name of the environment, in the form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - // - // EnvironmentId must start with a lowercase letter followed by up to 63 - // lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - string name = 1; - - // Configuration parameters for this environment. - EnvironmentConfig config = 2; - - // Output only. The UUID (Universally Unique IDentifier) associated with this - // environment. This value is generated when the environment is created. - string uuid = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The current state of the environment. - State state = 4; - - // Output only. The time at which this environment was created. - google.protobuf.Timestamp create_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The time at which this environment was last modified. - google.protobuf.Timestamp update_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. User-defined labels for this environment. - // The labels map can contain no more than 64 entries. Entries of the labels - // map are UTF8 strings that comply with the following restrictions: - // - // * Keys must conform to regexp: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}_-]{0,62} - // * Values must conform to regexp: [\p{Ll}\p{Lo}\p{N}_-]{0,63} - // * Both keys and values are additionally constrained to be <= 128 bytes in - // size. - map labels = 7 [(google.api.field_behavior) = OPTIONAL]; - - // Output only. Reserved for future use. - bool satisfies_pzs = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Reserved for future use. - bool satisfies_pzi = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Optional. Storage configuration for this environment. - StorageConfig storage_config = 9 [(google.api.field_behavior) = OPTIONAL]; -} - -// Request to check whether image upgrade will succeed. -message CheckUpgradeRequest { - // The resource name of the environment to check upgrade for, in the - // form: - // "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - string environment = 1; - - // The version of the software running in the environment. - // This encapsulates both the version of Cloud Composer functionality and the - // version of Apache Airflow. It must match the regular expression - // `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. - // When used as input, the server also checks if the provided version is - // supported and denies the request for an unsupported version. - // - // The Cloud Composer portion of the image version is a full - // [semantic version](https://semver.org), or an alias in the form of major - // version number or `latest`. When an alias is provided, the server replaces - // it with the current Cloud Composer version that satisfies the alias. - // - // The Apache Airflow portion of the image version is a full semantic version - // that points to one of the supported Apache Airflow versions, or an alias in - // the form of only major or major.minor versions specified. When an alias is - // provided, the server replaces it with the latest Apache Airflow version - // that satisfies the alias and is supported in the given Cloud Composer - // version. - // - // In all cases, the resolved image version is stored in the same field. - // - // See also [version - // list](/composer/docs/concepts/versioning/composer-versions) and [versioning - // overview](/composer/docs/concepts/versioning/composer-versioning-overview). - string image_version = 2; -} - -// Message containing information about the result of an upgrade check -// operation. -message CheckUpgradeResponse { - // Whether there were python modules conflict during image build. - enum ConflictResult { - // It is unknown whether build had conflicts or not. - CONFLICT_RESULT_UNSPECIFIED = 0; - - // There were python packages conflicts. - CONFLICT = 1; - - // There were no python packages conflicts. - NO_CONFLICT = 2; - } - - // Output only. Url for a docker build log of an upgraded image. - string build_log_uri = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Whether build has succeeded or failed on modules conflicts. - ConflictResult contains_pypi_modules_conflict = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Extract from a docker image build log containing information - // about pypi modules conflicts. - string pypi_conflict_build_log_extract = 3 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Composer image for which the build was happening. - string image_version = 5; - - // Pypi dependencies specified in the environment configuration, at the time - // when the build was triggered. - map pypi_dependencies = 6; -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto deleted file mode 100644 index 9863ed91fbf..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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.orchestration.airflow.service.v1beta1; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/type/date.proto"; - -option go_package = "cloud.google.com/go/orchestration/airflow/service/apiv1beta1/servicepb;servicepb"; -option java_multiple_files = true; -option java_package = "com.google.cloud.orchestration.airflow.service.v1beta1"; - -// Readonly service to query available ImageVersions. -service ImageVersions { - option (google.api.default_host) = "composer.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // List ImageVersions for provided location. - rpc ListImageVersions(ListImageVersionsRequest) - returns (ListImageVersionsResponse) { - option (google.api.http) = { - get: "/v1beta1/{parent=projects/*/locations/*}/imageVersions" - }; - option (google.api.method_signature) = "parent"; - } -} - -// List ImageVersions in a project and location. -message ListImageVersionsRequest { - // List ImageVersions in the given project and location, in the form: - // "projects/{projectId}/locations/{locationId}" - string parent = 1; - - // The maximum number of image_versions to return. - int32 page_size = 2; - - // The next_page_token value returned from a previous List request, if any. - string page_token = 3; - - // Whether or not image versions from old releases should be included. - bool include_past_releases = 4; -} - -// The ImageVersions in a project and location. -message ListImageVersionsResponse { - // The list of supported ImageVersions in a location. - repeated ImageVersion image_versions = 1; - - // The page token used to query for the next page if one exists. - string next_page_token = 2; -} - -// Image Version information -message ImageVersion { - // The string identifier of the ImageVersion, in the form: - // "composer-x.y.z-airflow-a.b.c" - string image_version_id = 1; - - // Whether this is the default ImageVersion used by Composer during - // environment creation if no input ImageVersion is specified. - bool is_default = 2; - - // supported python versions - repeated string supported_python_versions = 3; - - // The date of the version release. - google.type.Date release_date = 4; - - // Whether it is impossible to create an environment with the image version. - bool creation_disabled = 5; - - // Whether it is impossible to upgrade an environment running with the image - // version. - bool upgrade_disabled = 6; -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto deleted file mode 100644 index baf41d297f8..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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.orchestration.airflow.service.v1beta1; - -import "google/protobuf/timestamp.proto"; - -option go_package = "cloud.google.com/go/orchestration/airflow/service/apiv1beta1/servicepb;servicepb"; -option java_multiple_files = true; -option java_outer_classname = "OperationsProto"; -option java_package = "com.google.cloud.orchestration.airflow.service.v1beta1"; - -// Metadata describing an operation. -message OperationMetadata { - // An enum describing the overall state of an operation. - enum State { - // Unused. - STATE_UNSPECIFIED = 0; - - // The operation has been created but is not yet started. - PENDING = 1; - - // The operation is underway. - RUNNING = 2; - - // The operation completed successfully. - SUCCESSFUL = 3; - - // The operation is no longer running but did not succeed. - FAILED = 4; - } - - // Type of longrunning operation. - enum Type { - // Unused. - TYPE_UNSPECIFIED = 0; - - // A resource creation operation. - CREATE = 1; - - // A resource deletion operation. - DELETE = 2; - - // A resource update operation. - UPDATE = 3; - - // A resource check operation. - CHECK = 4; - - // Saves snapshot of the resource operation. - SAVE_SNAPSHOT = 5; - - // Loads snapshot of the resource operation. - LOAD_SNAPSHOT = 6; - - // Triggers failover of environment's Cloud SQL instance (only for highly - // resilient environments). - DATABASE_FAILOVER = 7; - } - - // Output only. The current operation state. - State state = 1; - - // Output only. The type of operation being performed. - Type operation_type = 2; - - // Output only. The resource being operated on, as a [relative resource name]( - // /apis/design/resource_names#relative_resource_name). - string resource = 3; - - // Output only. The UUID of the resource being operated on. - string resource_uuid = 4; - - // Output only. The time the operation was submitted to the server. - google.protobuf.Timestamp create_time = 5; - - // Output only. The time when the operation terminated, regardless of its - // success. This field is unset if the operation is still ongoing. - google.protobuf.Timestamp end_time = 6; -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.d.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.d.ts deleted file mode 100644 index ba46357fce3..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.d.ts +++ /dev/null @@ -1,17037 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 orchestration. */ - namespace orchestration { - - /** Namespace airflow. */ - namespace airflow { - - /** Namespace service. */ - namespace service { - - /** Namespace v1beta1. */ - namespace v1beta1 { - - /** Represents an Environments */ - class Environments extends $protobuf.rpc.Service { - - /** - * Constructs a new Environments 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 Environments 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): Environments; - - /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public createEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateEnvironmentCallback): void; - - /** - * Calls CreateEnvironment. - * @param request CreateEnvironmentRequest message or plain object - * @returns Promise - */ - public createEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest): Promise; - - /** - * Calls GetEnvironment. - * @param request GetEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Environment - */ - public getEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.GetEnvironmentCallback): void; - - /** - * Calls GetEnvironment. - * @param request GetEnvironmentRequest message or plain object - * @returns Promise - */ - public getEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest): Promise; - - /** - * Calls ListEnvironments. - * @param request ListEnvironmentsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListEnvironmentsResponse - */ - public listEnvironments(request: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.ListEnvironmentsCallback): void; - - /** - * Calls ListEnvironments. - * @param request ListEnvironmentsRequest message or plain object - * @returns Promise - */ - public listEnvironments(request: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest): Promise; - - /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public updateEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateEnvironmentCallback): void; - - /** - * Calls UpdateEnvironment. - * @param request UpdateEnvironmentRequest message or plain object - * @returns Promise - */ - public updateEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest): Promise; - - /** - * Calls DeleteEnvironment. - * @param request DeleteEnvironmentRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public deleteEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteEnvironmentCallback): void; - - /** - * Calls DeleteEnvironment. - * @param request DeleteEnvironmentRequest message or plain object - * @returns Promise - */ - public deleteEnvironment(request: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest): Promise; - - /** - * Calls RestartWebServer. - * @param request RestartWebServerRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public restartWebServer(request: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.RestartWebServerCallback): void; - - /** - * Calls RestartWebServer. - * @param request RestartWebServerRequest message or plain object - * @returns Promise - */ - public restartWebServer(request: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest): Promise; - - /** - * Calls CheckUpgrade. - * @param request CheckUpgradeRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public checkUpgrade(request: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.CheckUpgradeCallback): void; - - /** - * Calls CheckUpgrade. - * @param request CheckUpgradeRequest message or plain object - * @returns Promise - */ - public checkUpgrade(request: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest): Promise; - - /** - * Calls ExecuteAirflowCommand. - * @param request ExecuteAirflowCommandRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ExecuteAirflowCommandResponse - */ - public executeAirflowCommand(request: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.ExecuteAirflowCommandCallback): void; - - /** - * Calls ExecuteAirflowCommand. - * @param request ExecuteAirflowCommandRequest message or plain object - * @returns Promise - */ - public executeAirflowCommand(request: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest): Promise; - - /** - * Calls StopAirflowCommand. - * @param request StopAirflowCommandRequest message or plain object - * @param callback Node-style callback called with the error, if any, and StopAirflowCommandResponse - */ - public stopAirflowCommand(request: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.StopAirflowCommandCallback): void; - - /** - * Calls StopAirflowCommand. - * @param request StopAirflowCommandRequest message or plain object - * @returns Promise - */ - public stopAirflowCommand(request: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest): Promise; - - /** - * Calls PollAirflowCommand. - * @param request PollAirflowCommandRequest message or plain object - * @param callback Node-style callback called with the error, if any, and PollAirflowCommandResponse - */ - public pollAirflowCommand(request: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.PollAirflowCommandCallback): void; - - /** - * Calls PollAirflowCommand. - * @param request PollAirflowCommandRequest message or plain object - * @returns Promise - */ - public pollAirflowCommand(request: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest): Promise; - - /** - * Calls ListWorkloads. - * @param request ListWorkloadsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListWorkloadsResponse - */ - public listWorkloads(request: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.ListWorkloadsCallback): void; - - /** - * Calls ListWorkloads. - * @param request ListWorkloadsRequest message or plain object - * @returns Promise - */ - public listWorkloads(request: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest): Promise; - - /** - * Calls CreateUserWorkloadsSecret. - * @param request CreateUserWorkloadsSecretRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserWorkloadsSecret - */ - public createUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateUserWorkloadsSecretCallback): void; - - /** - * Calls CreateUserWorkloadsSecret. - * @param request CreateUserWorkloadsSecretRequest message or plain object - * @returns Promise - */ - public createUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest): Promise; - - /** - * Calls GetUserWorkloadsSecret. - * @param request GetUserWorkloadsSecretRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserWorkloadsSecret - */ - public getUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.GetUserWorkloadsSecretCallback): void; - - /** - * Calls GetUserWorkloadsSecret. - * @param request GetUserWorkloadsSecretRequest message or plain object - * @returns Promise - */ - public getUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest): Promise; - - /** - * Calls ListUserWorkloadsSecrets. - * @param request ListUserWorkloadsSecretsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListUserWorkloadsSecretsResponse - */ - public listUserWorkloadsSecrets(request: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.ListUserWorkloadsSecretsCallback): void; - - /** - * Calls ListUserWorkloadsSecrets. - * @param request ListUserWorkloadsSecretsRequest message or plain object - * @returns Promise - */ - public listUserWorkloadsSecrets(request: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest): Promise; - - /** - * Calls UpdateUserWorkloadsSecret. - * @param request UpdateUserWorkloadsSecretRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserWorkloadsSecret - */ - public updateUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateUserWorkloadsSecretCallback): void; - - /** - * Calls UpdateUserWorkloadsSecret. - * @param request UpdateUserWorkloadsSecretRequest message or plain object - * @returns Promise - */ - public updateUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest): Promise; - - /** - * Calls DeleteUserWorkloadsSecret. - * @param request DeleteUserWorkloadsSecretRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteUserWorkloadsSecretCallback): void; - - /** - * Calls DeleteUserWorkloadsSecret. - * @param request DeleteUserWorkloadsSecretRequest message or plain object - * @returns Promise - */ - public deleteUserWorkloadsSecret(request: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest): Promise; - - /** - * Calls CreateUserWorkloadsConfigMap. - * @param request CreateUserWorkloadsConfigMapRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap - */ - public createUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateUserWorkloadsConfigMapCallback): void; - - /** - * Calls CreateUserWorkloadsConfigMap. - * @param request CreateUserWorkloadsConfigMapRequest message or plain object - * @returns Promise - */ - public createUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest): Promise; - - /** - * Calls GetUserWorkloadsConfigMap. - * @param request GetUserWorkloadsConfigMapRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap - */ - public getUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.GetUserWorkloadsConfigMapCallback): void; - - /** - * Calls GetUserWorkloadsConfigMap. - * @param request GetUserWorkloadsConfigMapRequest message or plain object - * @returns Promise - */ - public getUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest): Promise; - - /** - * Calls ListUserWorkloadsConfigMaps. - * @param request ListUserWorkloadsConfigMapsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListUserWorkloadsConfigMapsResponse - */ - public listUserWorkloadsConfigMaps(request: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.ListUserWorkloadsConfigMapsCallback): void; - - /** - * Calls ListUserWorkloadsConfigMaps. - * @param request ListUserWorkloadsConfigMapsRequest message or plain object - * @returns Promise - */ - public listUserWorkloadsConfigMaps(request: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest): Promise; - - /** - * Calls UpdateUserWorkloadsConfigMap. - * @param request UpdateUserWorkloadsConfigMapRequest message or plain object - * @param callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap - */ - public updateUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateUserWorkloadsConfigMapCallback): void; - - /** - * Calls UpdateUserWorkloadsConfigMap. - * @param request UpdateUserWorkloadsConfigMapRequest message or plain object - * @returns Promise - */ - public updateUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest): Promise; - - /** - * Calls DeleteUserWorkloadsConfigMap. - * @param request DeleteUserWorkloadsConfigMapRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteUserWorkloadsConfigMapCallback): void; - - /** - * Calls DeleteUserWorkloadsConfigMap. - * @param request DeleteUserWorkloadsConfigMapRequest message or plain object - * @returns Promise - */ - public deleteUserWorkloadsConfigMap(request: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest): Promise; - - /** - * Calls SaveSnapshot. - * @param request SaveSnapshotRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public saveSnapshot(request: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.SaveSnapshotCallback): void; - - /** - * Calls SaveSnapshot. - * @param request SaveSnapshotRequest message or plain object - * @returns Promise - */ - public saveSnapshot(request: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest): Promise; - - /** - * Calls LoadSnapshot. - * @param request LoadSnapshotRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public loadSnapshot(request: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.LoadSnapshotCallback): void; - - /** - * Calls LoadSnapshot. - * @param request LoadSnapshotRequest message or plain object - * @returns Promise - */ - public loadSnapshot(request: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest): Promise; - - /** - * Calls DatabaseFailover. - * @param request DatabaseFailoverRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation - */ - public databaseFailover(request: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.DatabaseFailoverCallback): void; - - /** - * Calls DatabaseFailover. - * @param request DatabaseFailoverRequest message or plain object - * @returns Promise - */ - public databaseFailover(request: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest): Promise; - - /** - * Calls FetchDatabaseProperties. - * @param request FetchDatabasePropertiesRequest message or plain object - * @param callback Node-style callback called with the error, if any, and FetchDatabasePropertiesResponse - */ - public fetchDatabaseProperties(request: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.Environments.FetchDatabasePropertiesCallback): void; - - /** - * Calls FetchDatabaseProperties. - * @param request FetchDatabasePropertiesRequest message or plain object - * @returns Promise - */ - public fetchDatabaseProperties(request: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest): Promise; - } - - namespace Environments { - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|createEnvironment}. - * @param error Error, if any - * @param [response] Operation - */ - type CreateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|getEnvironment}. - * @param error Error, if any - * @param [response] Environment - */ - type GetEnvironmentCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.Environment) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listEnvironments}. - * @param error Error, if any - * @param [response] ListEnvironmentsResponse - */ - type ListEnvironmentsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|updateEnvironment}. - * @param error Error, if any - * @param [response] Operation - */ - type UpdateEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|deleteEnvironment}. - * @param error Error, if any - * @param [response] Operation - */ - type DeleteEnvironmentCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|restartWebServer}. - * @param error Error, if any - * @param [response] Operation - */ - type RestartWebServerCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|checkUpgrade}. - * @param error Error, if any - * @param [response] Operation - */ - type CheckUpgradeCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|executeAirflowCommand}. - * @param error Error, if any - * @param [response] ExecuteAirflowCommandResponse - */ - type ExecuteAirflowCommandCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|stopAirflowCommand}. - * @param error Error, if any - * @param [response] StopAirflowCommandResponse - */ - type StopAirflowCommandCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|pollAirflowCommand}. - * @param error Error, if any - * @param [response] PollAirflowCommandResponse - */ - type PollAirflowCommandCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listWorkloads}. - * @param error Error, if any - * @param [response] ListWorkloadsResponse - */ - type ListWorkloadsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|createUserWorkloadsSecret}. - * @param error Error, if any - * @param [response] UserWorkloadsSecret - */ - type CreateUserWorkloadsSecretCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|getUserWorkloadsSecret}. - * @param error Error, if any - * @param [response] UserWorkloadsSecret - */ - type GetUserWorkloadsSecretCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listUserWorkloadsSecrets}. - * @param error Error, if any - * @param [response] ListUserWorkloadsSecretsResponse - */ - type ListUserWorkloadsSecretsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|updateUserWorkloadsSecret}. - * @param error Error, if any - * @param [response] UserWorkloadsSecret - */ - type UpdateUserWorkloadsSecretCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|deleteUserWorkloadsSecret}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteUserWorkloadsSecretCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|createUserWorkloadsConfigMap}. - * @param error Error, if any - * @param [response] UserWorkloadsConfigMap - */ - type CreateUserWorkloadsConfigMapCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|getUserWorkloadsConfigMap}. - * @param error Error, if any - * @param [response] UserWorkloadsConfigMap - */ - type GetUserWorkloadsConfigMapCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listUserWorkloadsConfigMaps}. - * @param error Error, if any - * @param [response] ListUserWorkloadsConfigMapsResponse - */ - type ListUserWorkloadsConfigMapsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|updateUserWorkloadsConfigMap}. - * @param error Error, if any - * @param [response] UserWorkloadsConfigMap - */ - type UpdateUserWorkloadsConfigMapCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|deleteUserWorkloadsConfigMap}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteUserWorkloadsConfigMapCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|saveSnapshot}. - * @param error Error, if any - * @param [response] Operation - */ - type SaveSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|loadSnapshot}. - * @param error Error, if any - * @param [response] Operation - */ - type LoadSnapshotCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|databaseFailover}. - * @param error Error, if any - * @param [response] Operation - */ - type DatabaseFailoverCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|fetchDatabaseProperties}. - * @param error Error, if any - * @param [response] FetchDatabasePropertiesResponse - */ - type FetchDatabasePropertiesCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse) => void; - } - - /** Properties of a CreateEnvironmentRequest. */ - interface ICreateEnvironmentRequest { - - /** CreateEnvironmentRequest parent */ - parent?: (string|null); - - /** CreateEnvironmentRequest environment */ - environment?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null); - } - - /** Represents a CreateEnvironmentRequest. */ - class CreateEnvironmentRequest implements ICreateEnvironmentRequest { - - /** - * Constructs a new CreateEnvironmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest); - - /** CreateEnvironmentRequest parent. */ - public parent: string; - - /** CreateEnvironmentRequest environment. */ - public environment?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null); - - /** - * Creates a new CreateEnvironmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateEnvironmentRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest): google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; - - /** - * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.verify|verify} messages. - * @param message CreateEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.verify|verify} messages. - * @param message CreateEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; - - /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; - - /** - * Verifies a CreateEnvironmentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateEnvironmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest; - - /** - * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. - * @param message CreateEnvironmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateEnvironmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateEnvironmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetEnvironmentRequest. */ - interface IGetEnvironmentRequest { - - /** GetEnvironmentRequest name */ - name?: (string|null); - } - - /** Represents a GetEnvironmentRequest. */ - class GetEnvironmentRequest implements IGetEnvironmentRequest { - - /** - * Constructs a new GetEnvironmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest); - - /** GetEnvironmentRequest name. */ - public name: string; - - /** - * Creates a new GetEnvironmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetEnvironmentRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest): google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; - - /** - * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.verify|verify} messages. - * @param message GetEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.verify|verify} messages. - * @param message GetEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; - - /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; - - /** - * Verifies a GetEnvironmentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetEnvironmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest; - - /** - * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. - * @param message GetEnvironmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetEnvironmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetEnvironmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEnvironmentsRequest. */ - interface IListEnvironmentsRequest { - - /** ListEnvironmentsRequest parent */ - parent?: (string|null); - - /** ListEnvironmentsRequest pageSize */ - pageSize?: (number|null); - - /** ListEnvironmentsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListEnvironmentsRequest. */ - class ListEnvironmentsRequest implements IListEnvironmentsRequest { - - /** - * Constructs a new ListEnvironmentsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest); - - /** ListEnvironmentsRequest parent. */ - public parent: string; - - /** ListEnvironmentsRequest pageSize. */ - public pageSize: number; - - /** ListEnvironmentsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListEnvironmentsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEnvironmentsRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; - - /** - * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.verify|verify} messages. - * @param message ListEnvironmentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.verify|verify} messages. - * @param message ListEnvironmentsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEnvironmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; - - /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEnvironmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; - - /** - * Verifies a ListEnvironmentsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEnvironmentsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest; - - /** - * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. - * @param message ListEnvironmentsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEnvironmentsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEnvironmentsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListEnvironmentsResponse. */ - interface IListEnvironmentsResponse { - - /** ListEnvironmentsResponse environments */ - environments?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[]|null); - - /** ListEnvironmentsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListEnvironmentsResponse. */ - class ListEnvironmentsResponse implements IListEnvironmentsResponse { - - /** - * Constructs a new ListEnvironmentsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse); - - /** ListEnvironmentsResponse environments. */ - public environments: google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[]; - - /** ListEnvironmentsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListEnvironmentsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListEnvironmentsResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; - - /** - * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.verify|verify} messages. - * @param message ListEnvironmentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.verify|verify} messages. - * @param message ListEnvironmentsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListEnvironmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; - - /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListEnvironmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; - - /** - * Verifies a ListEnvironmentsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListEnvironmentsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse; - - /** - * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. - * @param message ListEnvironmentsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListEnvironmentsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListEnvironmentsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteEnvironmentRequest. */ - interface IDeleteEnvironmentRequest { - - /** DeleteEnvironmentRequest name */ - name?: (string|null); - } - - /** Represents a DeleteEnvironmentRequest. */ - class DeleteEnvironmentRequest implements IDeleteEnvironmentRequest { - - /** - * Constructs a new DeleteEnvironmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest); - - /** DeleteEnvironmentRequest name. */ - public name: string; - - /** - * Creates a new DeleteEnvironmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteEnvironmentRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest): google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; - - /** - * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.verify|verify} messages. - * @param message DeleteEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.verify|verify} messages. - * @param message DeleteEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; - - /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; - - /** - * Verifies a DeleteEnvironmentRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteEnvironmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest; - - /** - * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. - * @param message DeleteEnvironmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteEnvironmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteEnvironmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateEnvironmentRequest. */ - interface IUpdateEnvironmentRequest { - - /** UpdateEnvironmentRequest name */ - name?: (string|null); - - /** UpdateEnvironmentRequest environment */ - environment?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null); - - /** UpdateEnvironmentRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents an UpdateEnvironmentRequest. */ - class UpdateEnvironmentRequest implements IUpdateEnvironmentRequest { - - /** - * Constructs a new UpdateEnvironmentRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest); - - /** UpdateEnvironmentRequest name. */ - public name: string; - - /** UpdateEnvironmentRequest environment. */ - public environment?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null); - - /** UpdateEnvironmentRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new UpdateEnvironmentRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateEnvironmentRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest): google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; - - /** - * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.verify|verify} messages. - * @param message UpdateEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.verify|verify} messages. - * @param message UpdateEnvironmentRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; - - /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; - - /** - * Verifies an UpdateEnvironmentRequest message. - * @param message Plain 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 UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateEnvironmentRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest; - - /** - * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. - * @param message UpdateEnvironmentRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateEnvironmentRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateEnvironmentRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RestartWebServerRequest. */ - interface IRestartWebServerRequest { - - /** RestartWebServerRequest name */ - name?: (string|null); - } - - /** Represents a RestartWebServerRequest. */ - class RestartWebServerRequest implements IRestartWebServerRequest { - - /** - * Constructs a new RestartWebServerRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest); - - /** RestartWebServerRequest name. */ - public name: string; - - /** - * Creates a new RestartWebServerRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns RestartWebServerRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest): google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; - - /** - * Encodes the specified RestartWebServerRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.verify|verify} messages. - * @param message RestartWebServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RestartWebServerRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.verify|verify} messages. - * @param message RestartWebServerRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RestartWebServerRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RestartWebServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; - - /** - * Decodes a RestartWebServerRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RestartWebServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; - - /** - * Verifies a RestartWebServerRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RestartWebServerRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RestartWebServerRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest; - - /** - * Creates a plain object from a RestartWebServerRequest message. Also converts values to other types if specified. - * @param message RestartWebServerRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RestartWebServerRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RestartWebServerRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExecuteAirflowCommandRequest. */ - interface IExecuteAirflowCommandRequest { - - /** ExecuteAirflowCommandRequest environment */ - environment?: (string|null); - - /** ExecuteAirflowCommandRequest command */ - command?: (string|null); - - /** ExecuteAirflowCommandRequest subcommand */ - subcommand?: (string|null); - - /** ExecuteAirflowCommandRequest parameters */ - parameters?: (string[]|null); - } - - /** Represents an ExecuteAirflowCommandRequest. */ - class ExecuteAirflowCommandRequest implements IExecuteAirflowCommandRequest { - - /** - * Constructs a new ExecuteAirflowCommandRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest); - - /** ExecuteAirflowCommandRequest environment. */ - public environment: string; - - /** ExecuteAirflowCommandRequest command. */ - public command: string; - - /** ExecuteAirflowCommandRequest subcommand. */ - public subcommand: string; - - /** ExecuteAirflowCommandRequest parameters. */ - public parameters: string[]; - - /** - * Creates a new ExecuteAirflowCommandRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteAirflowCommandRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest): google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest; - - /** - * Encodes the specified ExecuteAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest.verify|verify} messages. - * @param message ExecuteAirflowCommandRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest.verify|verify} messages. - * @param message ExecuteAirflowCommandRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteAirflowCommandRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest; - - /** - * Decodes an ExecuteAirflowCommandRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest; - - /** - * Verifies an ExecuteAirflowCommandRequest message. - * @param message Plain 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 ExecuteAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteAirflowCommandRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest; - - /** - * Creates a plain object from an ExecuteAirflowCommandRequest message. Also converts values to other types if specified. - * @param message ExecuteAirflowCommandRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteAirflowCommandRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecuteAirflowCommandRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExecuteAirflowCommandResponse. */ - interface IExecuteAirflowCommandResponse { - - /** ExecuteAirflowCommandResponse executionId */ - executionId?: (string|null); - - /** ExecuteAirflowCommandResponse pod */ - pod?: (string|null); - - /** ExecuteAirflowCommandResponse podNamespace */ - podNamespace?: (string|null); - - /** ExecuteAirflowCommandResponse error */ - error?: (string|null); - } - - /** Represents an ExecuteAirflowCommandResponse. */ - class ExecuteAirflowCommandResponse implements IExecuteAirflowCommandResponse { - - /** - * Constructs a new ExecuteAirflowCommandResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse); - - /** ExecuteAirflowCommandResponse executionId. */ - public executionId: string; - - /** ExecuteAirflowCommandResponse pod. */ - public pod: string; - - /** ExecuteAirflowCommandResponse podNamespace. */ - public podNamespace: string; - - /** ExecuteAirflowCommandResponse error. */ - public error: string; - - /** - * Creates a new ExecuteAirflowCommandResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ExecuteAirflowCommandResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse): google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse; - - /** - * Encodes the specified ExecuteAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse.verify|verify} messages. - * @param message ExecuteAirflowCommandResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExecuteAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse.verify|verify} messages. - * @param message ExecuteAirflowCommandResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExecuteAirflowCommandResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExecuteAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse; - - /** - * Decodes an ExecuteAirflowCommandResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExecuteAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse; - - /** - * Verifies an ExecuteAirflowCommandResponse message. - * @param message Plain 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 ExecuteAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExecuteAirflowCommandResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse; - - /** - * Creates a plain object from an ExecuteAirflowCommandResponse message. Also converts values to other types if specified. - * @param message ExecuteAirflowCommandResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExecuteAirflowCommandResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExecuteAirflowCommandResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StopAirflowCommandRequest. */ - interface IStopAirflowCommandRequest { - - /** StopAirflowCommandRequest environment */ - environment?: (string|null); - - /** StopAirflowCommandRequest executionId */ - executionId?: (string|null); - - /** StopAirflowCommandRequest pod */ - pod?: (string|null); - - /** StopAirflowCommandRequest podNamespace */ - podNamespace?: (string|null); - - /** StopAirflowCommandRequest force */ - force?: (boolean|null); - } - - /** Represents a StopAirflowCommandRequest. */ - class StopAirflowCommandRequest implements IStopAirflowCommandRequest { - - /** - * Constructs a new StopAirflowCommandRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest); - - /** StopAirflowCommandRequest environment. */ - public environment: string; - - /** StopAirflowCommandRequest executionId. */ - public executionId: string; - - /** StopAirflowCommandRequest pod. */ - public pod: string; - - /** StopAirflowCommandRequest podNamespace. */ - public podNamespace: string; - - /** StopAirflowCommandRequest force. */ - public force: boolean; - - /** - * Creates a new StopAirflowCommandRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StopAirflowCommandRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest): google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest; - - /** - * Encodes the specified StopAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest.verify|verify} messages. - * @param message StopAirflowCommandRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StopAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest.verify|verify} messages. - * @param message StopAirflowCommandRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StopAirflowCommandRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StopAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest; - - /** - * Decodes a StopAirflowCommandRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StopAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest; - - /** - * Verifies a StopAirflowCommandRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StopAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StopAirflowCommandRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest; - - /** - * Creates a plain object from a StopAirflowCommandRequest message. Also converts values to other types if specified. - * @param message StopAirflowCommandRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StopAirflowCommandRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StopAirflowCommandRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StopAirflowCommandResponse. */ - interface IStopAirflowCommandResponse { - - /** StopAirflowCommandResponse isDone */ - isDone?: (boolean|null); - - /** StopAirflowCommandResponse output */ - output?: (string[]|null); - } - - /** Represents a StopAirflowCommandResponse. */ - class StopAirflowCommandResponse implements IStopAirflowCommandResponse { - - /** - * Constructs a new StopAirflowCommandResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse); - - /** StopAirflowCommandResponse isDone. */ - public isDone: boolean; - - /** StopAirflowCommandResponse output. */ - public output: string[]; - - /** - * Creates a new StopAirflowCommandResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns StopAirflowCommandResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse): google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse; - - /** - * Encodes the specified StopAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse.verify|verify} messages. - * @param message StopAirflowCommandResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StopAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse.verify|verify} messages. - * @param message StopAirflowCommandResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StopAirflowCommandResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StopAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse; - - /** - * Decodes a StopAirflowCommandResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StopAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse; - - /** - * Verifies a StopAirflowCommandResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StopAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StopAirflowCommandResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse; - - /** - * Creates a plain object from a StopAirflowCommandResponse message. Also converts values to other types if specified. - * @param message StopAirflowCommandResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StopAirflowCommandResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StopAirflowCommandResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PollAirflowCommandRequest. */ - interface IPollAirflowCommandRequest { - - /** PollAirflowCommandRequest environment */ - environment?: (string|null); - - /** PollAirflowCommandRequest executionId */ - executionId?: (string|null); - - /** PollAirflowCommandRequest pod */ - pod?: (string|null); - - /** PollAirflowCommandRequest podNamespace */ - podNamespace?: (string|null); - - /** PollAirflowCommandRequest nextLineNumber */ - nextLineNumber?: (number|null); - } - - /** Represents a PollAirflowCommandRequest. */ - class PollAirflowCommandRequest implements IPollAirflowCommandRequest { - - /** - * Constructs a new PollAirflowCommandRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest); - - /** PollAirflowCommandRequest environment. */ - public environment: string; - - /** PollAirflowCommandRequest executionId. */ - public executionId: string; - - /** PollAirflowCommandRequest pod. */ - public pod: string; - - /** PollAirflowCommandRequest podNamespace. */ - public podNamespace: string; - - /** PollAirflowCommandRequest nextLineNumber. */ - public nextLineNumber: number; - - /** - * Creates a new PollAirflowCommandRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns PollAirflowCommandRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest; - - /** - * Encodes the specified PollAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest.verify|verify} messages. - * @param message PollAirflowCommandRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest.verify|verify} messages. - * @param message PollAirflowCommandRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollAirflowCommandRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest; - - /** - * Decodes a PollAirflowCommandRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest; - - /** - * Verifies a PollAirflowCommandRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PollAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollAirflowCommandRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest; - - /** - * Creates a plain object from a PollAirflowCommandRequest message. Also converts values to other types if specified. - * @param message PollAirflowCommandRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollAirflowCommandRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PollAirflowCommandRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PollAirflowCommandResponse. */ - interface IPollAirflowCommandResponse { - - /** PollAirflowCommandResponse output */ - output?: (google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine[]|null); - - /** PollAirflowCommandResponse outputEnd */ - outputEnd?: (boolean|null); - - /** PollAirflowCommandResponse exitInfo */ - exitInfo?: (google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo|null); - } - - /** Represents a PollAirflowCommandResponse. */ - class PollAirflowCommandResponse implements IPollAirflowCommandResponse { - - /** - * Constructs a new PollAirflowCommandResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse); - - /** PollAirflowCommandResponse output. */ - public output: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine[]; - - /** PollAirflowCommandResponse outputEnd. */ - public outputEnd: boolean; - - /** PollAirflowCommandResponse exitInfo. */ - public exitInfo?: (google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo|null); - - /** - * Creates a new PollAirflowCommandResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns PollAirflowCommandResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse; - - /** - * Encodes the specified PollAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.verify|verify} messages. - * @param message PollAirflowCommandResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PollAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.verify|verify} messages. - * @param message PollAirflowCommandResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PollAirflowCommandResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PollAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse; - - /** - * Decodes a PollAirflowCommandResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PollAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse; - - /** - * Verifies a PollAirflowCommandResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PollAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PollAirflowCommandResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse; - - /** - * Creates a plain object from a PollAirflowCommandResponse message. Also converts values to other types if specified. - * @param message PollAirflowCommandResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PollAirflowCommandResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PollAirflowCommandResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PollAirflowCommandResponse { - - /** Properties of a Line. */ - interface ILine { - - /** Line lineNumber */ - lineNumber?: (number|null); - - /** Line content */ - content?: (string|null); - } - - /** Represents a Line. */ - class Line implements ILine { - - /** - * Constructs a new Line. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine); - - /** Line lineNumber. */ - public lineNumber: number; - - /** Line content. */ - public content: string; - - /** - * Creates a new Line instance using the specified properties. - * @param [properties] Properties to set - * @returns Line instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line; - - /** - * Encodes the specified Line message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.verify|verify} messages. - * @param message Line message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Line message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.verify|verify} messages. - * @param message Line message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Line message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Line - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line; - - /** - * Decodes a Line message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Line - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line; - - /** - * Verifies a Line message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Line message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Line - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line; - - /** - * Creates a plain object from a Line message. Also converts values to other types if specified. - * @param message Line - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Line to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Line - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ExitInfo. */ - interface IExitInfo { - - /** ExitInfo exitCode */ - exitCode?: (number|null); - - /** ExitInfo error */ - error?: (string|null); - } - - /** Represents an ExitInfo. */ - class ExitInfo implements IExitInfo { - - /** - * Constructs a new ExitInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo); - - /** ExitInfo exitCode. */ - public exitCode: number; - - /** ExitInfo error. */ - public error: string; - - /** - * Creates a new ExitInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ExitInfo instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo; - - /** - * Encodes the specified ExitInfo message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.verify|verify} messages. - * @param message ExitInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExitInfo message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.verify|verify} messages. - * @param message ExitInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExitInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExitInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo; - - /** - * Decodes an ExitInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExitInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo; - - /** - * Verifies an ExitInfo message. - * @param message Plain 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 ExitInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExitInfo - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo; - - /** - * Creates a plain object from an ExitInfo message. Also converts values to other types if specified. - * @param message ExitInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExitInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExitInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CreateUserWorkloadsSecretRequest. */ - interface ICreateUserWorkloadsSecretRequest { - - /** CreateUserWorkloadsSecretRequest parent */ - parent?: (string|null); - - /** CreateUserWorkloadsSecretRequest userWorkloadsSecret */ - userWorkloadsSecret?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null); - } - - /** Represents a CreateUserWorkloadsSecretRequest. */ - class CreateUserWorkloadsSecretRequest implements ICreateUserWorkloadsSecretRequest { - - /** - * Constructs a new CreateUserWorkloadsSecretRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest); - - /** CreateUserWorkloadsSecretRequest parent. */ - public parent: string; - - /** CreateUserWorkloadsSecretRequest userWorkloadsSecret. */ - public userWorkloadsSecret?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null); - - /** - * Creates a new CreateUserWorkloadsSecretRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateUserWorkloadsSecretRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest): google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest; - - /** - * Encodes the specified CreateUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest.verify|verify} messages. - * @param message CreateUserWorkloadsSecretRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest.verify|verify} messages. - * @param message CreateUserWorkloadsSecretRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateUserWorkloadsSecretRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest; - - /** - * Decodes a CreateUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest; - - /** - * Verifies a CreateUserWorkloadsSecretRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateUserWorkloadsSecretRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest; - - /** - * Creates a plain object from a CreateUserWorkloadsSecretRequest message. Also converts values to other types if specified. - * @param message CreateUserWorkloadsSecretRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateUserWorkloadsSecretRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateUserWorkloadsSecretRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetUserWorkloadsSecretRequest. */ - interface IGetUserWorkloadsSecretRequest { - - /** GetUserWorkloadsSecretRequest name */ - name?: (string|null); - } - - /** Represents a GetUserWorkloadsSecretRequest. */ - class GetUserWorkloadsSecretRequest implements IGetUserWorkloadsSecretRequest { - - /** - * Constructs a new GetUserWorkloadsSecretRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest); - - /** GetUserWorkloadsSecretRequest name. */ - public name: string; - - /** - * Creates a new GetUserWorkloadsSecretRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUserWorkloadsSecretRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest): google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest; - - /** - * Encodes the specified GetUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest.verify|verify} messages. - * @param message GetUserWorkloadsSecretRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest.verify|verify} messages. - * @param message GetUserWorkloadsSecretRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUserWorkloadsSecretRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest; - - /** - * Decodes a GetUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest; - - /** - * Verifies a GetUserWorkloadsSecretRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUserWorkloadsSecretRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest; - - /** - * Creates a plain object from a GetUserWorkloadsSecretRequest message. Also converts values to other types if specified. - * @param message GetUserWorkloadsSecretRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUserWorkloadsSecretRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUserWorkloadsSecretRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUserWorkloadsSecretsRequest. */ - interface IListUserWorkloadsSecretsRequest { - - /** ListUserWorkloadsSecretsRequest parent */ - parent?: (string|null); - - /** ListUserWorkloadsSecretsRequest pageSize */ - pageSize?: (number|null); - - /** ListUserWorkloadsSecretsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListUserWorkloadsSecretsRequest. */ - class ListUserWorkloadsSecretsRequest implements IListUserWorkloadsSecretsRequest { - - /** - * Constructs a new ListUserWorkloadsSecretsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest); - - /** ListUserWorkloadsSecretsRequest parent. */ - public parent: string; - - /** ListUserWorkloadsSecretsRequest pageSize. */ - public pageSize: number; - - /** ListUserWorkloadsSecretsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListUserWorkloadsSecretsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUserWorkloadsSecretsRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest; - - /** - * Encodes the specified ListUserWorkloadsSecretsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest.verify|verify} messages. - * @param message ListUserWorkloadsSecretsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUserWorkloadsSecretsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest.verify|verify} messages. - * @param message ListUserWorkloadsSecretsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUserWorkloadsSecretsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUserWorkloadsSecretsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest; - - /** - * Decodes a ListUserWorkloadsSecretsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUserWorkloadsSecretsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest; - - /** - * Verifies a ListUserWorkloadsSecretsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUserWorkloadsSecretsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUserWorkloadsSecretsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest; - - /** - * Creates a plain object from a ListUserWorkloadsSecretsRequest message. Also converts values to other types if specified. - * @param message ListUserWorkloadsSecretsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUserWorkloadsSecretsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUserWorkloadsSecretsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateUserWorkloadsSecretRequest. */ - interface IUpdateUserWorkloadsSecretRequest { - - /** UpdateUserWorkloadsSecretRequest userWorkloadsSecret */ - userWorkloadsSecret?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null); - } - - /** Represents an UpdateUserWorkloadsSecretRequest. */ - class UpdateUserWorkloadsSecretRequest implements IUpdateUserWorkloadsSecretRequest { - - /** - * Constructs a new UpdateUserWorkloadsSecretRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest); - - /** UpdateUserWorkloadsSecretRequest userWorkloadsSecret. */ - public userWorkloadsSecret?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null); - - /** - * Creates a new UpdateUserWorkloadsSecretRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateUserWorkloadsSecretRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest): google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest; - - /** - * Encodes the specified UpdateUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest.verify|verify} messages. - * @param message UpdateUserWorkloadsSecretRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest.verify|verify} messages. - * @param message UpdateUserWorkloadsSecretRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateUserWorkloadsSecretRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest; - - /** - * Decodes an UpdateUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest; - - /** - * Verifies an UpdateUserWorkloadsSecretRequest message. - * @param message Plain 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 UpdateUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateUserWorkloadsSecretRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest; - - /** - * Creates a plain object from an UpdateUserWorkloadsSecretRequest message. Also converts values to other types if specified. - * @param message UpdateUserWorkloadsSecretRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateUserWorkloadsSecretRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateUserWorkloadsSecretRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteUserWorkloadsSecretRequest. */ - interface IDeleteUserWorkloadsSecretRequest { - - /** DeleteUserWorkloadsSecretRequest name */ - name?: (string|null); - } - - /** Represents a DeleteUserWorkloadsSecretRequest. */ - class DeleteUserWorkloadsSecretRequest implements IDeleteUserWorkloadsSecretRequest { - - /** - * Constructs a new DeleteUserWorkloadsSecretRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest); - - /** DeleteUserWorkloadsSecretRequest name. */ - public name: string; - - /** - * Creates a new DeleteUserWorkloadsSecretRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteUserWorkloadsSecretRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest): google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest; - - /** - * Encodes the specified DeleteUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest.verify|verify} messages. - * @param message DeleteUserWorkloadsSecretRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest.verify|verify} messages. - * @param message DeleteUserWorkloadsSecretRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteUserWorkloadsSecretRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest; - - /** - * Decodes a DeleteUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest; - - /** - * Verifies a DeleteUserWorkloadsSecretRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteUserWorkloadsSecretRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest; - - /** - * Creates a plain object from a DeleteUserWorkloadsSecretRequest message. Also converts values to other types if specified. - * @param message DeleteUserWorkloadsSecretRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteUserWorkloadsSecretRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteUserWorkloadsSecretRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CreateUserWorkloadsConfigMapRequest. */ - interface ICreateUserWorkloadsConfigMapRequest { - - /** CreateUserWorkloadsConfigMapRequest parent */ - parent?: (string|null); - - /** CreateUserWorkloadsConfigMapRequest userWorkloadsConfigMap */ - userWorkloadsConfigMap?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null); - } - - /** Represents a CreateUserWorkloadsConfigMapRequest. */ - class CreateUserWorkloadsConfigMapRequest implements ICreateUserWorkloadsConfigMapRequest { - - /** - * Constructs a new CreateUserWorkloadsConfigMapRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest); - - /** CreateUserWorkloadsConfigMapRequest parent. */ - public parent: string; - - /** CreateUserWorkloadsConfigMapRequest userWorkloadsConfigMap. */ - public userWorkloadsConfigMap?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null); - - /** - * Creates a new CreateUserWorkloadsConfigMapRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateUserWorkloadsConfigMapRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest): google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest; - - /** - * Encodes the specified CreateUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest.verify|verify} messages. - * @param message CreateUserWorkloadsConfigMapRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest.verify|verify} messages. - * @param message CreateUserWorkloadsConfigMapRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateUserWorkloadsConfigMapRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest; - - /** - * Decodes a CreateUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest; - - /** - * Verifies a CreateUserWorkloadsConfigMapRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CreateUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateUserWorkloadsConfigMapRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest; - - /** - * Creates a plain object from a CreateUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. - * @param message CreateUserWorkloadsConfigMapRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateUserWorkloadsConfigMapRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateUserWorkloadsConfigMapRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetUserWorkloadsConfigMapRequest. */ - interface IGetUserWorkloadsConfigMapRequest { - - /** GetUserWorkloadsConfigMapRequest name */ - name?: (string|null); - } - - /** Represents a GetUserWorkloadsConfigMapRequest. */ - class GetUserWorkloadsConfigMapRequest implements IGetUserWorkloadsConfigMapRequest { - - /** - * Constructs a new GetUserWorkloadsConfigMapRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest); - - /** GetUserWorkloadsConfigMapRequest name. */ - public name: string; - - /** - * Creates a new GetUserWorkloadsConfigMapRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetUserWorkloadsConfigMapRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest): google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest; - - /** - * Encodes the specified GetUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest.verify|verify} messages. - * @param message GetUserWorkloadsConfigMapRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest.verify|verify} messages. - * @param message GetUserWorkloadsConfigMapRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetUserWorkloadsConfigMapRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest; - - /** - * Decodes a GetUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest; - - /** - * Verifies a GetUserWorkloadsConfigMapRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a GetUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetUserWorkloadsConfigMapRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest; - - /** - * Creates a plain object from a GetUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. - * @param message GetUserWorkloadsConfigMapRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetUserWorkloadsConfigMapRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetUserWorkloadsConfigMapRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUserWorkloadsConfigMapsRequest. */ - interface IListUserWorkloadsConfigMapsRequest { - - /** ListUserWorkloadsConfigMapsRequest parent */ - parent?: (string|null); - - /** ListUserWorkloadsConfigMapsRequest pageSize */ - pageSize?: (number|null); - - /** ListUserWorkloadsConfigMapsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListUserWorkloadsConfigMapsRequest. */ - class ListUserWorkloadsConfigMapsRequest implements IListUserWorkloadsConfigMapsRequest { - - /** - * Constructs a new ListUserWorkloadsConfigMapsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest); - - /** ListUserWorkloadsConfigMapsRequest parent. */ - public parent: string; - - /** ListUserWorkloadsConfigMapsRequest pageSize. */ - public pageSize: number; - - /** ListUserWorkloadsConfigMapsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListUserWorkloadsConfigMapsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUserWorkloadsConfigMapsRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest; - - /** - * Encodes the specified ListUserWorkloadsConfigMapsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest.verify|verify} messages. - * @param message ListUserWorkloadsConfigMapsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUserWorkloadsConfigMapsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest.verify|verify} messages. - * @param message ListUserWorkloadsConfigMapsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUserWorkloadsConfigMapsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUserWorkloadsConfigMapsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest; - - /** - * Decodes a ListUserWorkloadsConfigMapsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUserWorkloadsConfigMapsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest; - - /** - * Verifies a ListUserWorkloadsConfigMapsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUserWorkloadsConfigMapsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUserWorkloadsConfigMapsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest; - - /** - * Creates a plain object from a ListUserWorkloadsConfigMapsRequest message. Also converts values to other types if specified. - * @param message ListUserWorkloadsConfigMapsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUserWorkloadsConfigMapsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUserWorkloadsConfigMapsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an UpdateUserWorkloadsConfigMapRequest. */ - interface IUpdateUserWorkloadsConfigMapRequest { - - /** UpdateUserWorkloadsConfigMapRequest userWorkloadsConfigMap */ - userWorkloadsConfigMap?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null); - } - - /** Represents an UpdateUserWorkloadsConfigMapRequest. */ - class UpdateUserWorkloadsConfigMapRequest implements IUpdateUserWorkloadsConfigMapRequest { - - /** - * Constructs a new UpdateUserWorkloadsConfigMapRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest); - - /** UpdateUserWorkloadsConfigMapRequest userWorkloadsConfigMap. */ - public userWorkloadsConfigMap?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null); - - /** - * Creates a new UpdateUserWorkloadsConfigMapRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns UpdateUserWorkloadsConfigMapRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest): google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest; - - /** - * Encodes the specified UpdateUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest.verify|verify} messages. - * @param message UpdateUserWorkloadsConfigMapRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UpdateUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest.verify|verify} messages. - * @param message UpdateUserWorkloadsConfigMapRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UpdateUserWorkloadsConfigMapRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UpdateUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest; - - /** - * Decodes an UpdateUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UpdateUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest; - - /** - * Verifies an UpdateUserWorkloadsConfigMapRequest message. - * @param message Plain 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 UpdateUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UpdateUserWorkloadsConfigMapRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest; - - /** - * Creates a plain object from an UpdateUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. - * @param message UpdateUserWorkloadsConfigMapRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UpdateUserWorkloadsConfigMapRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UpdateUserWorkloadsConfigMapRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteUserWorkloadsConfigMapRequest. */ - interface IDeleteUserWorkloadsConfigMapRequest { - - /** DeleteUserWorkloadsConfigMapRequest name */ - name?: (string|null); - } - - /** Represents a DeleteUserWorkloadsConfigMapRequest. */ - class DeleteUserWorkloadsConfigMapRequest implements IDeleteUserWorkloadsConfigMapRequest { - - /** - * Constructs a new DeleteUserWorkloadsConfigMapRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest); - - /** DeleteUserWorkloadsConfigMapRequest name. */ - public name: string; - - /** - * Creates a new DeleteUserWorkloadsConfigMapRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteUserWorkloadsConfigMapRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest): google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest; - - /** - * Encodes the specified DeleteUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest.verify|verify} messages. - * @param message DeleteUserWorkloadsConfigMapRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest.verify|verify} messages. - * @param message DeleteUserWorkloadsConfigMapRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteUserWorkloadsConfigMapRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest; - - /** - * Decodes a DeleteUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest; - - /** - * Verifies a DeleteUserWorkloadsConfigMapRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DeleteUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteUserWorkloadsConfigMapRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest; - - /** - * Creates a plain object from a DeleteUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. - * @param message DeleteUserWorkloadsConfigMapRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteUserWorkloadsConfigMapRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteUserWorkloadsConfigMapRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserWorkloadsSecret. */ - interface IUserWorkloadsSecret { - - /** UserWorkloadsSecret name */ - name?: (string|null); - - /** UserWorkloadsSecret data */ - data?: ({ [k: string]: string }|null); - } - - /** Represents a UserWorkloadsSecret. */ - class UserWorkloadsSecret implements IUserWorkloadsSecret { - - /** - * Constructs a new UserWorkloadsSecret. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret); - - /** UserWorkloadsSecret name. */ - public name: string; - - /** UserWorkloadsSecret data. */ - public data: { [k: string]: string }; - - /** - * Creates a new UserWorkloadsSecret instance using the specified properties. - * @param [properties] Properties to set - * @returns UserWorkloadsSecret instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret): google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret; - - /** - * Encodes the specified UserWorkloadsSecret message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.verify|verify} messages. - * @param message UserWorkloadsSecret message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserWorkloadsSecret message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.verify|verify} messages. - * @param message UserWorkloadsSecret message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserWorkloadsSecret message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserWorkloadsSecret - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret; - - /** - * Decodes a UserWorkloadsSecret message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserWorkloadsSecret - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret; - - /** - * Verifies a UserWorkloadsSecret message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserWorkloadsSecret message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserWorkloadsSecret - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret; - - /** - * Creates a plain object from a UserWorkloadsSecret message. Also converts values to other types if specified. - * @param message UserWorkloadsSecret - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserWorkloadsSecret to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserWorkloadsSecret - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUserWorkloadsSecretsResponse. */ - interface IListUserWorkloadsSecretsResponse { - - /** ListUserWorkloadsSecretsResponse userWorkloadsSecrets */ - userWorkloadsSecrets?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret[]|null); - - /** ListUserWorkloadsSecretsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListUserWorkloadsSecretsResponse. */ - class ListUserWorkloadsSecretsResponse implements IListUserWorkloadsSecretsResponse { - - /** - * Constructs a new ListUserWorkloadsSecretsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse); - - /** ListUserWorkloadsSecretsResponse userWorkloadsSecrets. */ - public userWorkloadsSecrets: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret[]; - - /** ListUserWorkloadsSecretsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListUserWorkloadsSecretsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUserWorkloadsSecretsResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse; - - /** - * Encodes the specified ListUserWorkloadsSecretsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse.verify|verify} messages. - * @param message ListUserWorkloadsSecretsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUserWorkloadsSecretsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse.verify|verify} messages. - * @param message ListUserWorkloadsSecretsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUserWorkloadsSecretsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUserWorkloadsSecretsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse; - - /** - * Decodes a ListUserWorkloadsSecretsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUserWorkloadsSecretsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse; - - /** - * Verifies a ListUserWorkloadsSecretsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUserWorkloadsSecretsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUserWorkloadsSecretsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse; - - /** - * Creates a plain object from a ListUserWorkloadsSecretsResponse message. Also converts values to other types if specified. - * @param message ListUserWorkloadsSecretsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUserWorkloadsSecretsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUserWorkloadsSecretsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a UserWorkloadsConfigMap. */ - interface IUserWorkloadsConfigMap { - - /** UserWorkloadsConfigMap name */ - name?: (string|null); - - /** UserWorkloadsConfigMap data */ - data?: ({ [k: string]: string }|null); - } - - /** Represents a UserWorkloadsConfigMap. */ - class UserWorkloadsConfigMap implements IUserWorkloadsConfigMap { - - /** - * Constructs a new UserWorkloadsConfigMap. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap); - - /** UserWorkloadsConfigMap name. */ - public name: string; - - /** UserWorkloadsConfigMap data. */ - public data: { [k: string]: string }; - - /** - * Creates a new UserWorkloadsConfigMap instance using the specified properties. - * @param [properties] Properties to set - * @returns UserWorkloadsConfigMap instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap): google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap; - - /** - * Encodes the specified UserWorkloadsConfigMap message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.verify|verify} messages. - * @param message UserWorkloadsConfigMap message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UserWorkloadsConfigMap message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.verify|verify} messages. - * @param message UserWorkloadsConfigMap message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a UserWorkloadsConfigMap message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UserWorkloadsConfigMap - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap; - - /** - * Decodes a UserWorkloadsConfigMap message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UserWorkloadsConfigMap - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap; - - /** - * Verifies a UserWorkloadsConfigMap message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a UserWorkloadsConfigMap message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UserWorkloadsConfigMap - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap; - - /** - * Creates a plain object from a UserWorkloadsConfigMap message. Also converts values to other types if specified. - * @param message UserWorkloadsConfigMap - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UserWorkloadsConfigMap to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UserWorkloadsConfigMap - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListUserWorkloadsConfigMapsResponse. */ - interface IListUserWorkloadsConfigMapsResponse { - - /** ListUserWorkloadsConfigMapsResponse userWorkloadsConfigMaps */ - userWorkloadsConfigMaps?: (google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap[]|null); - - /** ListUserWorkloadsConfigMapsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListUserWorkloadsConfigMapsResponse. */ - class ListUserWorkloadsConfigMapsResponse implements IListUserWorkloadsConfigMapsResponse { - - /** - * Constructs a new ListUserWorkloadsConfigMapsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse); - - /** ListUserWorkloadsConfigMapsResponse userWorkloadsConfigMaps. */ - public userWorkloadsConfigMaps: google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap[]; - - /** ListUserWorkloadsConfigMapsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListUserWorkloadsConfigMapsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListUserWorkloadsConfigMapsResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse; - - /** - * Encodes the specified ListUserWorkloadsConfigMapsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse.verify|verify} messages. - * @param message ListUserWorkloadsConfigMapsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListUserWorkloadsConfigMapsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse.verify|verify} messages. - * @param message ListUserWorkloadsConfigMapsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListUserWorkloadsConfigMapsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListUserWorkloadsConfigMapsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse; - - /** - * Decodes a ListUserWorkloadsConfigMapsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListUserWorkloadsConfigMapsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse; - - /** - * Verifies a ListUserWorkloadsConfigMapsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListUserWorkloadsConfigMapsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListUserWorkloadsConfigMapsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse; - - /** - * Creates a plain object from a ListUserWorkloadsConfigMapsResponse message. Also converts values to other types if specified. - * @param message ListUserWorkloadsConfigMapsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListUserWorkloadsConfigMapsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListUserWorkloadsConfigMapsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListWorkloadsRequest. */ - interface IListWorkloadsRequest { - - /** ListWorkloadsRequest parent */ - parent?: (string|null); - - /** ListWorkloadsRequest pageSize */ - pageSize?: (number|null); - - /** ListWorkloadsRequest pageToken */ - pageToken?: (string|null); - - /** ListWorkloadsRequest filter */ - filter?: (string|null); - } - - /** Represents a ListWorkloadsRequest. */ - class ListWorkloadsRequest implements IListWorkloadsRequest { - - /** - * Constructs a new ListWorkloadsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest); - - /** ListWorkloadsRequest parent. */ - public parent: string; - - /** ListWorkloadsRequest pageSize. */ - public pageSize: number; - - /** ListWorkloadsRequest pageToken. */ - public pageToken: string; - - /** ListWorkloadsRequest filter. */ - public filter: string; - - /** - * Creates a new ListWorkloadsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListWorkloadsRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest; - - /** - * Encodes the specified ListWorkloadsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest.verify|verify} messages. - * @param message ListWorkloadsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListWorkloadsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest.verify|verify} messages. - * @param message ListWorkloadsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListWorkloadsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListWorkloadsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest; - - /** - * Decodes a ListWorkloadsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListWorkloadsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest; - - /** - * Verifies a ListWorkloadsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListWorkloadsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListWorkloadsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest; - - /** - * Creates a plain object from a ListWorkloadsRequest message. Also converts values to other types if specified. - * @param message ListWorkloadsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListWorkloadsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListWorkloadsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListWorkloadsResponse. */ - interface IListWorkloadsResponse { - - /** ListWorkloadsResponse workloads */ - workloads?: (google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload[]|null); - - /** ListWorkloadsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListWorkloadsResponse. */ - class ListWorkloadsResponse implements IListWorkloadsResponse { - - /** - * Constructs a new ListWorkloadsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse); - - /** ListWorkloadsResponse workloads. */ - public workloads: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload[]; - - /** ListWorkloadsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListWorkloadsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListWorkloadsResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse; - - /** - * Encodes the specified ListWorkloadsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.verify|verify} messages. - * @param message ListWorkloadsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListWorkloadsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.verify|verify} messages. - * @param message ListWorkloadsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListWorkloadsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListWorkloadsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse; - - /** - * Decodes a ListWorkloadsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListWorkloadsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse; - - /** - * Verifies a ListWorkloadsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListWorkloadsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListWorkloadsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse; - - /** - * Creates a plain object from a ListWorkloadsResponse message. Also converts values to other types if specified. - * @param message ListWorkloadsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListWorkloadsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListWorkloadsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ListWorkloadsResponse { - - /** Properties of a ComposerWorkload. */ - interface IComposerWorkload { - - /** ComposerWorkload name */ - name?: (string|null); - - /** ComposerWorkload type */ - type?: (google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType|null); - - /** ComposerWorkload status */ - status?: (google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus|null); - } - - /** Represents a ComposerWorkload. */ - class ComposerWorkload implements IComposerWorkload { - - /** - * Constructs a new ComposerWorkload. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload); - - /** ComposerWorkload name. */ - public name: string; - - /** ComposerWorkload type. */ - public type: (google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType); - - /** ComposerWorkload status. */ - public status?: (google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus|null); - - /** - * Creates a new ComposerWorkload instance using the specified properties. - * @param [properties] Properties to set - * @returns ComposerWorkload instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload; - - /** - * Encodes the specified ComposerWorkload message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.verify|verify} messages. - * @param message ComposerWorkload message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComposerWorkload message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.verify|verify} messages. - * @param message ComposerWorkload message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComposerWorkload message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComposerWorkload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload; - - /** - * Decodes a ComposerWorkload message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComposerWorkload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload; - - /** - * Verifies a ComposerWorkload message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComposerWorkload message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComposerWorkload - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload; - - /** - * Creates a plain object from a ComposerWorkload message. Also converts values to other types if specified. - * @param message ComposerWorkload - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComposerWorkload to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComposerWorkload - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** ComposerWorkloadType enum. */ - enum ComposerWorkloadType { - COMPOSER_WORKLOAD_TYPE_UNSPECIFIED = 0, - CELERY_WORKER = 1, - KUBERNETES_WORKER = 2, - KUBERNETES_OPERATOR_POD = 3, - SCHEDULER = 4, - DAG_PROCESSOR = 5, - TRIGGERER = 6, - WEB_SERVER = 7, - REDIS = 8 - } - - /** Properties of a ComposerWorkloadStatus. */ - interface IComposerWorkloadStatus { - - /** ComposerWorkloadStatus state */ - state?: (google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState|null); - - /** ComposerWorkloadStatus statusMessage */ - statusMessage?: (string|null); - - /** ComposerWorkloadStatus detailedStatusMessage */ - detailedStatusMessage?: (string|null); - } - - /** Represents a ComposerWorkloadStatus. */ - class ComposerWorkloadStatus implements IComposerWorkloadStatus { - - /** - * Constructs a new ComposerWorkloadStatus. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus); - - /** ComposerWorkloadStatus state. */ - public state: (google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState); - - /** ComposerWorkloadStatus statusMessage. */ - public statusMessage: string; - - /** ComposerWorkloadStatus detailedStatusMessage. */ - public detailedStatusMessage: string; - - /** - * Creates a new ComposerWorkloadStatus instance using the specified properties. - * @param [properties] Properties to set - * @returns ComposerWorkloadStatus instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus; - - /** - * Encodes the specified ComposerWorkloadStatus message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.verify|verify} messages. - * @param message ComposerWorkloadStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ComposerWorkloadStatus message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.verify|verify} messages. - * @param message ComposerWorkloadStatus message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ComposerWorkloadStatus message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ComposerWorkloadStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus; - - /** - * Decodes a ComposerWorkloadStatus message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ComposerWorkloadStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus; - - /** - * Verifies a ComposerWorkloadStatus message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ComposerWorkloadStatus message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ComposerWorkloadStatus - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus; - - /** - * Creates a plain object from a ComposerWorkloadStatus message. Also converts values to other types if specified. - * @param message ComposerWorkloadStatus - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ComposerWorkloadStatus to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ComposerWorkloadStatus - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** ComposerWorkloadState enum. */ - enum ComposerWorkloadState { - COMPOSER_WORKLOAD_STATE_UNSPECIFIED = 0, - PENDING = 1, - OK = 2, - WARNING = 3, - ERROR = 4, - SUCCEEDED = 5, - FAILED = 6 - } - } - - /** Properties of a SaveSnapshotRequest. */ - interface ISaveSnapshotRequest { - - /** SaveSnapshotRequest environment */ - environment?: (string|null); - - /** SaveSnapshotRequest snapshotLocation */ - snapshotLocation?: (string|null); - } - - /** Represents a SaveSnapshotRequest. */ - class SaveSnapshotRequest implements ISaveSnapshotRequest { - - /** - * Constructs a new SaveSnapshotRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest); - - /** SaveSnapshotRequest environment. */ - public environment: string; - - /** SaveSnapshotRequest snapshotLocation. */ - public snapshotLocation: string; - - /** - * Creates a new SaveSnapshotRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns SaveSnapshotRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest): google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest; - - /** - * Encodes the specified SaveSnapshotRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest.verify|verify} messages. - * @param message SaveSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SaveSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest.verify|verify} messages. - * @param message SaveSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SaveSnapshotRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SaveSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest; - - /** - * Decodes a SaveSnapshotRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SaveSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest; - - /** - * Verifies a SaveSnapshotRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SaveSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SaveSnapshotRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest; - - /** - * Creates a plain object from a SaveSnapshotRequest message. Also converts values to other types if specified. - * @param message SaveSnapshotRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SaveSnapshotRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SaveSnapshotRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SaveSnapshotResponse. */ - interface ISaveSnapshotResponse { - - /** SaveSnapshotResponse snapshotPath */ - snapshotPath?: (string|null); - } - - /** Represents a SaveSnapshotResponse. */ - class SaveSnapshotResponse implements ISaveSnapshotResponse { - - /** - * Constructs a new SaveSnapshotResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotResponse); - - /** SaveSnapshotResponse snapshotPath. */ - public snapshotPath: string; - - /** - * Creates a new SaveSnapshotResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns SaveSnapshotResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotResponse): google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse; - - /** - * Encodes the specified SaveSnapshotResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse.verify|verify} messages. - * @param message SaveSnapshotResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SaveSnapshotResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse.verify|verify} messages. - * @param message SaveSnapshotResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SaveSnapshotResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SaveSnapshotResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse; - - /** - * Decodes a SaveSnapshotResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SaveSnapshotResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse; - - /** - * Verifies a SaveSnapshotResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SaveSnapshotResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SaveSnapshotResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse; - - /** - * Creates a plain object from a SaveSnapshotResponse message. Also converts values to other types if specified. - * @param message SaveSnapshotResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SaveSnapshotResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SaveSnapshotResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LoadSnapshotRequest. */ - interface ILoadSnapshotRequest { - - /** LoadSnapshotRequest environment */ - environment?: (string|null); - - /** LoadSnapshotRequest snapshotPath */ - snapshotPath?: (string|null); - - /** LoadSnapshotRequest skipPypiPackagesInstallation */ - skipPypiPackagesInstallation?: (boolean|null); - - /** LoadSnapshotRequest skipEnvironmentVariablesSetting */ - skipEnvironmentVariablesSetting?: (boolean|null); - - /** LoadSnapshotRequest skipAirflowOverridesSetting */ - skipAirflowOverridesSetting?: (boolean|null); - - /** LoadSnapshotRequest skipGcsDataCopying */ - skipGcsDataCopying?: (boolean|null); - } - - /** Represents a LoadSnapshotRequest. */ - class LoadSnapshotRequest implements ILoadSnapshotRequest { - - /** - * Constructs a new LoadSnapshotRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest); - - /** LoadSnapshotRequest environment. */ - public environment: string; - - /** LoadSnapshotRequest snapshotPath. */ - public snapshotPath: string; - - /** LoadSnapshotRequest skipPypiPackagesInstallation. */ - public skipPypiPackagesInstallation: boolean; - - /** LoadSnapshotRequest skipEnvironmentVariablesSetting. */ - public skipEnvironmentVariablesSetting: boolean; - - /** LoadSnapshotRequest skipAirflowOverridesSetting. */ - public skipAirflowOverridesSetting: boolean; - - /** LoadSnapshotRequest skipGcsDataCopying. */ - public skipGcsDataCopying: boolean; - - /** - * Creates a new LoadSnapshotRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadSnapshotRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest): google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest; - - /** - * Encodes the specified LoadSnapshotRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest.verify|verify} messages. - * @param message LoadSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoadSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest.verify|verify} messages. - * @param message LoadSnapshotRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoadSnapshotRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest; - - /** - * Decodes a LoadSnapshotRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest; - - /** - * Verifies a LoadSnapshotRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoadSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadSnapshotRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest; - - /** - * Creates a plain object from a LoadSnapshotRequest message. Also converts values to other types if specified. - * @param message LoadSnapshotRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoadSnapshotRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoadSnapshotRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LoadSnapshotResponse. */ - interface ILoadSnapshotResponse { - } - - /** Represents a LoadSnapshotResponse. */ - class LoadSnapshotResponse implements ILoadSnapshotResponse { - - /** - * Constructs a new LoadSnapshotResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotResponse); - - /** - * Creates a new LoadSnapshotResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns LoadSnapshotResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotResponse): google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse; - - /** - * Encodes the specified LoadSnapshotResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse.verify|verify} messages. - * @param message LoadSnapshotResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LoadSnapshotResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse.verify|verify} messages. - * @param message LoadSnapshotResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LoadSnapshotResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LoadSnapshotResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse; - - /** - * Decodes a LoadSnapshotResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LoadSnapshotResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse; - - /** - * Verifies a LoadSnapshotResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a LoadSnapshotResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LoadSnapshotResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse; - - /** - * Creates a plain object from a LoadSnapshotResponse message. Also converts values to other types if specified. - * @param message LoadSnapshotResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LoadSnapshotResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LoadSnapshotResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DatabaseFailoverRequest. */ - interface IDatabaseFailoverRequest { - - /** DatabaseFailoverRequest environment */ - environment?: (string|null); - } - - /** Represents a DatabaseFailoverRequest. */ - class DatabaseFailoverRequest implements IDatabaseFailoverRequest { - - /** - * Constructs a new DatabaseFailoverRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest); - - /** DatabaseFailoverRequest environment. */ - public environment: string; - - /** - * Creates a new DatabaseFailoverRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DatabaseFailoverRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest): google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest; - - /** - * Encodes the specified DatabaseFailoverRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest.verify|verify} messages. - * @param message DatabaseFailoverRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DatabaseFailoverRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest.verify|verify} messages. - * @param message DatabaseFailoverRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DatabaseFailoverRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DatabaseFailoverRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest; - - /** - * Decodes a DatabaseFailoverRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DatabaseFailoverRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest; - - /** - * Verifies a DatabaseFailoverRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DatabaseFailoverRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DatabaseFailoverRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest; - - /** - * Creates a plain object from a DatabaseFailoverRequest message. Also converts values to other types if specified. - * @param message DatabaseFailoverRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DatabaseFailoverRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DatabaseFailoverRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DatabaseFailoverResponse. */ - interface IDatabaseFailoverResponse { - } - - /** Represents a DatabaseFailoverResponse. */ - class DatabaseFailoverResponse implements IDatabaseFailoverResponse { - - /** - * Constructs a new DatabaseFailoverResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverResponse); - - /** - * Creates a new DatabaseFailoverResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns DatabaseFailoverResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverResponse): google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse; - - /** - * Encodes the specified DatabaseFailoverResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse.verify|verify} messages. - * @param message DatabaseFailoverResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DatabaseFailoverResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse.verify|verify} messages. - * @param message DatabaseFailoverResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DatabaseFailoverResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DatabaseFailoverResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse; - - /** - * Decodes a DatabaseFailoverResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DatabaseFailoverResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse; - - /** - * Verifies a DatabaseFailoverResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DatabaseFailoverResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DatabaseFailoverResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse; - - /** - * Creates a plain object from a DatabaseFailoverResponse message. Also converts values to other types if specified. - * @param message DatabaseFailoverResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DatabaseFailoverResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DatabaseFailoverResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchDatabasePropertiesRequest. */ - interface IFetchDatabasePropertiesRequest { - - /** FetchDatabasePropertiesRequest environment */ - environment?: (string|null); - } - - /** Represents a FetchDatabasePropertiesRequest. */ - class FetchDatabasePropertiesRequest implements IFetchDatabasePropertiesRequest { - - /** - * Constructs a new FetchDatabasePropertiesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest); - - /** FetchDatabasePropertiesRequest environment. */ - public environment: string; - - /** - * Creates a new FetchDatabasePropertiesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchDatabasePropertiesRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest): google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest; - - /** - * Encodes the specified FetchDatabasePropertiesRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest.verify|verify} messages. - * @param message FetchDatabasePropertiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchDatabasePropertiesRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest.verify|verify} messages. - * @param message FetchDatabasePropertiesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchDatabasePropertiesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchDatabasePropertiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest; - - /** - * Decodes a FetchDatabasePropertiesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchDatabasePropertiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest; - - /** - * Verifies a FetchDatabasePropertiesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchDatabasePropertiesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchDatabasePropertiesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest; - - /** - * Creates a plain object from a FetchDatabasePropertiesRequest message. Also converts values to other types if specified. - * @param message FetchDatabasePropertiesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchDatabasePropertiesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchDatabasePropertiesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FetchDatabasePropertiesResponse. */ - interface IFetchDatabasePropertiesResponse { - - /** FetchDatabasePropertiesResponse primaryGceZone */ - primaryGceZone?: (string|null); - - /** FetchDatabasePropertiesResponse secondaryGceZone */ - secondaryGceZone?: (string|null); - - /** FetchDatabasePropertiesResponse isFailoverReplicaAvailable */ - isFailoverReplicaAvailable?: (boolean|null); - } - - /** Represents a FetchDatabasePropertiesResponse. */ - class FetchDatabasePropertiesResponse implements IFetchDatabasePropertiesResponse { - - /** - * Constructs a new FetchDatabasePropertiesResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse); - - /** FetchDatabasePropertiesResponse primaryGceZone. */ - public primaryGceZone: string; - - /** FetchDatabasePropertiesResponse secondaryGceZone. */ - public secondaryGceZone: string; - - /** FetchDatabasePropertiesResponse isFailoverReplicaAvailable. */ - public isFailoverReplicaAvailable: boolean; - - /** - * Creates a new FetchDatabasePropertiesResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns FetchDatabasePropertiesResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse): google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse; - - /** - * Encodes the specified FetchDatabasePropertiesResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse.verify|verify} messages. - * @param message FetchDatabasePropertiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FetchDatabasePropertiesResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse.verify|verify} messages. - * @param message FetchDatabasePropertiesResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FetchDatabasePropertiesResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FetchDatabasePropertiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse; - - /** - * Decodes a FetchDatabasePropertiesResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FetchDatabasePropertiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse; - - /** - * Verifies a FetchDatabasePropertiesResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a FetchDatabasePropertiesResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FetchDatabasePropertiesResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse; - - /** - * Creates a plain object from a FetchDatabasePropertiesResponse message. Also converts values to other types if specified. - * @param message FetchDatabasePropertiesResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FetchDatabasePropertiesResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FetchDatabasePropertiesResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnvironmentConfig. */ - interface IEnvironmentConfig { - - /** EnvironmentConfig gkeCluster */ - gkeCluster?: (string|null); - - /** EnvironmentConfig dagGcsPrefix */ - dagGcsPrefix?: (string|null); - - /** EnvironmentConfig nodeCount */ - nodeCount?: (number|null); - - /** EnvironmentConfig softwareConfig */ - softwareConfig?: (google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig|null); - - /** EnvironmentConfig nodeConfig */ - nodeConfig?: (google.cloud.orchestration.airflow.service.v1beta1.INodeConfig|null); - - /** EnvironmentConfig privateEnvironmentConfig */ - privateEnvironmentConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig|null); - - /** EnvironmentConfig webServerNetworkAccessControl */ - webServerNetworkAccessControl?: (google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl|null); - - /** EnvironmentConfig databaseConfig */ - databaseConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig|null); - - /** EnvironmentConfig webServerConfig */ - webServerConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig|null); - - /** EnvironmentConfig airflowUri */ - airflowUri?: (string|null); - - /** EnvironmentConfig airflowByoidUri */ - airflowByoidUri?: (string|null); - - /** EnvironmentConfig encryptionConfig */ - encryptionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig|null); - - /** EnvironmentConfig maintenanceWindow */ - maintenanceWindow?: (google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow|null); - - /** EnvironmentConfig workloadsConfig */ - workloadsConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig|null); - - /** EnvironmentConfig environmentSize */ - environmentSize?: (google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize|null); - - /** EnvironmentConfig masterAuthorizedNetworksConfig */ - masterAuthorizedNetworksConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig|null); - - /** EnvironmentConfig recoveryConfig */ - recoveryConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig|null); - - /** EnvironmentConfig dataRetentionConfig */ - dataRetentionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig|null); - - /** EnvironmentConfig resilienceMode */ - resilienceMode?: (google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode|null); - } - - /** Represents an EnvironmentConfig. */ - class EnvironmentConfig implements IEnvironmentConfig { - - /** - * Constructs a new EnvironmentConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig); - - /** EnvironmentConfig gkeCluster. */ - public gkeCluster: string; - - /** EnvironmentConfig dagGcsPrefix. */ - public dagGcsPrefix: string; - - /** EnvironmentConfig nodeCount. */ - public nodeCount: number; - - /** EnvironmentConfig softwareConfig. */ - public softwareConfig?: (google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig|null); - - /** EnvironmentConfig nodeConfig. */ - public nodeConfig?: (google.cloud.orchestration.airflow.service.v1beta1.INodeConfig|null); - - /** EnvironmentConfig privateEnvironmentConfig. */ - public privateEnvironmentConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig|null); - - /** EnvironmentConfig webServerNetworkAccessControl. */ - public webServerNetworkAccessControl?: (google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl|null); - - /** EnvironmentConfig databaseConfig. */ - public databaseConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig|null); - - /** EnvironmentConfig webServerConfig. */ - public webServerConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig|null); - - /** EnvironmentConfig airflowUri. */ - public airflowUri: string; - - /** EnvironmentConfig airflowByoidUri. */ - public airflowByoidUri: string; - - /** EnvironmentConfig encryptionConfig. */ - public encryptionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig|null); - - /** EnvironmentConfig maintenanceWindow. */ - public maintenanceWindow?: (google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow|null); - - /** EnvironmentConfig workloadsConfig. */ - public workloadsConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig|null); - - /** EnvironmentConfig environmentSize. */ - public environmentSize: (google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize); - - /** EnvironmentConfig masterAuthorizedNetworksConfig. */ - public masterAuthorizedNetworksConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig|null); - - /** EnvironmentConfig recoveryConfig. */ - public recoveryConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig|null); - - /** EnvironmentConfig dataRetentionConfig. */ - public dataRetentionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig|null); - - /** EnvironmentConfig resilienceMode. */ - public resilienceMode: (google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode); - - /** - * Creates a new EnvironmentConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns EnvironmentConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig): google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig; - - /** - * Encodes the specified EnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.verify|verify} messages. - * @param message EnvironmentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.verify|verify} messages. - * @param message EnvironmentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnvironmentConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnvironmentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig; - - /** - * Decodes an EnvironmentConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnvironmentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig; - - /** - * Verifies an EnvironmentConfig message. - * @param message Plain 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 EnvironmentConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnvironmentConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig; - - /** - * Creates a plain object from an EnvironmentConfig message. Also converts values to other types if specified. - * @param message EnvironmentConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnvironmentConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnvironmentConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnvironmentConfig { - - /** EnvironmentSize enum. */ - enum EnvironmentSize { - ENVIRONMENT_SIZE_UNSPECIFIED = 0, - ENVIRONMENT_SIZE_SMALL = 1, - ENVIRONMENT_SIZE_MEDIUM = 2, - ENVIRONMENT_SIZE_LARGE = 3 - } - - /** ResilienceMode enum. */ - enum ResilienceMode { - RESILIENCE_MODE_UNSPECIFIED = 0, - HIGH_RESILIENCE = 1 - } - } - - /** Properties of a WebServerNetworkAccessControl. */ - interface IWebServerNetworkAccessControl { - - /** WebServerNetworkAccessControl allowedIpRanges */ - allowedIpRanges?: (google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange[]|null); - } - - /** Represents a WebServerNetworkAccessControl. */ - class WebServerNetworkAccessControl implements IWebServerNetworkAccessControl { - - /** - * Constructs a new WebServerNetworkAccessControl. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl); - - /** WebServerNetworkAccessControl allowedIpRanges. */ - public allowedIpRanges: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange[]; - - /** - * Creates a new WebServerNetworkAccessControl instance using the specified properties. - * @param [properties] Properties to set - * @returns WebServerNetworkAccessControl instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl; - - /** - * Encodes the specified WebServerNetworkAccessControl message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.verify|verify} messages. - * @param message WebServerNetworkAccessControl message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WebServerNetworkAccessControl message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.verify|verify} messages. - * @param message WebServerNetworkAccessControl message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WebServerNetworkAccessControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl; - - /** - * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WebServerNetworkAccessControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl; - - /** - * Verifies a WebServerNetworkAccessControl message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WebServerNetworkAccessControl message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WebServerNetworkAccessControl - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl; - - /** - * Creates a plain object from a WebServerNetworkAccessControl message. Also converts values to other types if specified. - * @param message WebServerNetworkAccessControl - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WebServerNetworkAccessControl to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WebServerNetworkAccessControl - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WebServerNetworkAccessControl { - - /** Properties of an AllowedIpRange. */ - interface IAllowedIpRange { - - /** AllowedIpRange value */ - value?: (string|null); - - /** AllowedIpRange description */ - description?: (string|null); - } - - /** Represents an AllowedIpRange. */ - class AllowedIpRange implements IAllowedIpRange { - - /** - * Constructs a new AllowedIpRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange); - - /** AllowedIpRange value. */ - public value: string; - - /** AllowedIpRange description. */ - public description: string; - - /** - * Creates a new AllowedIpRange instance using the specified properties. - * @param [properties] Properties to set - * @returns AllowedIpRange instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange; - - /** - * Encodes the specified AllowedIpRange message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. - * @param message AllowedIpRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AllowedIpRange message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. - * @param message AllowedIpRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AllowedIpRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AllowedIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange; - - /** - * Decodes an AllowedIpRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AllowedIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange; - - /** - * Verifies an AllowedIpRange message. - * @param message Plain 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 AllowedIpRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AllowedIpRange - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange; - - /** - * Creates a plain object from an AllowedIpRange message. Also converts values to other types if specified. - * @param message AllowedIpRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AllowedIpRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AllowedIpRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SoftwareConfig. */ - interface ISoftwareConfig { - - /** SoftwareConfig imageVersion */ - imageVersion?: (string|null); - - /** SoftwareConfig airflowConfigOverrides */ - airflowConfigOverrides?: ({ [k: string]: string }|null); - - /** SoftwareConfig pypiPackages */ - pypiPackages?: ({ [k: string]: string }|null); - - /** SoftwareConfig envVariables */ - envVariables?: ({ [k: string]: string }|null); - - /** SoftwareConfig pythonVersion */ - pythonVersion?: (string|null); - - /** SoftwareConfig schedulerCount */ - schedulerCount?: (number|null); - - /** SoftwareConfig cloudDataLineageIntegration */ - cloudDataLineageIntegration?: (google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration|null); - - /** SoftwareConfig webServerPluginsMode */ - webServerPluginsMode?: (google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode|null); - } - - /** Represents a SoftwareConfig. */ - class SoftwareConfig implements ISoftwareConfig { - - /** - * Constructs a new SoftwareConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig); - - /** SoftwareConfig imageVersion. */ - public imageVersion: string; - - /** SoftwareConfig airflowConfigOverrides. */ - public airflowConfigOverrides: { [k: string]: string }; - - /** SoftwareConfig pypiPackages. */ - public pypiPackages: { [k: string]: string }; - - /** SoftwareConfig envVariables. */ - public envVariables: { [k: string]: string }; - - /** SoftwareConfig pythonVersion. */ - public pythonVersion: string; - - /** SoftwareConfig schedulerCount. */ - public schedulerCount: number; - - /** SoftwareConfig cloudDataLineageIntegration. */ - public cloudDataLineageIntegration?: (google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration|null); - - /** SoftwareConfig webServerPluginsMode. */ - public webServerPluginsMode: (google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode); - - /** - * Creates a new SoftwareConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SoftwareConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig): google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig; - - /** - * Encodes the specified SoftwareConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.verify|verify} messages. - * @param message SoftwareConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SoftwareConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.verify|verify} messages. - * @param message SoftwareConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SoftwareConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SoftwareConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig; - - /** - * Decodes a SoftwareConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SoftwareConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig; - - /** - * Verifies a SoftwareConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SoftwareConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SoftwareConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig; - - /** - * Creates a plain object from a SoftwareConfig message. Also converts values to other types if specified. - * @param message SoftwareConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SoftwareConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SoftwareConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SoftwareConfig { - - /** WebServerPluginsMode enum. */ - enum WebServerPluginsMode { - WEB_SERVER_PLUGINS_MODE_UNSPECIFIED = 0, - PLUGINS_DISABLED = 1, - PLUGINS_ENABLED = 2 - } - } - - /** Properties of a IPAllocationPolicy. */ - interface IIPAllocationPolicy { - - /** IPAllocationPolicy useIpAliases */ - useIpAliases?: (boolean|null); - - /** IPAllocationPolicy clusterSecondaryRangeName */ - clusterSecondaryRangeName?: (string|null); - - /** IPAllocationPolicy servicesSecondaryRangeName */ - servicesSecondaryRangeName?: (string|null); - - /** IPAllocationPolicy clusterIpv4CidrBlock */ - clusterIpv4CidrBlock?: (string|null); - - /** IPAllocationPolicy servicesIpv4CidrBlock */ - servicesIpv4CidrBlock?: (string|null); - } - - /** Represents a IPAllocationPolicy. */ - class IPAllocationPolicy implements IIPAllocationPolicy { - - /** - * Constructs a new IPAllocationPolicy. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy); - - /** IPAllocationPolicy useIpAliases. */ - public useIpAliases: boolean; - - /** IPAllocationPolicy clusterSecondaryRangeName. */ - public clusterSecondaryRangeName: string; - - /** IPAllocationPolicy servicesSecondaryRangeName. */ - public servicesSecondaryRangeName: string; - - /** IPAllocationPolicy clusterIpv4CidrBlock. */ - public clusterIpv4CidrBlock: string; - - /** IPAllocationPolicy servicesIpv4CidrBlock. */ - public servicesIpv4CidrBlock: string; - - /** - * Creates a new IPAllocationPolicy instance using the specified properties. - * @param [properties] Properties to set - * @returns IPAllocationPolicy instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy): google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy; - - /** - * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.verify|verify} messages. - * @param message IPAllocationPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.verify|verify} messages. - * @param message IPAllocationPolicy message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a IPAllocationPolicy message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IPAllocationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy; - - /** - * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IPAllocationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy; - - /** - * Verifies a IPAllocationPolicy message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IPAllocationPolicy - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy; - - /** - * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. - * @param message IPAllocationPolicy - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IPAllocationPolicy to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IPAllocationPolicy - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NodeConfig. */ - interface INodeConfig { - - /** NodeConfig location */ - location?: (string|null); - - /** NodeConfig machineType */ - machineType?: (string|null); - - /** NodeConfig network */ - network?: (string|null); - - /** NodeConfig subnetwork */ - subnetwork?: (string|null); - - /** NodeConfig diskSizeGb */ - diskSizeGb?: (number|null); - - /** NodeConfig oauthScopes */ - oauthScopes?: (string[]|null); - - /** NodeConfig serviceAccount */ - serviceAccount?: (string|null); - - /** NodeConfig tags */ - tags?: (string[]|null); - - /** NodeConfig ipAllocationPolicy */ - ipAllocationPolicy?: (google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy|null); - - /** NodeConfig maxPodsPerNode */ - maxPodsPerNode?: (number|null); - - /** NodeConfig enableIpMasqAgent */ - enableIpMasqAgent?: (boolean|null); - - /** NodeConfig composerNetworkAttachment */ - composerNetworkAttachment?: (string|null); - - /** NodeConfig composerInternalIpv4CidrBlock */ - composerInternalIpv4CidrBlock?: (string|null); - } - - /** Represents a NodeConfig. */ - class NodeConfig implements INodeConfig { - - /** - * Constructs a new NodeConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.INodeConfig); - - /** NodeConfig location. */ - public location: string; - - /** NodeConfig machineType. */ - public machineType: string; - - /** NodeConfig network. */ - public network: string; - - /** NodeConfig subnetwork. */ - public subnetwork: string; - - /** NodeConfig diskSizeGb. */ - public diskSizeGb: number; - - /** NodeConfig oauthScopes. */ - public oauthScopes: string[]; - - /** NodeConfig serviceAccount. */ - public serviceAccount: string; - - /** NodeConfig tags. */ - public tags: string[]; - - /** NodeConfig ipAllocationPolicy. */ - public ipAllocationPolicy?: (google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy|null); - - /** NodeConfig maxPodsPerNode. */ - public maxPodsPerNode: number; - - /** NodeConfig enableIpMasqAgent. */ - public enableIpMasqAgent: boolean; - - /** NodeConfig composerNetworkAttachment. */ - public composerNetworkAttachment: string; - - /** NodeConfig composerInternalIpv4CidrBlock. */ - public composerInternalIpv4CidrBlock: string; - - /** - * Creates a new NodeConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.INodeConfig): google.cloud.orchestration.airflow.service.v1beta1.NodeConfig; - - /** - * Encodes the specified NodeConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.verify|verify} messages. - * @param message NodeConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.verify|verify} messages. - * @param message NodeConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.INodeConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.NodeConfig; - - /** - * Decodes a NodeConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.NodeConfig; - - /** - * Verifies a NodeConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.NodeConfig; - - /** - * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. - * @param message NodeConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.NodeConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PrivateClusterConfig. */ - interface IPrivateClusterConfig { - - /** PrivateClusterConfig enablePrivateEndpoint */ - enablePrivateEndpoint?: (boolean|null); - - /** PrivateClusterConfig masterIpv4CidrBlock */ - masterIpv4CidrBlock?: (string|null); - - /** PrivateClusterConfig masterIpv4ReservedRange */ - masterIpv4ReservedRange?: (string|null); - } - - /** Represents a PrivateClusterConfig. */ - class PrivateClusterConfig implements IPrivateClusterConfig { - - /** - * Constructs a new PrivateClusterConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig); - - /** PrivateClusterConfig enablePrivateEndpoint. */ - public enablePrivateEndpoint: boolean; - - /** PrivateClusterConfig masterIpv4CidrBlock. */ - public masterIpv4CidrBlock: string; - - /** PrivateClusterConfig masterIpv4ReservedRange. */ - public masterIpv4ReservedRange: string; - - /** - * Creates a new PrivateClusterConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateClusterConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig): google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig; - - /** - * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.verify|verify} messages. - * @param message PrivateClusterConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.verify|verify} messages. - * @param message PrivateClusterConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrivateClusterConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateClusterConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig; - - /** - * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateClusterConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig; - - /** - * Verifies a PrivateClusterConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateClusterConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig; - - /** - * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. - * @param message PrivateClusterConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrivateClusterConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrivateClusterConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetworkingConfig. */ - interface INetworkingConfig { - - /** NetworkingConfig connectionType */ - connectionType?: (google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType|null); - } - - /** Represents a NetworkingConfig. */ - class NetworkingConfig implements INetworkingConfig { - - /** - * Constructs a new NetworkingConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig); - - /** NetworkingConfig connectionType. */ - public connectionType: (google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType); - - /** - * Creates a new NetworkingConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns NetworkingConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig): google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig; - - /** - * Encodes the specified NetworkingConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.verify|verify} messages. - * @param message NetworkingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetworkingConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.verify|verify} messages. - * @param message NetworkingConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetworkingConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetworkingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig; - - /** - * Decodes a NetworkingConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetworkingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig; - - /** - * Verifies a NetworkingConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a NetworkingConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetworkingConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig; - - /** - * Creates a plain object from a NetworkingConfig message. Also converts values to other types if specified. - * @param message NetworkingConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetworkingConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetworkingConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace NetworkingConfig { - - /** ConnectionType enum. */ - enum ConnectionType { - CONNECTION_TYPE_UNSPECIFIED = 0, - VPC_PEERING = 1, - PRIVATE_SERVICE_CONNECT = 2 - } - } - - /** Properties of a PrivateEnvironmentConfig. */ - interface IPrivateEnvironmentConfig { - - /** PrivateEnvironmentConfig enablePrivateEnvironment */ - enablePrivateEnvironment?: (boolean|null); - - /** PrivateEnvironmentConfig enablePrivateBuildsOnly */ - enablePrivateBuildsOnly?: (boolean|null); - - /** PrivateEnvironmentConfig privateClusterConfig */ - privateClusterConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig|null); - - /** PrivateEnvironmentConfig webServerIpv4CidrBlock */ - webServerIpv4CidrBlock?: (string|null); - - /** PrivateEnvironmentConfig cloudSqlIpv4CidrBlock */ - cloudSqlIpv4CidrBlock?: (string|null); - - /** PrivateEnvironmentConfig webServerIpv4ReservedRange */ - webServerIpv4ReservedRange?: (string|null); - - /** PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock */ - cloudComposerNetworkIpv4CidrBlock?: (string|null); - - /** PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange */ - cloudComposerNetworkIpv4ReservedRange?: (string|null); - - /** PrivateEnvironmentConfig enablePrivatelyUsedPublicIps */ - enablePrivatelyUsedPublicIps?: (boolean|null); - - /** PrivateEnvironmentConfig cloudComposerConnectionSubnetwork */ - cloudComposerConnectionSubnetwork?: (string|null); - - /** PrivateEnvironmentConfig networkingConfig */ - networkingConfig?: (google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig|null); - } - - /** Represents a PrivateEnvironmentConfig. */ - class PrivateEnvironmentConfig implements IPrivateEnvironmentConfig { - - /** - * Constructs a new PrivateEnvironmentConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig); - - /** PrivateEnvironmentConfig enablePrivateEnvironment. */ - public enablePrivateEnvironment: boolean; - - /** PrivateEnvironmentConfig enablePrivateBuildsOnly. */ - public enablePrivateBuildsOnly: boolean; - - /** PrivateEnvironmentConfig privateClusterConfig. */ - public privateClusterConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig|null); - - /** PrivateEnvironmentConfig webServerIpv4CidrBlock. */ - public webServerIpv4CidrBlock: string; - - /** PrivateEnvironmentConfig cloudSqlIpv4CidrBlock. */ - public cloudSqlIpv4CidrBlock: string; - - /** PrivateEnvironmentConfig webServerIpv4ReservedRange. */ - public webServerIpv4ReservedRange: string; - - /** PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock. */ - public cloudComposerNetworkIpv4CidrBlock: string; - - /** PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange. */ - public cloudComposerNetworkIpv4ReservedRange: string; - - /** PrivateEnvironmentConfig enablePrivatelyUsedPublicIps. */ - public enablePrivatelyUsedPublicIps: boolean; - - /** PrivateEnvironmentConfig cloudComposerConnectionSubnetwork. */ - public cloudComposerConnectionSubnetwork: string; - - /** PrivateEnvironmentConfig networkingConfig. */ - public networkingConfig?: (google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig|null); - - /** - * Creates a new PrivateEnvironmentConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns PrivateEnvironmentConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig): google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig; - - /** - * Encodes the specified PrivateEnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.verify|verify} messages. - * @param message PrivateEnvironmentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrivateEnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.verify|verify} messages. - * @param message PrivateEnvironmentConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrivateEnvironmentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig; - - /** - * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrivateEnvironmentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig; - - /** - * Verifies a PrivateEnvironmentConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a PrivateEnvironmentConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrivateEnvironmentConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig; - - /** - * Creates a plain object from a PrivateEnvironmentConfig message. Also converts values to other types if specified. - * @param message PrivateEnvironmentConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrivateEnvironmentConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrivateEnvironmentConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DatabaseConfig. */ - interface IDatabaseConfig { - - /** DatabaseConfig machineType */ - machineType?: (string|null); - - /** DatabaseConfig zone */ - zone?: (string|null); - } - - /** Represents a DatabaseConfig. */ - class DatabaseConfig implements IDatabaseConfig { - - /** - * Constructs a new DatabaseConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig); - - /** DatabaseConfig machineType. */ - public machineType: string; - - /** DatabaseConfig zone. */ - public zone: string; - - /** - * Creates a new DatabaseConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns DatabaseConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig): google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig; - - /** - * Encodes the specified DatabaseConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.verify|verify} messages. - * @param message DatabaseConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DatabaseConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.verify|verify} messages. - * @param message DatabaseConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DatabaseConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DatabaseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig; - - /** - * Decodes a DatabaseConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DatabaseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig; - - /** - * Verifies a DatabaseConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DatabaseConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DatabaseConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig; - - /** - * Creates a plain object from a DatabaseConfig message. Also converts values to other types if specified. - * @param message DatabaseConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DatabaseConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DatabaseConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WebServerConfig. */ - interface IWebServerConfig { - - /** WebServerConfig machineType */ - machineType?: (string|null); - } - - /** Represents a WebServerConfig. */ - class WebServerConfig implements IWebServerConfig { - - /** - * Constructs a new WebServerConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig); - - /** WebServerConfig machineType. */ - public machineType: string; - - /** - * Creates a new WebServerConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns WebServerConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig): google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig; - - /** - * Encodes the specified WebServerConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.verify|verify} messages. - * @param message WebServerConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WebServerConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.verify|verify} messages. - * @param message WebServerConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WebServerConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WebServerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig; - - /** - * Decodes a WebServerConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WebServerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig; - - /** - * Verifies a WebServerConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WebServerConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WebServerConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig; - - /** - * Creates a plain object from a WebServerConfig message. Also converts values to other types if specified. - * @param message WebServerConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WebServerConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WebServerConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EncryptionConfig. */ - interface IEncryptionConfig { - - /** EncryptionConfig kmsKeyName */ - kmsKeyName?: (string|null); - } - - /** Represents an EncryptionConfig. */ - class EncryptionConfig implements IEncryptionConfig { - - /** - * Constructs a new EncryptionConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig); - - /** EncryptionConfig kmsKeyName. */ - public kmsKeyName: string; - - /** - * Creates a new EncryptionConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns EncryptionConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig): google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig; - - /** - * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.verify|verify} messages. - * @param message EncryptionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.verify|verify} messages. - * @param message EncryptionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EncryptionConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EncryptionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig; - - /** - * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EncryptionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig; - - /** - * Verifies an EncryptionConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EncryptionConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig; - - /** - * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. - * @param message EncryptionConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EncryptionConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EncryptionConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MaintenanceWindow. */ - interface IMaintenanceWindow { - - /** MaintenanceWindow startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** MaintenanceWindow endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** MaintenanceWindow recurrence */ - recurrence?: (string|null); - } - - /** Represents a MaintenanceWindow. */ - class MaintenanceWindow implements IMaintenanceWindow { - - /** - * Constructs a new MaintenanceWindow. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow); - - /** MaintenanceWindow startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** MaintenanceWindow endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** MaintenanceWindow recurrence. */ - public recurrence: string; - - /** - * Creates a new MaintenanceWindow instance using the specified properties. - * @param [properties] Properties to set - * @returns MaintenanceWindow instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow): google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow; - - /** - * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.verify|verify} messages. - * @param message MaintenanceWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.verify|verify} messages. - * @param message MaintenanceWindow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MaintenanceWindow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow; - - /** - * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow; - - /** - * Verifies a MaintenanceWindow message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MaintenanceWindow - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow; - - /** - * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. - * @param message MaintenanceWindow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MaintenanceWindow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MaintenanceWindow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkloadsConfig. */ - interface IWorkloadsConfig { - - /** WorkloadsConfig scheduler */ - scheduler?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource|null); - - /** WorkloadsConfig webServer */ - webServer?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource|null); - - /** WorkloadsConfig worker */ - worker?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource|null); - - /** WorkloadsConfig triggerer */ - triggerer?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource|null); - - /** WorkloadsConfig dagProcessor */ - dagProcessor?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource|null); - } - - /** Represents a WorkloadsConfig. */ - class WorkloadsConfig implements IWorkloadsConfig { - - /** - * Constructs a new WorkloadsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig); - - /** WorkloadsConfig scheduler. */ - public scheduler?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource|null); - - /** WorkloadsConfig webServer. */ - public webServer?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource|null); - - /** WorkloadsConfig worker. */ - public worker?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource|null); - - /** WorkloadsConfig triggerer. */ - public triggerer?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource|null); - - /** WorkloadsConfig dagProcessor. */ - public dagProcessor?: (google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource|null); - - /** - * Creates a new WorkloadsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkloadsConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig; - - /** - * Encodes the specified WorkloadsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.verify|verify} messages. - * @param message WorkloadsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkloadsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.verify|verify} messages. - * @param message WorkloadsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkloadsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkloadsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig; - - /** - * Decodes a WorkloadsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkloadsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig; - - /** - * Verifies a WorkloadsConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkloadsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkloadsConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig; - - /** - * Creates a plain object from a WorkloadsConfig message. Also converts values to other types if specified. - * @param message WorkloadsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkloadsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkloadsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace WorkloadsConfig { - - /** Properties of a SchedulerResource. */ - interface ISchedulerResource { - - /** SchedulerResource cpu */ - cpu?: (number|null); - - /** SchedulerResource memoryGb */ - memoryGb?: (number|null); - - /** SchedulerResource storageGb */ - storageGb?: (number|null); - - /** SchedulerResource count */ - count?: (number|null); - } - - /** Represents a SchedulerResource. */ - class SchedulerResource implements ISchedulerResource { - - /** - * Constructs a new SchedulerResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource); - - /** SchedulerResource cpu. */ - public cpu: number; - - /** SchedulerResource memoryGb. */ - public memoryGb: number; - - /** SchedulerResource storageGb. */ - public storageGb: number; - - /** SchedulerResource count. */ - public count: number; - - /** - * Creates a new SchedulerResource instance using the specified properties. - * @param [properties] Properties to set - * @returns SchedulerResource instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource; - - /** - * Encodes the specified SchedulerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.verify|verify} messages. - * @param message SchedulerResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SchedulerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.verify|verify} messages. - * @param message SchedulerResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SchedulerResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SchedulerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource; - - /** - * Decodes a SchedulerResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SchedulerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource; - - /** - * Verifies a SchedulerResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SchedulerResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SchedulerResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource; - - /** - * Creates a plain object from a SchedulerResource message. Also converts values to other types if specified. - * @param message SchedulerResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SchedulerResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SchedulerResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WebServerResource. */ - interface IWebServerResource { - - /** WebServerResource cpu */ - cpu?: (number|null); - - /** WebServerResource memoryGb */ - memoryGb?: (number|null); - - /** WebServerResource storageGb */ - storageGb?: (number|null); - } - - /** Represents a WebServerResource. */ - class WebServerResource implements IWebServerResource { - - /** - * Constructs a new WebServerResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource); - - /** WebServerResource cpu. */ - public cpu: number; - - /** WebServerResource memoryGb. */ - public memoryGb: number; - - /** WebServerResource storageGb. */ - public storageGb: number; - - /** - * Creates a new WebServerResource instance using the specified properties. - * @param [properties] Properties to set - * @returns WebServerResource instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource; - - /** - * Encodes the specified WebServerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.verify|verify} messages. - * @param message WebServerResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WebServerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.verify|verify} messages. - * @param message WebServerResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WebServerResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WebServerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource; - - /** - * Decodes a WebServerResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WebServerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource; - - /** - * Verifies a WebServerResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WebServerResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WebServerResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource; - - /** - * Creates a plain object from a WebServerResource message. Also converts values to other types if specified. - * @param message WebServerResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WebServerResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WebServerResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a WorkerResource. */ - interface IWorkerResource { - - /** WorkerResource cpu */ - cpu?: (number|null); - - /** WorkerResource memoryGb */ - memoryGb?: (number|null); - - /** WorkerResource storageGb */ - storageGb?: (number|null); - - /** WorkerResource minCount */ - minCount?: (number|null); - - /** WorkerResource maxCount */ - maxCount?: (number|null); - } - - /** Represents a WorkerResource. */ - class WorkerResource implements IWorkerResource { - - /** - * Constructs a new WorkerResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource); - - /** WorkerResource cpu. */ - public cpu: number; - - /** WorkerResource memoryGb. */ - public memoryGb: number; - - /** WorkerResource storageGb. */ - public storageGb: number; - - /** WorkerResource minCount. */ - public minCount: number; - - /** WorkerResource maxCount. */ - public maxCount: number; - - /** - * Creates a new WorkerResource instance using the specified properties. - * @param [properties] Properties to set - * @returns WorkerResource instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource; - - /** - * Encodes the specified WorkerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.verify|verify} messages. - * @param message WorkerResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified WorkerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.verify|verify} messages. - * @param message WorkerResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a WorkerResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns WorkerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource; - - /** - * Decodes a WorkerResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns WorkerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource; - - /** - * Verifies a WorkerResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a WorkerResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns WorkerResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource; - - /** - * Creates a plain object from a WorkerResource message. Also converts values to other types if specified. - * @param message WorkerResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this WorkerResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for WorkerResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TriggererResource. */ - interface ITriggererResource { - - /** TriggererResource count */ - count?: (number|null); - - /** TriggererResource cpu */ - cpu?: (number|null); - - /** TriggererResource memoryGb */ - memoryGb?: (number|null); - } - - /** Represents a TriggererResource. */ - class TriggererResource implements ITriggererResource { - - /** - * Constructs a new TriggererResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource); - - /** TriggererResource count. */ - public count: number; - - /** TriggererResource cpu. */ - public cpu: number; - - /** TriggererResource memoryGb. */ - public memoryGb: number; - - /** - * Creates a new TriggererResource instance using the specified properties. - * @param [properties] Properties to set - * @returns TriggererResource instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource; - - /** - * Encodes the specified TriggererResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.verify|verify} messages. - * @param message TriggererResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TriggererResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.verify|verify} messages. - * @param message TriggererResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TriggererResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TriggererResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource; - - /** - * Decodes a TriggererResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TriggererResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource; - - /** - * Verifies a TriggererResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TriggererResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TriggererResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource; - - /** - * Creates a plain object from a TriggererResource message. Also converts values to other types if specified. - * @param message TriggererResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TriggererResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TriggererResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DagProcessorResource. */ - interface IDagProcessorResource { - - /** DagProcessorResource cpu */ - cpu?: (number|null); - - /** DagProcessorResource memoryGb */ - memoryGb?: (number|null); - - /** DagProcessorResource storageGb */ - storageGb?: (number|null); - - /** DagProcessorResource count */ - count?: (number|null); - } - - /** Represents a DagProcessorResource. */ - class DagProcessorResource implements IDagProcessorResource { - - /** - * Constructs a new DagProcessorResource. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource); - - /** DagProcessorResource cpu. */ - public cpu: number; - - /** DagProcessorResource memoryGb. */ - public memoryGb: number; - - /** DagProcessorResource storageGb. */ - public storageGb: number; - - /** DagProcessorResource count. */ - public count: number; - - /** - * Creates a new DagProcessorResource instance using the specified properties. - * @param [properties] Properties to set - * @returns DagProcessorResource instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource; - - /** - * Encodes the specified DagProcessorResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.verify|verify} messages. - * @param message DagProcessorResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DagProcessorResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.verify|verify} messages. - * @param message DagProcessorResource message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DagProcessorResource message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DagProcessorResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource; - - /** - * Decodes a DagProcessorResource message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DagProcessorResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource; - - /** - * Verifies a DagProcessorResource message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DagProcessorResource message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DagProcessorResource - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource; - - /** - * Creates a plain object from a DagProcessorResource message. Also converts values to other types if specified. - * @param message DagProcessorResource - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DagProcessorResource to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DagProcessorResource - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a DataRetentionConfig. */ - interface IDataRetentionConfig { - - /** DataRetentionConfig airflowDatabaseRetentionDays */ - airflowDatabaseRetentionDays?: (number|null); - - /** DataRetentionConfig taskLogsRetentionConfig */ - taskLogsRetentionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig|null); - - /** DataRetentionConfig airflowMetadataRetentionConfig */ - airflowMetadataRetentionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig|null); - } - - /** Represents a DataRetentionConfig. */ - class DataRetentionConfig implements IDataRetentionConfig { - - /** - * Constructs a new DataRetentionConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig); - - /** DataRetentionConfig airflowDatabaseRetentionDays. */ - public airflowDatabaseRetentionDays: number; - - /** DataRetentionConfig taskLogsRetentionConfig. */ - public taskLogsRetentionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig|null); - - /** DataRetentionConfig airflowMetadataRetentionConfig. */ - public airflowMetadataRetentionConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig|null); - - /** - * Creates a new DataRetentionConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns DataRetentionConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig): google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig; - - /** - * Encodes the specified DataRetentionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.verify|verify} messages. - * @param message DataRetentionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DataRetentionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.verify|verify} messages. - * @param message DataRetentionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DataRetentionConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DataRetentionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig; - - /** - * Decodes a DataRetentionConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DataRetentionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig; - - /** - * Verifies a DataRetentionConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a DataRetentionConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DataRetentionConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig; - - /** - * Creates a plain object from a DataRetentionConfig message. Also converts values to other types if specified. - * @param message DataRetentionConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DataRetentionConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DataRetentionConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TaskLogsRetentionConfig. */ - interface ITaskLogsRetentionConfig { - - /** TaskLogsRetentionConfig storageMode */ - storageMode?: (google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode|null); - } - - /** Represents a TaskLogsRetentionConfig. */ - class TaskLogsRetentionConfig implements ITaskLogsRetentionConfig { - - /** - * Constructs a new TaskLogsRetentionConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig); - - /** TaskLogsRetentionConfig storageMode. */ - public storageMode: (google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode); - - /** - * Creates a new TaskLogsRetentionConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns TaskLogsRetentionConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig): google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig; - - /** - * Encodes the specified TaskLogsRetentionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.verify|verify} messages. - * @param message TaskLogsRetentionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TaskLogsRetentionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.verify|verify} messages. - * @param message TaskLogsRetentionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TaskLogsRetentionConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TaskLogsRetentionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig; - - /** - * Decodes a TaskLogsRetentionConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TaskLogsRetentionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig; - - /** - * Verifies a TaskLogsRetentionConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a TaskLogsRetentionConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TaskLogsRetentionConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig; - - /** - * Creates a plain object from a TaskLogsRetentionConfig message. Also converts values to other types if specified. - * @param message TaskLogsRetentionConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TaskLogsRetentionConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TaskLogsRetentionConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace TaskLogsRetentionConfig { - - /** TaskLogsStorageMode enum. */ - enum TaskLogsStorageMode { - TASK_LOGS_STORAGE_MODE_UNSPECIFIED = 0, - CLOUD_LOGGING_AND_CLOUD_STORAGE = 1, - CLOUD_LOGGING_ONLY = 2 - } - } - - /** Properties of an AirflowMetadataRetentionPolicyConfig. */ - interface IAirflowMetadataRetentionPolicyConfig { - - /** AirflowMetadataRetentionPolicyConfig retentionMode */ - retentionMode?: (google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode|null); - - /** AirflowMetadataRetentionPolicyConfig retentionDays */ - retentionDays?: (number|null); - } - - /** Represents an AirflowMetadataRetentionPolicyConfig. */ - class AirflowMetadataRetentionPolicyConfig implements IAirflowMetadataRetentionPolicyConfig { - - /** - * Constructs a new AirflowMetadataRetentionPolicyConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig); - - /** AirflowMetadataRetentionPolicyConfig retentionMode. */ - public retentionMode: (google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode); - - /** AirflowMetadataRetentionPolicyConfig retentionDays. */ - public retentionDays: number; - - /** - * Creates a new AirflowMetadataRetentionPolicyConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns AirflowMetadataRetentionPolicyConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig): google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig; - - /** - * Encodes the specified AirflowMetadataRetentionPolicyConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.verify|verify} messages. - * @param message AirflowMetadataRetentionPolicyConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AirflowMetadataRetentionPolicyConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.verify|verify} messages. - * @param message AirflowMetadataRetentionPolicyConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AirflowMetadataRetentionPolicyConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AirflowMetadataRetentionPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig; - - /** - * Decodes an AirflowMetadataRetentionPolicyConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AirflowMetadataRetentionPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig; - - /** - * Verifies an AirflowMetadataRetentionPolicyConfig message. - * @param message Plain 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 AirflowMetadataRetentionPolicyConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AirflowMetadataRetentionPolicyConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig; - - /** - * Creates a plain object from an AirflowMetadataRetentionPolicyConfig message. Also converts values to other types if specified. - * @param message AirflowMetadataRetentionPolicyConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AirflowMetadataRetentionPolicyConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AirflowMetadataRetentionPolicyConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace AirflowMetadataRetentionPolicyConfig { - - /** RetentionMode enum. */ - enum RetentionMode { - RETENTION_MODE_UNSPECIFIED = 0, - RETENTION_MODE_ENABLED = 1, - RETENTION_MODE_DISABLED = 2 - } - } - - /** Properties of a StorageConfig. */ - interface IStorageConfig { - - /** StorageConfig bucket */ - bucket?: (string|null); - } - - /** Represents a StorageConfig. */ - class StorageConfig implements IStorageConfig { - - /** - * Constructs a new StorageConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig); - - /** StorageConfig bucket. */ - public bucket: string; - - /** - * Creates a new StorageConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns StorageConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig): google.cloud.orchestration.airflow.service.v1beta1.StorageConfig; - - /** - * Encodes the specified StorageConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.verify|verify} messages. - * @param message StorageConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StorageConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.verify|verify} messages. - * @param message StorageConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StorageConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.StorageConfig; - - /** - * Decodes a StorageConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.StorageConfig; - - /** - * Verifies a StorageConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a StorageConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StorageConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.StorageConfig; - - /** - * Creates a plain object from a StorageConfig message. Also converts values to other types if specified. - * @param message StorageConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.StorageConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StorageConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StorageConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RecoveryConfig. */ - interface IRecoveryConfig { - - /** RecoveryConfig scheduledSnapshotsConfig */ - scheduledSnapshotsConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig|null); - } - - /** Represents a RecoveryConfig. */ - class RecoveryConfig implements IRecoveryConfig { - - /** - * Constructs a new RecoveryConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig); - - /** RecoveryConfig scheduledSnapshotsConfig. */ - public scheduledSnapshotsConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig|null); - - /** - * Creates a new RecoveryConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns RecoveryConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig): google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig; - - /** - * Encodes the specified RecoveryConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.verify|verify} messages. - * @param message RecoveryConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RecoveryConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.verify|verify} messages. - * @param message RecoveryConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RecoveryConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RecoveryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig; - - /** - * Decodes a RecoveryConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RecoveryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig; - - /** - * Verifies a RecoveryConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a RecoveryConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RecoveryConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig; - - /** - * Creates a plain object from a RecoveryConfig message. Also converts values to other types if specified. - * @param message RecoveryConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RecoveryConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RecoveryConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ScheduledSnapshotsConfig. */ - interface IScheduledSnapshotsConfig { - - /** ScheduledSnapshotsConfig enabled */ - enabled?: (boolean|null); - - /** ScheduledSnapshotsConfig snapshotLocation */ - snapshotLocation?: (string|null); - - /** ScheduledSnapshotsConfig snapshotCreationSchedule */ - snapshotCreationSchedule?: (string|null); - - /** ScheduledSnapshotsConfig timeZone */ - timeZone?: (string|null); - } - - /** Represents a ScheduledSnapshotsConfig. */ - class ScheduledSnapshotsConfig implements IScheduledSnapshotsConfig { - - /** - * Constructs a new ScheduledSnapshotsConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig); - - /** ScheduledSnapshotsConfig enabled. */ - public enabled: boolean; - - /** ScheduledSnapshotsConfig snapshotLocation. */ - public snapshotLocation: string; - - /** ScheduledSnapshotsConfig snapshotCreationSchedule. */ - public snapshotCreationSchedule: string; - - /** ScheduledSnapshotsConfig timeZone. */ - public timeZone: string; - - /** - * Creates a new ScheduledSnapshotsConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns ScheduledSnapshotsConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig): google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig; - - /** - * Encodes the specified ScheduledSnapshotsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.verify|verify} messages. - * @param message ScheduledSnapshotsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ScheduledSnapshotsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.verify|verify} messages. - * @param message ScheduledSnapshotsConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ScheduledSnapshotsConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ScheduledSnapshotsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig; - - /** - * Decodes a ScheduledSnapshotsConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ScheduledSnapshotsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig; - - /** - * Verifies a ScheduledSnapshotsConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ScheduledSnapshotsConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ScheduledSnapshotsConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig; - - /** - * Creates a plain object from a ScheduledSnapshotsConfig message. Also converts values to other types if specified. - * @param message ScheduledSnapshotsConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ScheduledSnapshotsConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ScheduledSnapshotsConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MasterAuthorizedNetworksConfig. */ - interface IMasterAuthorizedNetworksConfig { - - /** MasterAuthorizedNetworksConfig enabled */ - enabled?: (boolean|null); - - /** MasterAuthorizedNetworksConfig cidrBlocks */ - cidrBlocks?: (google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock[]|null); - } - - /** Represents a MasterAuthorizedNetworksConfig. */ - class MasterAuthorizedNetworksConfig implements IMasterAuthorizedNetworksConfig { - - /** - * Constructs a new MasterAuthorizedNetworksConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig); - - /** MasterAuthorizedNetworksConfig enabled. */ - public enabled: boolean; - - /** MasterAuthorizedNetworksConfig cidrBlocks. */ - public cidrBlocks: google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock[]; - - /** - * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns MasterAuthorizedNetworksConfig instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig): google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig; - - /** - * Encodes the specified MasterAuthorizedNetworksConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.verify|verify} messages. - * @param message MasterAuthorizedNetworksConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MasterAuthorizedNetworksConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.verify|verify} messages. - * @param message MasterAuthorizedNetworksConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MasterAuthorizedNetworksConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig; - - /** - * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MasterAuthorizedNetworksConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig; - - /** - * Verifies a MasterAuthorizedNetworksConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a MasterAuthorizedNetworksConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MasterAuthorizedNetworksConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig; - - /** - * Creates a plain object from a MasterAuthorizedNetworksConfig message. Also converts values to other types if specified. - * @param message MasterAuthorizedNetworksConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MasterAuthorizedNetworksConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MasterAuthorizedNetworksConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MasterAuthorizedNetworksConfig { - - /** Properties of a CidrBlock. */ - interface ICidrBlock { - - /** CidrBlock displayName */ - displayName?: (string|null); - - /** CidrBlock cidrBlock */ - cidrBlock?: (string|null); - } - - /** Represents a CidrBlock. */ - class CidrBlock implements ICidrBlock { - - /** - * Constructs a new CidrBlock. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock); - - /** CidrBlock displayName. */ - public displayName: string; - - /** CidrBlock cidrBlock. */ - public cidrBlock: string; - - /** - * Creates a new CidrBlock instance using the specified properties. - * @param [properties] Properties to set - * @returns CidrBlock instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock): google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock; - - /** - * Encodes the specified CidrBlock message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. - * @param message CidrBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CidrBlock message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. - * @param message CidrBlock message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CidrBlock message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CidrBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock; - - /** - * Decodes a CidrBlock message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CidrBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock; - - /** - * Verifies a CidrBlock message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CidrBlock message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CidrBlock - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock; - - /** - * Creates a plain object from a CidrBlock message. Also converts values to other types if specified. - * @param message CidrBlock - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CidrBlock to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CidrBlock - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a CloudDataLineageIntegration. */ - interface ICloudDataLineageIntegration { - - /** CloudDataLineageIntegration enabled */ - enabled?: (boolean|null); - } - - /** Represents a CloudDataLineageIntegration. */ - class CloudDataLineageIntegration implements ICloudDataLineageIntegration { - - /** - * Constructs a new CloudDataLineageIntegration. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration); - - /** CloudDataLineageIntegration enabled. */ - public enabled: boolean; - - /** - * Creates a new CloudDataLineageIntegration instance using the specified properties. - * @param [properties] Properties to set - * @returns CloudDataLineageIntegration instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration): google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration; - - /** - * Encodes the specified CloudDataLineageIntegration message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.verify|verify} messages. - * @param message CloudDataLineageIntegration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CloudDataLineageIntegration message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.verify|verify} messages. - * @param message CloudDataLineageIntegration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CloudDataLineageIntegration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CloudDataLineageIntegration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration; - - /** - * Decodes a CloudDataLineageIntegration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CloudDataLineageIntegration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration; - - /** - * Verifies a CloudDataLineageIntegration message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CloudDataLineageIntegration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CloudDataLineageIntegration - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration; - - /** - * Creates a plain object from a CloudDataLineageIntegration message. Also converts values to other types if specified. - * @param message CloudDataLineageIntegration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CloudDataLineageIntegration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CloudDataLineageIntegration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Environment. */ - interface IEnvironment { - - /** Environment name */ - name?: (string|null); - - /** Environment config */ - config?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig|null); - - /** Environment uuid */ - uuid?: (string|null); - - /** Environment state */ - state?: (google.cloud.orchestration.airflow.service.v1beta1.Environment.State|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.Environment.State|null); - - /** Environment createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Environment updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Environment labels */ - labels?: ({ [k: string]: string }|null); - - /** Environment satisfiesPzs */ - satisfiesPzs?: (boolean|null); - - /** Environment satisfiesPzi */ - satisfiesPzi?: (boolean|null); - - /** Environment storageConfig */ - storageConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig|null); - } - - /** Represents an Environment. */ - class Environment implements IEnvironment { - - /** - * Constructs a new Environment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEnvironment); - - /** Environment name. */ - public name: string; - - /** Environment config. */ - public config?: (google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig|null); - - /** Environment uuid. */ - public uuid: string; - - /** Environment state. */ - public state: (google.cloud.orchestration.airflow.service.v1beta1.Environment.State|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.Environment.State); - - /** Environment createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** Environment updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); - - /** Environment labels. */ - public labels: { [k: string]: string }; - - /** Environment satisfiesPzs. */ - public satisfiesPzs: boolean; - - /** Environment satisfiesPzi. */ - public satisfiesPzi: boolean; - - /** Environment storageConfig. */ - public storageConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig|null); - - /** - * Creates a new Environment instance using the specified properties. - * @param [properties] Properties to set - * @returns Environment instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IEnvironment): google.cloud.orchestration.airflow.service.v1beta1.Environment; - - /** - * Encodes the specified Environment message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.Environment.verify|verify} messages. - * @param message Environment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.Environment.verify|verify} messages. - * @param message Environment message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Environment message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Environment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.Environment; - - /** - * Decodes an Environment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Environment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.Environment; - - /** - * Verifies an Environment message. - * @param message Plain 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 Environment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Environment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.Environment; - - /** - * Creates a plain object from an Environment message. Also converts values to other types if specified. - * @param message Environment - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.Environment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Environment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Environment - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Environment { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - CREATING = 1, - RUNNING = 2, - UPDATING = 3, - DELETING = 4, - ERROR = 5 - } - } - - /** Properties of a CheckUpgradeRequest. */ - interface ICheckUpgradeRequest { - - /** CheckUpgradeRequest environment */ - environment?: (string|null); - - /** CheckUpgradeRequest imageVersion */ - imageVersion?: (string|null); - } - - /** Represents a CheckUpgradeRequest. */ - class CheckUpgradeRequest implements ICheckUpgradeRequest { - - /** - * Constructs a new CheckUpgradeRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest); - - /** CheckUpgradeRequest environment. */ - public environment: string; - - /** CheckUpgradeRequest imageVersion. */ - public imageVersion: string; - - /** - * Creates a new CheckUpgradeRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CheckUpgradeRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; - - /** - * Encodes the specified CheckUpgradeRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.verify|verify} messages. - * @param message CheckUpgradeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CheckUpgradeRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.verify|verify} messages. - * @param message CheckUpgradeRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CheckUpgradeRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CheckUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; - - /** - * Decodes a CheckUpgradeRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CheckUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; - - /** - * Verifies a CheckUpgradeRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CheckUpgradeRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CheckUpgradeRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest; - - /** - * Creates a plain object from a CheckUpgradeRequest message. Also converts values to other types if specified. - * @param message CheckUpgradeRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CheckUpgradeRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CheckUpgradeRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CheckUpgradeResponse. */ - interface ICheckUpgradeResponse { - - /** CheckUpgradeResponse buildLogUri */ - buildLogUri?: (string|null); - - /** CheckUpgradeResponse containsPypiModulesConflict */ - containsPypiModulesConflict?: (google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult|null); - - /** CheckUpgradeResponse pypiConflictBuildLogExtract */ - pypiConflictBuildLogExtract?: (string|null); - - /** CheckUpgradeResponse imageVersion */ - imageVersion?: (string|null); - - /** CheckUpgradeResponse pypiDependencies */ - pypiDependencies?: ({ [k: string]: string }|null); - } - - /** Represents a CheckUpgradeResponse. */ - class CheckUpgradeResponse implements ICheckUpgradeResponse { - - /** - * Constructs a new CheckUpgradeResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse); - - /** CheckUpgradeResponse buildLogUri. */ - public buildLogUri: string; - - /** CheckUpgradeResponse containsPypiModulesConflict. */ - public containsPypiModulesConflict: (google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult); - - /** CheckUpgradeResponse pypiConflictBuildLogExtract. */ - public pypiConflictBuildLogExtract: string; - - /** CheckUpgradeResponse imageVersion. */ - public imageVersion: string; - - /** CheckUpgradeResponse pypiDependencies. */ - public pypiDependencies: { [k: string]: string }; - - /** - * Creates a new CheckUpgradeResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns CheckUpgradeResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; - - /** - * Encodes the specified CheckUpgradeResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.verify|verify} messages. - * @param message CheckUpgradeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CheckUpgradeResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.verify|verify} messages. - * @param message CheckUpgradeResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CheckUpgradeResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CheckUpgradeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; - - /** - * Decodes a CheckUpgradeResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CheckUpgradeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; - - /** - * Verifies a CheckUpgradeResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a CheckUpgradeResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CheckUpgradeResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse; - - /** - * Creates a plain object from a CheckUpgradeResponse message. Also converts values to other types if specified. - * @param message CheckUpgradeResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CheckUpgradeResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CheckUpgradeResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace CheckUpgradeResponse { - - /** ConflictResult enum. */ - enum ConflictResult { - CONFLICT_RESULT_UNSPECIFIED = 0, - CONFLICT = 1, - NO_CONFLICT = 2 - } - } - - /** Properties of an OperationMetadata. */ - interface IOperationMetadata { - - /** OperationMetadata state */ - state?: (google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State|null); - - /** OperationMetadata operationType */ - operationType?: (google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type|null); - - /** OperationMetadata resource */ - resource?: (string|null); - - /** OperationMetadata resourceUuid */ - resourceUuid?: (string|null); - - /** OperationMetadata createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime */ - endTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents an OperationMetadata. */ - class OperationMetadata implements IOperationMetadata { - - /** - * Constructs a new OperationMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata); - - /** OperationMetadata state. */ - public state: (google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State); - - /** OperationMetadata operationType. */ - public operationType: (google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type|keyof typeof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type); - - /** OperationMetadata resource. */ - public resource: string; - - /** OperationMetadata resourceUuid. */ - public resourceUuid: string; - - /** OperationMetadata createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** OperationMetadata endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns OperationMetadata instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata): google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.IOperationMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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; - } - - namespace OperationMetadata { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - PENDING = 1, - RUNNING = 2, - SUCCESSFUL = 3, - FAILED = 4 - } - - /** Type enum. */ - enum Type { - TYPE_UNSPECIFIED = 0, - CREATE = 1, - DELETE = 2, - UPDATE = 3, - CHECK = 4, - SAVE_SNAPSHOT = 5, - LOAD_SNAPSHOT = 6, - DATABASE_FAILOVER = 7 - } - } - - /** Represents an ImageVersions */ - class ImageVersions extends $protobuf.rpc.Service { - - /** - * Constructs a new ImageVersions 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 ImageVersions 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): ImageVersions; - - /** - * Calls ListImageVersions. - * @param request ListImageVersionsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListImageVersionsResponse - */ - public listImageVersions(request: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, callback: google.cloud.orchestration.airflow.service.v1beta1.ImageVersions.ListImageVersionsCallback): void; - - /** - * Calls ListImageVersions. - * @param request ListImageVersionsRequest message or plain object - * @returns Promise - */ - public listImageVersions(request: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest): Promise; - } - - namespace ImageVersions { - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersions|listImageVersions}. - * @param error Error, if any - * @param [response] ListImageVersionsResponse - */ - type ListImageVersionsCallback = (error: (Error|null), response?: google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse) => void; - } - - /** Properties of a ListImageVersionsRequest. */ - interface IListImageVersionsRequest { - - /** ListImageVersionsRequest parent */ - parent?: (string|null); - - /** ListImageVersionsRequest pageSize */ - pageSize?: (number|null); - - /** ListImageVersionsRequest pageToken */ - pageToken?: (string|null); - - /** ListImageVersionsRequest includePastReleases */ - includePastReleases?: (boolean|null); - } - - /** Represents a ListImageVersionsRequest. */ - class ListImageVersionsRequest implements IListImageVersionsRequest { - - /** - * Constructs a new ListImageVersionsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest); - - /** ListImageVersionsRequest parent. */ - public parent: string; - - /** ListImageVersionsRequest pageSize. */ - public pageSize: number; - - /** ListImageVersionsRequest pageToken. */ - public pageToken: string; - - /** ListImageVersionsRequest includePastReleases. */ - public includePastReleases: boolean; - - /** - * Creates a new ListImageVersionsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListImageVersionsRequest instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest; - - /** - * Encodes the specified ListImageVersionsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.verify|verify} messages. - * @param message ListImageVersionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListImageVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.verify|verify} messages. - * @param message ListImageVersionsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListImageVersionsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListImageVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest; - - /** - * Decodes a ListImageVersionsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListImageVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest; - - /** - * Verifies a ListImageVersionsRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListImageVersionsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListImageVersionsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest; - - /** - * Creates a plain object from a ListImageVersionsRequest message. Also converts values to other types if specified. - * @param message ListImageVersionsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListImageVersionsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListImageVersionsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListImageVersionsResponse. */ - interface IListImageVersionsResponse { - - /** ListImageVersionsResponse imageVersions */ - imageVersions?: (google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[]|null); - - /** ListImageVersionsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListImageVersionsResponse. */ - class ListImageVersionsResponse implements IListImageVersionsResponse { - - /** - * Constructs a new ListImageVersionsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse); - - /** ListImageVersionsResponse imageVersions. */ - public imageVersions: google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[]; - - /** ListImageVersionsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListImageVersionsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListImageVersionsResponse instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse; - - /** - * Encodes the specified ListImageVersionsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.verify|verify} messages. - * @param message ListImageVersionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListImageVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.verify|verify} messages. - * @param message ListImageVersionsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListImageVersionsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListImageVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse; - - /** - * Decodes a ListImageVersionsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListImageVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse; - - /** - * Verifies a ListImageVersionsResponse message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a ListImageVersionsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListImageVersionsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse; - - /** - * Creates a plain object from a ListImageVersionsResponse message. Also converts values to other types if specified. - * @param message ListImageVersionsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListImageVersionsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListImageVersionsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ImageVersion. */ - interface IImageVersion { - - /** ImageVersion imageVersionId */ - imageVersionId?: (string|null); - - /** ImageVersion isDefault */ - isDefault?: (boolean|null); - - /** ImageVersion supportedPythonVersions */ - supportedPythonVersions?: (string[]|null); - - /** ImageVersion releaseDate */ - releaseDate?: (google.type.IDate|null); - - /** ImageVersion creationDisabled */ - creationDisabled?: (boolean|null); - - /** ImageVersion upgradeDisabled */ - upgradeDisabled?: (boolean|null); - } - - /** Represents an ImageVersion. */ - class ImageVersion implements IImageVersion { - - /** - * Constructs a new ImageVersion. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.orchestration.airflow.service.v1beta1.IImageVersion); - - /** ImageVersion imageVersionId. */ - public imageVersionId: string; - - /** ImageVersion isDefault. */ - public isDefault: boolean; - - /** ImageVersion supportedPythonVersions. */ - public supportedPythonVersions: string[]; - - /** ImageVersion releaseDate. */ - public releaseDate?: (google.type.IDate|null); - - /** ImageVersion creationDisabled. */ - public creationDisabled: boolean; - - /** ImageVersion upgradeDisabled. */ - public upgradeDisabled: boolean; - - /** - * Creates a new ImageVersion instance using the specified properties. - * @param [properties] Properties to set - * @returns ImageVersion instance - */ - public static create(properties?: google.cloud.orchestration.airflow.service.v1beta1.IImageVersion): google.cloud.orchestration.airflow.service.v1beta1.ImageVersion; - - /** - * Encodes the specified ImageVersion message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.verify|verify} messages. - * @param message ImageVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.orchestration.airflow.service.v1beta1.IImageVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ImageVersion message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.verify|verify} messages. - * @param message ImageVersion message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.orchestration.airflow.service.v1beta1.IImageVersion, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ImageVersion message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ImageVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.orchestration.airflow.service.v1beta1.ImageVersion; - - /** - * Decodes an ImageVersion message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ImageVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.orchestration.airflow.service.v1beta1.ImageVersion; - - /** - * Verifies an ImageVersion message. - * @param message Plain 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 ImageVersion message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ImageVersion - */ - public static fromObject(object: { [k: string]: any }): google.cloud.orchestration.airflow.service.v1beta1.ImageVersion; - - /** - * Creates a plain object from an ImageVersion message. Also converts values to other types if specified. - * @param message ImageVersion - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.orchestration.airflow.service.v1beta1.ImageVersion, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ImageVersion to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ImageVersion - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** 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 - } - - /** 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; - } - } - - /** 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); - } - - /** 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|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|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 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 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 an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|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|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; - } - - /** 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; - } - } - - /** 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; - } - } - - /** Namespace type. */ - namespace type { - - /** Properties of a Date. */ - interface IDate { - - /** Date year */ - year?: (number|null); - - /** Date month */ - month?: (number|null); - - /** Date day */ - day?: (number|null); - } - - /** Represents a Date. */ - class Date implements IDate { - - /** - * Constructs a new Date. - * @param [properties] Properties to set - */ - constructor(properties?: google.type.IDate); - - /** Date year. */ - public year: number; - - /** Date month. */ - public month: number; - - /** Date day. */ - public day: number; - - /** - * Creates a new Date instance using the specified properties. - * @param [properties] Properties to set - * @returns Date instance - */ - public static create(properties?: google.type.IDate): google.type.Date; - - /** - * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @param message Date message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @param message Date message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.type.IDate, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Date message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.type.Date; - - /** - * Decodes a Date message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.type.Date; - - /** - * Verifies a Date message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Date message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Date - */ - public static fromObject(object: { [k: string]: any }): google.type.Date; - - /** - * Creates a plain object from a Date message. Also converts values to other types if specified. - * @param message Date - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.type.Date, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Date to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Date - * @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-orchestration-airflow-service/v1beta1/protos/protos.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.js deleted file mode 100644 index 36cbcc534b7..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.js +++ /dev/null @@ -1,43000 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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_orchestration_airflow_protos || ($protobuf.roots._google_cloud_orchestration_airflow_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.orchestration = (function() { - - /** - * Namespace orchestration. - * @memberof google.cloud - * @namespace - */ - var orchestration = {}; - - orchestration.airflow = (function() { - - /** - * Namespace airflow. - * @memberof google.cloud.orchestration - * @namespace - */ - var airflow = {}; - - airflow.service = (function() { - - /** - * Namespace service. - * @memberof google.cloud.orchestration.airflow - * @namespace - */ - var service = {}; - - service.v1beta1 = (function() { - - /** - * Namespace v1beta1. - * @memberof google.cloud.orchestration.airflow.service - * @namespace - */ - var v1beta1 = {}; - - v1beta1.Environments = (function() { - - /** - * Constructs a new Environments service. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents an Environments - * @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 Environments(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (Environments.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Environments; - - /** - * Creates new Environments service using the specified rpc implementation. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @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 {Environments} RPC service. Useful where requests and/or responses are streamed. - */ - Environments.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|createEnvironment}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef CreateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.createEnvironment = function createEnvironment(request, callback) { - return this.rpcCall(createEnvironment, $root.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CreateEnvironment" }); - - /** - * Calls CreateEnvironment. - * @function createEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest} request CreateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|getEnvironment}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef GetEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environment} [response] Environment - */ - - /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.GetEnvironmentCallback} callback Node-style callback called with the error, if any, and Environment - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.getEnvironment = function getEnvironment(request, callback) { - return this.rpcCall(getEnvironment, $root.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.Environment, request, callback); - }, "name", { value: "GetEnvironment" }); - - /** - * Calls GetEnvironment. - * @function getEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest} request GetEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listEnvironments}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef ListEnvironmentsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} [response] ListEnvironmentsResponse - */ - - /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.ListEnvironmentsCallback} callback Node-style callback called with the error, if any, and ListEnvironmentsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.listEnvironments = function listEnvironments(request, callback) { - return this.rpcCall(listEnvironments, $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse, request, callback); - }, "name", { value: "ListEnvironments" }); - - /** - * Calls ListEnvironments. - * @function listEnvironments - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest} request ListEnvironmentsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|updateEnvironment}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef UpdateEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.updateEnvironment = function updateEnvironment(request, callback) { - return this.rpcCall(updateEnvironment, $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "UpdateEnvironment" }); - - /** - * Calls UpdateEnvironment. - * @function updateEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest} request UpdateEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|deleteEnvironment}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef DeleteEnvironmentCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteEnvironmentCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.deleteEnvironment = function deleteEnvironment(request, callback) { - return this.rpcCall(deleteEnvironment, $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DeleteEnvironment" }); - - /** - * Calls DeleteEnvironment. - * @function deleteEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest} request DeleteEnvironmentRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|restartWebServer}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef RestartWebServerCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls RestartWebServer. - * @function restartWebServer - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest} request RestartWebServerRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.RestartWebServerCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.restartWebServer = function restartWebServer(request, callback) { - return this.rpcCall(restartWebServer, $root.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "RestartWebServer" }); - - /** - * Calls RestartWebServer. - * @function restartWebServer - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest} request RestartWebServerRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|checkUpgrade}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef CheckUpgradeCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls CheckUpgrade. - * @function checkUpgrade - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest} request CheckUpgradeRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.CheckUpgradeCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.checkUpgrade = function checkUpgrade(request, callback) { - return this.rpcCall(checkUpgrade, $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "CheckUpgrade" }); - - /** - * Calls CheckUpgrade. - * @function checkUpgrade - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest} request CheckUpgradeRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|executeAirflowCommand}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef ExecuteAirflowCommandCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse} [response] ExecuteAirflowCommandResponse - */ - - /** - * Calls ExecuteAirflowCommand. - * @function executeAirflowCommand - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest} request ExecuteAirflowCommandRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.ExecuteAirflowCommandCallback} callback Node-style callback called with the error, if any, and ExecuteAirflowCommandResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.executeAirflowCommand = function executeAirflowCommand(request, callback) { - return this.rpcCall(executeAirflowCommand, $root.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse, request, callback); - }, "name", { value: "ExecuteAirflowCommand" }); - - /** - * Calls ExecuteAirflowCommand. - * @function executeAirflowCommand - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest} request ExecuteAirflowCommandRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|stopAirflowCommand}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef StopAirflowCommandCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse} [response] StopAirflowCommandResponse - */ - - /** - * Calls StopAirflowCommand. - * @function stopAirflowCommand - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest} request StopAirflowCommandRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.StopAirflowCommandCallback} callback Node-style callback called with the error, if any, and StopAirflowCommandResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.stopAirflowCommand = function stopAirflowCommand(request, callback) { - return this.rpcCall(stopAirflowCommand, $root.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse, request, callback); - }, "name", { value: "StopAirflowCommand" }); - - /** - * Calls StopAirflowCommand. - * @function stopAirflowCommand - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest} request StopAirflowCommandRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|pollAirflowCommand}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef PollAirflowCommandCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse} [response] PollAirflowCommandResponse - */ - - /** - * Calls PollAirflowCommand. - * @function pollAirflowCommand - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest} request PollAirflowCommandRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.PollAirflowCommandCallback} callback Node-style callback called with the error, if any, and PollAirflowCommandResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.pollAirflowCommand = function pollAirflowCommand(request, callback) { - return this.rpcCall(pollAirflowCommand, $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse, request, callback); - }, "name", { value: "PollAirflowCommand" }); - - /** - * Calls PollAirflowCommand. - * @function pollAirflowCommand - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest} request PollAirflowCommandRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listWorkloads}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef ListWorkloadsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse} [response] ListWorkloadsResponse - */ - - /** - * Calls ListWorkloads. - * @function listWorkloads - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest} request ListWorkloadsRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.ListWorkloadsCallback} callback Node-style callback called with the error, if any, and ListWorkloadsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.listWorkloads = function listWorkloads(request, callback) { - return this.rpcCall(listWorkloads, $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse, request, callback); - }, "name", { value: "ListWorkloads" }); - - /** - * Calls ListWorkloads. - * @function listWorkloads - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest} request ListWorkloadsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|createUserWorkloadsSecret}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef CreateUserWorkloadsSecretCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} [response] UserWorkloadsSecret - */ - - /** - * Calls CreateUserWorkloadsSecret. - * @function createUserWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest} request CreateUserWorkloadsSecretRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateUserWorkloadsSecretCallback} callback Node-style callback called with the error, if any, and UserWorkloadsSecret - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.createUserWorkloadsSecret = function createUserWorkloadsSecret(request, callback) { - return this.rpcCall(createUserWorkloadsSecret, $root.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret, request, callback); - }, "name", { value: "CreateUserWorkloadsSecret" }); - - /** - * Calls CreateUserWorkloadsSecret. - * @function createUserWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest} request CreateUserWorkloadsSecretRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|getUserWorkloadsSecret}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef GetUserWorkloadsSecretCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} [response] UserWorkloadsSecret - */ - - /** - * Calls GetUserWorkloadsSecret. - * @function getUserWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest} request GetUserWorkloadsSecretRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.GetUserWorkloadsSecretCallback} callback Node-style callback called with the error, if any, and UserWorkloadsSecret - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.getUserWorkloadsSecret = function getUserWorkloadsSecret(request, callback) { - return this.rpcCall(getUserWorkloadsSecret, $root.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret, request, callback); - }, "name", { value: "GetUserWorkloadsSecret" }); - - /** - * Calls GetUserWorkloadsSecret. - * @function getUserWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest} request GetUserWorkloadsSecretRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listUserWorkloadsSecrets}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef ListUserWorkloadsSecretsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse} [response] ListUserWorkloadsSecretsResponse - */ - - /** - * Calls ListUserWorkloadsSecrets. - * @function listUserWorkloadsSecrets - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest} request ListUserWorkloadsSecretsRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.ListUserWorkloadsSecretsCallback} callback Node-style callback called with the error, if any, and ListUserWorkloadsSecretsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.listUserWorkloadsSecrets = function listUserWorkloadsSecrets(request, callback) { - return this.rpcCall(listUserWorkloadsSecrets, $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse, request, callback); - }, "name", { value: "ListUserWorkloadsSecrets" }); - - /** - * Calls ListUserWorkloadsSecrets. - * @function listUserWorkloadsSecrets - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest} request ListUserWorkloadsSecretsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|updateUserWorkloadsSecret}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef UpdateUserWorkloadsSecretCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} [response] UserWorkloadsSecret - */ - - /** - * Calls UpdateUserWorkloadsSecret. - * @function updateUserWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest} request UpdateUserWorkloadsSecretRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateUserWorkloadsSecretCallback} callback Node-style callback called with the error, if any, and UserWorkloadsSecret - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.updateUserWorkloadsSecret = function updateUserWorkloadsSecret(request, callback) { - return this.rpcCall(updateUserWorkloadsSecret, $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret, request, callback); - }, "name", { value: "UpdateUserWorkloadsSecret" }); - - /** - * Calls UpdateUserWorkloadsSecret. - * @function updateUserWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest} request UpdateUserWorkloadsSecretRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|deleteUserWorkloadsSecret}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef DeleteUserWorkloadsSecretCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteUserWorkloadsSecret. - * @function deleteUserWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest} request DeleteUserWorkloadsSecretRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteUserWorkloadsSecretCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.deleteUserWorkloadsSecret = function deleteUserWorkloadsSecret(request, callback) { - return this.rpcCall(deleteUserWorkloadsSecret, $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteUserWorkloadsSecret" }); - - /** - * Calls DeleteUserWorkloadsSecret. - * @function deleteUserWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest} request DeleteUserWorkloadsSecretRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|createUserWorkloadsConfigMap}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef CreateUserWorkloadsConfigMapCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} [response] UserWorkloadsConfigMap - */ - - /** - * Calls CreateUserWorkloadsConfigMap. - * @function createUserWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest} request CreateUserWorkloadsConfigMapRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateUserWorkloadsConfigMapCallback} callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.createUserWorkloadsConfigMap = function createUserWorkloadsConfigMap(request, callback) { - return this.rpcCall(createUserWorkloadsConfigMap, $root.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap, request, callback); - }, "name", { value: "CreateUserWorkloadsConfigMap" }); - - /** - * Calls CreateUserWorkloadsConfigMap. - * @function createUserWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest} request CreateUserWorkloadsConfigMapRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|getUserWorkloadsConfigMap}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef GetUserWorkloadsConfigMapCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} [response] UserWorkloadsConfigMap - */ - - /** - * Calls GetUserWorkloadsConfigMap. - * @function getUserWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest} request GetUserWorkloadsConfigMapRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.GetUserWorkloadsConfigMapCallback} callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.getUserWorkloadsConfigMap = function getUserWorkloadsConfigMap(request, callback) { - return this.rpcCall(getUserWorkloadsConfigMap, $root.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap, request, callback); - }, "name", { value: "GetUserWorkloadsConfigMap" }); - - /** - * Calls GetUserWorkloadsConfigMap. - * @function getUserWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest} request GetUserWorkloadsConfigMapRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|listUserWorkloadsConfigMaps}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef ListUserWorkloadsConfigMapsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse} [response] ListUserWorkloadsConfigMapsResponse - */ - - /** - * Calls ListUserWorkloadsConfigMaps. - * @function listUserWorkloadsConfigMaps - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest} request ListUserWorkloadsConfigMapsRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.ListUserWorkloadsConfigMapsCallback} callback Node-style callback called with the error, if any, and ListUserWorkloadsConfigMapsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.listUserWorkloadsConfigMaps = function listUserWorkloadsConfigMaps(request, callback) { - return this.rpcCall(listUserWorkloadsConfigMaps, $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse, request, callback); - }, "name", { value: "ListUserWorkloadsConfigMaps" }); - - /** - * Calls ListUserWorkloadsConfigMaps. - * @function listUserWorkloadsConfigMaps - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest} request ListUserWorkloadsConfigMapsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|updateUserWorkloadsConfigMap}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef UpdateUserWorkloadsConfigMapCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} [response] UserWorkloadsConfigMap - */ - - /** - * Calls UpdateUserWorkloadsConfigMap. - * @function updateUserWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest} request UpdateUserWorkloadsConfigMapRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateUserWorkloadsConfigMapCallback} callback Node-style callback called with the error, if any, and UserWorkloadsConfigMap - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.updateUserWorkloadsConfigMap = function updateUserWorkloadsConfigMap(request, callback) { - return this.rpcCall(updateUserWorkloadsConfigMap, $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap, request, callback); - }, "name", { value: "UpdateUserWorkloadsConfigMap" }); - - /** - * Calls UpdateUserWorkloadsConfigMap. - * @function updateUserWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest} request UpdateUserWorkloadsConfigMapRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|deleteUserWorkloadsConfigMap}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef DeleteUserWorkloadsConfigMapCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteUserWorkloadsConfigMap. - * @function deleteUserWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest} request DeleteUserWorkloadsConfigMapRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteUserWorkloadsConfigMapCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.deleteUserWorkloadsConfigMap = function deleteUserWorkloadsConfigMap(request, callback) { - return this.rpcCall(deleteUserWorkloadsConfigMap, $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteUserWorkloadsConfigMap" }); - - /** - * Calls DeleteUserWorkloadsConfigMap. - * @function deleteUserWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest} request DeleteUserWorkloadsConfigMapRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|saveSnapshot}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef SaveSnapshotCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls SaveSnapshot. - * @function saveSnapshot - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest} request SaveSnapshotRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.SaveSnapshotCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.saveSnapshot = function saveSnapshot(request, callback) { - return this.rpcCall(saveSnapshot, $root.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "SaveSnapshot" }); - - /** - * Calls SaveSnapshot. - * @function saveSnapshot - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest} request SaveSnapshotRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|loadSnapshot}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef LoadSnapshotCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls LoadSnapshot. - * @function loadSnapshot - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest} request LoadSnapshotRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.LoadSnapshotCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.loadSnapshot = function loadSnapshot(request, callback) { - return this.rpcCall(loadSnapshot, $root.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "LoadSnapshot" }); - - /** - * Calls LoadSnapshot. - * @function loadSnapshot - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest} request LoadSnapshotRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|databaseFailover}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef DatabaseFailoverCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls DatabaseFailover. - * @function databaseFailover - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest} request DatabaseFailoverRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.DatabaseFailoverCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.databaseFailover = function databaseFailover(request, callback) { - return this.rpcCall(databaseFailover, $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "DatabaseFailover" }); - - /** - * Calls DatabaseFailover. - * @function databaseFailover - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest} request DatabaseFailoverRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.Environments|fetchDatabaseProperties}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @typedef FetchDatabasePropertiesCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse} [response] FetchDatabasePropertiesResponse - */ - - /** - * Calls FetchDatabaseProperties. - * @function fetchDatabaseProperties - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest} request FetchDatabasePropertiesRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environments.FetchDatabasePropertiesCallback} callback Node-style callback called with the error, if any, and FetchDatabasePropertiesResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(Environments.prototype.fetchDatabaseProperties = function fetchDatabaseProperties(request, callback) { - return this.rpcCall(fetchDatabaseProperties, $root.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse, request, callback); - }, "name", { value: "FetchDatabaseProperties" }); - - /** - * Calls FetchDatabaseProperties. - * @function fetchDatabaseProperties - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environments - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest} request FetchDatabasePropertiesRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return Environments; - })(); - - v1beta1.CreateEnvironmentRequest = (function() { - - /** - * Properties of a CreateEnvironmentRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface ICreateEnvironmentRequest - * @property {string|null} [parent] CreateEnvironmentRequest parent - * @property {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null} [environment] CreateEnvironmentRequest environment - */ - - /** - * Constructs a new CreateEnvironmentRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a CreateEnvironmentRequest. - * @implements ICreateEnvironmentRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest=} [properties] Properties to set - */ - function CreateEnvironmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateEnvironmentRequest parent. - * @member {string} parent - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest - * @instance - */ - CreateEnvironmentRequest.prototype.parent = ""; - - /** - * CreateEnvironmentRequest environment. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null|undefined} environment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest - * @instance - */ - CreateEnvironmentRequest.prototype.environment = null; - - /** - * Creates a new CreateEnvironmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} CreateEnvironmentRequest instance - */ - CreateEnvironmentRequest.create = function create(properties) { - return new CreateEnvironmentRequest(properties); - }; - - /** - * Encodes the specified CreateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEnvironmentRequest.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.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.encode(message.environment, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest} message CreateEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} CreateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEnvironmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateEnvironmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} CreateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateEnvironmentRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateEnvironmentRequest.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.environment != null && message.hasOwnProperty("environment")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.verify(message.environment); - if (error) - return "environment." + error; - } - return null; - }; - - /** - * Creates a CreateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} CreateEnvironmentRequest - */ - CreateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.fromObject(object.environment); - } - return message; - }; - - /** - * Creates a plain object from a CreateEnvironmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest} message CreateEnvironmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateEnvironmentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.environment = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.toObject(message.environment, options); - return object; - }; - - /** - * Converts this CreateEnvironmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest - * @instance - * @returns {Object.} JSON object - */ - CreateEnvironmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateEnvironmentRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest"; - }; - - return CreateEnvironmentRequest; - })(); - - v1beta1.GetEnvironmentRequest = (function() { - - /** - * Properties of a GetEnvironmentRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IGetEnvironmentRequest - * @property {string|null} [name] GetEnvironmentRequest name - */ - - /** - * Constructs a new GetEnvironmentRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a GetEnvironmentRequest. - * @implements IGetEnvironmentRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest=} [properties] Properties to set - */ - function GetEnvironmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetEnvironmentRequest name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest - * @instance - */ - GetEnvironmentRequest.prototype.name = ""; - - /** - * Creates a new GetEnvironmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} GetEnvironmentRequest instance - */ - GetEnvironmentRequest.create = function create(properties) { - return new GetEnvironmentRequest(properties); - }; - - /** - * Encodes the specified GetEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEnvironmentRequest.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 GetEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest} message GetEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} GetEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEnvironmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetEnvironmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} GetEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetEnvironmentRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetEnvironmentRequest.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 GetEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} GetEnvironmentRequest - */ - GetEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetEnvironmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest} message GetEnvironmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetEnvironmentRequest.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 GetEnvironmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest - * @instance - * @returns {Object.} JSON object - */ - GetEnvironmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetEnvironmentRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest"; - }; - - return GetEnvironmentRequest; - })(); - - v1beta1.ListEnvironmentsRequest = (function() { - - /** - * Properties of a ListEnvironmentsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IListEnvironmentsRequest - * @property {string|null} [parent] ListEnvironmentsRequest parent - * @property {number|null} [pageSize] ListEnvironmentsRequest pageSize - * @property {string|null} [pageToken] ListEnvironmentsRequest pageToken - */ - - /** - * Constructs a new ListEnvironmentsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a ListEnvironmentsRequest. - * @implements IListEnvironmentsRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest=} [properties] Properties to set - */ - function ListEnvironmentsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEnvironmentsRequest parent. - * @member {string} parent - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest - * @instance - */ - ListEnvironmentsRequest.prototype.parent = ""; - - /** - * ListEnvironmentsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest - * @instance - */ - ListEnvironmentsRequest.prototype.pageSize = 0; - - /** - * ListEnvironmentsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest - * @instance - */ - ListEnvironmentsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListEnvironmentsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} ListEnvironmentsRequest instance - */ - ListEnvironmentsRequest.create = function create(properties) { - return new ListEnvironmentsRequest(properties); - }; - - /** - * Encodes the specified ListEnvironmentsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEnvironmentsRequest.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); - return writer; - }; - - /** - * Encodes the specified ListEnvironmentsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest} message ListEnvironmentsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEnvironmentsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} ListEnvironmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEnvironmentsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEnvironmentsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} ListEnvironmentsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEnvironmentsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEnvironmentsRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEnvironmentsRequest.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"; - return null; - }; - - /** - * Creates a ListEnvironmentsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} ListEnvironmentsRequest - */ - ListEnvironmentsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListEnvironmentsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest} message ListEnvironmentsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEnvironmentsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListEnvironmentsRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest - * @instance - * @returns {Object.} JSON object - */ - ListEnvironmentsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEnvironmentsRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEnvironmentsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest"; - }; - - return ListEnvironmentsRequest; - })(); - - v1beta1.ListEnvironmentsResponse = (function() { - - /** - * Properties of a ListEnvironmentsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IListEnvironmentsResponse - * @property {Array.|null} [environments] ListEnvironmentsResponse environments - * @property {string|null} [nextPageToken] ListEnvironmentsResponse nextPageToken - */ - - /** - * Constructs a new ListEnvironmentsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a ListEnvironmentsResponse. - * @implements IListEnvironmentsResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse=} [properties] Properties to set - */ - function ListEnvironmentsResponse(properties) { - this.environments = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListEnvironmentsResponse environments. - * @member {Array.} environments - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse - * @instance - */ - ListEnvironmentsResponse.prototype.environments = $util.emptyArray; - - /** - * ListEnvironmentsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse - * @instance - */ - ListEnvironmentsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListEnvironmentsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} ListEnvironmentsResponse instance - */ - ListEnvironmentsResponse.create = function create(properties) { - return new ListEnvironmentsResponse(properties); - }; - - /** - * Encodes the specified ListEnvironmentsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEnvironmentsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environments != null && message.environments.length) - for (var i = 0; i < message.environments.length; ++i) - $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.encode(message.environments[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 ListEnvironmentsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse} message ListEnvironmentsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListEnvironmentsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} ListEnvironmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEnvironmentsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.environments && message.environments.length)) - message.environments = []; - message.environments.push($root.google.cloud.orchestration.airflow.service.v1beta1.Environment.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListEnvironmentsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} ListEnvironmentsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListEnvironmentsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListEnvironmentsResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListEnvironmentsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environments != null && message.hasOwnProperty("environments")) { - if (!Array.isArray(message.environments)) - return "environments: array expected"; - for (var i = 0; i < message.environments.length; ++i) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.verify(message.environments[i]); - if (error) - return "environments." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListEnvironmentsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} ListEnvironmentsResponse - */ - ListEnvironmentsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse(); - if (object.environments) { - if (!Array.isArray(object.environments)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.environments: array expected"); - message.environments = []; - for (var i = 0; i < object.environments.length; ++i) { - if (typeof object.environments[i] !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse.environments: object expected"); - message.environments[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.fromObject(object.environments[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListEnvironmentsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse} message ListEnvironmentsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListEnvironmentsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.environments = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.environments && message.environments.length) { - object.environments = []; - for (var j = 0; j < message.environments.length; ++j) - object.environments[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.toObject(message.environments[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListEnvironmentsResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse - * @instance - * @returns {Object.} JSON object - */ - ListEnvironmentsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListEnvironmentsResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListEnvironmentsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse"; - }; - - return ListEnvironmentsResponse; - })(); - - v1beta1.DeleteEnvironmentRequest = (function() { - - /** - * Properties of a DeleteEnvironmentRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IDeleteEnvironmentRequest - * @property {string|null} [name] DeleteEnvironmentRequest name - */ - - /** - * Constructs a new DeleteEnvironmentRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a DeleteEnvironmentRequest. - * @implements IDeleteEnvironmentRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest=} [properties] Properties to set - */ - function DeleteEnvironmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteEnvironmentRequest name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest - * @instance - */ - DeleteEnvironmentRequest.prototype.name = ""; - - /** - * Creates a new DeleteEnvironmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest instance - */ - DeleteEnvironmentRequest.create = function create(properties) { - return new DeleteEnvironmentRequest(properties); - }; - - /** - * Encodes the specified DeleteEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEnvironmentRequest.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 DeleteEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest} message DeleteEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEnvironmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteEnvironmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteEnvironmentRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteEnvironmentRequest.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 DeleteEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} DeleteEnvironmentRequest - */ - DeleteEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteEnvironmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest} message DeleteEnvironmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteEnvironmentRequest.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 DeleteEnvironmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteEnvironmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteEnvironmentRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest"; - }; - - return DeleteEnvironmentRequest; - })(); - - v1beta1.UpdateEnvironmentRequest = (function() { - - /** - * Properties of an UpdateEnvironmentRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IUpdateEnvironmentRequest - * @property {string|null} [name] UpdateEnvironmentRequest name - * @property {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null} [environment] UpdateEnvironmentRequest environment - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateEnvironmentRequest updateMask - */ - - /** - * Constructs a new UpdateEnvironmentRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents an UpdateEnvironmentRequest. - * @implements IUpdateEnvironmentRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest=} [properties] Properties to set - */ - function UpdateEnvironmentRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateEnvironmentRequest name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest - * @instance - */ - UpdateEnvironmentRequest.prototype.name = ""; - - /** - * UpdateEnvironmentRequest environment. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null|undefined} environment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest - * @instance - */ - UpdateEnvironmentRequest.prototype.environment = null; - - /** - * UpdateEnvironmentRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest - * @instance - */ - UpdateEnvironmentRequest.prototype.updateMask = null; - - /** - * Creates a new UpdateEnvironmentRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest instance - */ - UpdateEnvironmentRequest.create = function create(properties) { - return new UpdateEnvironmentRequest(properties); - }; - - /** - * Encodes the specified UpdateEnvironmentRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEnvironmentRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.encode(message.environment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.name); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateEnvironmentRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest} message UpdateEnvironmentRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateEnvironmentRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEnvironmentRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.name = reader.string(); - break; - } - case 1: { - message.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.decode(reader, reader.uint32()); - break; - } - case 3: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateEnvironmentRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateEnvironmentRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateEnvironmentRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateEnvironmentRequest.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.environment != null && message.hasOwnProperty("environment")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.verify(message.environment); - if (error) - return "environment." + 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 UpdateEnvironmentRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} UpdateEnvironmentRequest - */ - UpdateEnvironmentRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.environment != null) { - if (typeof object.environment !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.environment: object expected"); - message.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.fromObject(object.environment); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } - return message; - }; - - /** - * Creates a plain object from an UpdateEnvironmentRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest} message UpdateEnvironmentRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateEnvironmentRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.environment = null; - object.name = ""; - object.updateMask = null; - } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.toObject(message.environment, options); - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); - return object; - }; - - /** - * Converts this UpdateEnvironmentRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateEnvironmentRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateEnvironmentRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateEnvironmentRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest"; - }; - - return UpdateEnvironmentRequest; - })(); - - v1beta1.RestartWebServerRequest = (function() { - - /** - * Properties of a RestartWebServerRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IRestartWebServerRequest - * @property {string|null} [name] RestartWebServerRequest name - */ - - /** - * Constructs a new RestartWebServerRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a RestartWebServerRequest. - * @implements IRestartWebServerRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest=} [properties] Properties to set - */ - function RestartWebServerRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RestartWebServerRequest name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest - * @instance - */ - RestartWebServerRequest.prototype.name = ""; - - /** - * Creates a new RestartWebServerRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} RestartWebServerRequest instance - */ - RestartWebServerRequest.create = function create(properties) { - return new RestartWebServerRequest(properties); - }; - - /** - * Encodes the specified RestartWebServerRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest} message RestartWebServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestartWebServerRequest.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 RestartWebServerRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest} message RestartWebServerRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RestartWebServerRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RestartWebServerRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} RestartWebServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestartWebServerRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RestartWebServerRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} RestartWebServerRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RestartWebServerRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RestartWebServerRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RestartWebServerRequest.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 RestartWebServerRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} RestartWebServerRequest - */ - RestartWebServerRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a RestartWebServerRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest} message RestartWebServerRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RestartWebServerRequest.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 RestartWebServerRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest - * @instance - * @returns {Object.} JSON object - */ - RestartWebServerRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RestartWebServerRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RestartWebServerRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest"; - }; - - return RestartWebServerRequest; - })(); - - v1beta1.ExecuteAirflowCommandRequest = (function() { - - /** - * Properties of an ExecuteAirflowCommandRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IExecuteAirflowCommandRequest - * @property {string|null} [environment] ExecuteAirflowCommandRequest environment - * @property {string|null} [command] ExecuteAirflowCommandRequest command - * @property {string|null} [subcommand] ExecuteAirflowCommandRequest subcommand - * @property {Array.|null} [parameters] ExecuteAirflowCommandRequest parameters - */ - - /** - * Constructs a new ExecuteAirflowCommandRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents an ExecuteAirflowCommandRequest. - * @implements IExecuteAirflowCommandRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest=} [properties] Properties to set - */ - function ExecuteAirflowCommandRequest(properties) { - this.parameters = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteAirflowCommandRequest environment. - * @member {string} environment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest - * @instance - */ - ExecuteAirflowCommandRequest.prototype.environment = ""; - - /** - * ExecuteAirflowCommandRequest command. - * @member {string} command - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest - * @instance - */ - ExecuteAirflowCommandRequest.prototype.command = ""; - - /** - * ExecuteAirflowCommandRequest subcommand. - * @member {string} subcommand - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest - * @instance - */ - ExecuteAirflowCommandRequest.prototype.subcommand = ""; - - /** - * ExecuteAirflowCommandRequest parameters. - * @member {Array.} parameters - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest - * @instance - */ - ExecuteAirflowCommandRequest.prototype.parameters = $util.emptyArray; - - /** - * Creates a new ExecuteAirflowCommandRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest} ExecuteAirflowCommandRequest instance - */ - ExecuteAirflowCommandRequest.create = function create(properties) { - return new ExecuteAirflowCommandRequest(properties); - }; - - /** - * Encodes the specified ExecuteAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest} message ExecuteAirflowCommandRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteAirflowCommandRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - if (message.command != null && Object.hasOwnProperty.call(message, "command")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.command); - if (message.subcommand != null && Object.hasOwnProperty.call(message, "subcommand")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.subcommand); - if (message.parameters != null && message.parameters.length) - for (var i = 0; i < message.parameters.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.parameters[i]); - return writer; - }; - - /** - * Encodes the specified ExecuteAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest} message ExecuteAirflowCommandRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteAirflowCommandRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteAirflowCommandRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest} ExecuteAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteAirflowCommandRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - case 2: { - message.command = reader.string(); - break; - } - case 3: { - message.subcommand = reader.string(); - break; - } - case 4: { - if (!(message.parameters && message.parameters.length)) - message.parameters = []; - message.parameters.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteAirflowCommandRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest} ExecuteAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteAirflowCommandRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteAirflowCommandRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteAirflowCommandRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - if (message.command != null && message.hasOwnProperty("command")) - if (!$util.isString(message.command)) - return "command: string expected"; - if (message.subcommand != null && message.hasOwnProperty("subcommand")) - if (!$util.isString(message.subcommand)) - return "subcommand: string expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!Array.isArray(message.parameters)) - return "parameters: array expected"; - for (var i = 0; i < message.parameters.length; ++i) - if (!$util.isString(message.parameters[i])) - return "parameters: string[] expected"; - } - return null; - }; - - /** - * Creates an ExecuteAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest} ExecuteAirflowCommandRequest - */ - ExecuteAirflowCommandRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest(); - if (object.environment != null) - message.environment = String(object.environment); - if (object.command != null) - message.command = String(object.command); - if (object.subcommand != null) - message.subcommand = String(object.subcommand); - if (object.parameters) { - if (!Array.isArray(object.parameters)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest.parameters: array expected"); - message.parameters = []; - for (var i = 0; i < object.parameters.length; ++i) - message.parameters[i] = String(object.parameters[i]); - } - return message; - }; - - /** - * Creates a plain object from an ExecuteAirflowCommandRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest} message ExecuteAirflowCommandRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteAirflowCommandRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.parameters = []; - if (options.defaults) { - object.environment = ""; - object.command = ""; - object.subcommand = ""; - } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.command != null && message.hasOwnProperty("command")) - object.command = message.command; - if (message.subcommand != null && message.hasOwnProperty("subcommand")) - object.subcommand = message.subcommand; - if (message.parameters && message.parameters.length) { - object.parameters = []; - for (var j = 0; j < message.parameters.length; ++j) - object.parameters[j] = message.parameters[j]; - } - return object; - }; - - /** - * Converts this ExecuteAirflowCommandRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest - * @instance - * @returns {Object.} JSON object - */ - ExecuteAirflowCommandRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecuteAirflowCommandRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecuteAirflowCommandRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest"; - }; - - return ExecuteAirflowCommandRequest; - })(); - - v1beta1.ExecuteAirflowCommandResponse = (function() { - - /** - * Properties of an ExecuteAirflowCommandResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IExecuteAirflowCommandResponse - * @property {string|null} [executionId] ExecuteAirflowCommandResponse executionId - * @property {string|null} [pod] ExecuteAirflowCommandResponse pod - * @property {string|null} [podNamespace] ExecuteAirflowCommandResponse podNamespace - * @property {string|null} [error] ExecuteAirflowCommandResponse error - */ - - /** - * Constructs a new ExecuteAirflowCommandResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents an ExecuteAirflowCommandResponse. - * @implements IExecuteAirflowCommandResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse=} [properties] Properties to set - */ - function ExecuteAirflowCommandResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExecuteAirflowCommandResponse executionId. - * @member {string} executionId - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse - * @instance - */ - ExecuteAirflowCommandResponse.prototype.executionId = ""; - - /** - * ExecuteAirflowCommandResponse pod. - * @member {string} pod - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse - * @instance - */ - ExecuteAirflowCommandResponse.prototype.pod = ""; - - /** - * ExecuteAirflowCommandResponse podNamespace. - * @member {string} podNamespace - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse - * @instance - */ - ExecuteAirflowCommandResponse.prototype.podNamespace = ""; - - /** - * ExecuteAirflowCommandResponse error. - * @member {string} error - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse - * @instance - */ - ExecuteAirflowCommandResponse.prototype.error = ""; - - /** - * Creates a new ExecuteAirflowCommandResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse} ExecuteAirflowCommandResponse instance - */ - ExecuteAirflowCommandResponse.create = function create(properties) { - return new ExecuteAirflowCommandResponse(properties); - }; - - /** - * Encodes the specified ExecuteAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse} message ExecuteAirflowCommandResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteAirflowCommandResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.executionId != null && Object.hasOwnProperty.call(message, "executionId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.executionId); - if (message.pod != null && Object.hasOwnProperty.call(message, "pod")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pod); - if (message.podNamespace != null && Object.hasOwnProperty.call(message, "podNamespace")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.podNamespace); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.error); - return writer; - }; - - /** - * Encodes the specified ExecuteAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse} message ExecuteAirflowCommandResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExecuteAirflowCommandResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExecuteAirflowCommandResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse} ExecuteAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteAirflowCommandResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.executionId = reader.string(); - break; - } - case 2: { - message.pod = reader.string(); - break; - } - case 3: { - message.podNamespace = reader.string(); - break; - } - case 4: { - message.error = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExecuteAirflowCommandResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse} ExecuteAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExecuteAirflowCommandResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExecuteAirflowCommandResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExecuteAirflowCommandResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.executionId != null && message.hasOwnProperty("executionId")) - if (!$util.isString(message.executionId)) - return "executionId: string expected"; - if (message.pod != null && message.hasOwnProperty("pod")) - if (!$util.isString(message.pod)) - return "pod: string expected"; - if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) - if (!$util.isString(message.podNamespace)) - return "podNamespace: string expected"; - if (message.error != null && message.hasOwnProperty("error")) - if (!$util.isString(message.error)) - return "error: string expected"; - return null; - }; - - /** - * Creates an ExecuteAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse} ExecuteAirflowCommandResponse - */ - ExecuteAirflowCommandResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse(); - if (object.executionId != null) - message.executionId = String(object.executionId); - if (object.pod != null) - message.pod = String(object.pod); - if (object.podNamespace != null) - message.podNamespace = String(object.podNamespace); - if (object.error != null) - message.error = String(object.error); - return message; - }; - - /** - * Creates a plain object from an ExecuteAirflowCommandResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse} message ExecuteAirflowCommandResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExecuteAirflowCommandResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.executionId = ""; - object.pod = ""; - object.podNamespace = ""; - object.error = ""; - } - if (message.executionId != null && message.hasOwnProperty("executionId")) - object.executionId = message.executionId; - if (message.pod != null && message.hasOwnProperty("pod")) - object.pod = message.pod; - if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) - object.podNamespace = message.podNamespace; - if (message.error != null && message.hasOwnProperty("error")) - object.error = message.error; - return object; - }; - - /** - * Converts this ExecuteAirflowCommandResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse - * @instance - * @returns {Object.} JSON object - */ - ExecuteAirflowCommandResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExecuteAirflowCommandResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExecuteAirflowCommandResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse"; - }; - - return ExecuteAirflowCommandResponse; - })(); - - v1beta1.StopAirflowCommandRequest = (function() { - - /** - * Properties of a StopAirflowCommandRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IStopAirflowCommandRequest - * @property {string|null} [environment] StopAirflowCommandRequest environment - * @property {string|null} [executionId] StopAirflowCommandRequest executionId - * @property {string|null} [pod] StopAirflowCommandRequest pod - * @property {string|null} [podNamespace] StopAirflowCommandRequest podNamespace - * @property {boolean|null} [force] StopAirflowCommandRequest force - */ - - /** - * Constructs a new StopAirflowCommandRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a StopAirflowCommandRequest. - * @implements IStopAirflowCommandRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest=} [properties] Properties to set - */ - function StopAirflowCommandRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StopAirflowCommandRequest environment. - * @member {string} environment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest - * @instance - */ - StopAirflowCommandRequest.prototype.environment = ""; - - /** - * StopAirflowCommandRequest executionId. - * @member {string} executionId - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest - * @instance - */ - StopAirflowCommandRequest.prototype.executionId = ""; - - /** - * StopAirflowCommandRequest pod. - * @member {string} pod - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest - * @instance - */ - StopAirflowCommandRequest.prototype.pod = ""; - - /** - * StopAirflowCommandRequest podNamespace. - * @member {string} podNamespace - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest - * @instance - */ - StopAirflowCommandRequest.prototype.podNamespace = ""; - - /** - * StopAirflowCommandRequest force. - * @member {boolean} force - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest - * @instance - */ - StopAirflowCommandRequest.prototype.force = false; - - /** - * Creates a new StopAirflowCommandRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest} StopAirflowCommandRequest instance - */ - StopAirflowCommandRequest.create = function create(properties) { - return new StopAirflowCommandRequest(properties); - }; - - /** - * Encodes the specified StopAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest} message StopAirflowCommandRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopAirflowCommandRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - if (message.executionId != null && Object.hasOwnProperty.call(message, "executionId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.executionId); - if (message.pod != null && Object.hasOwnProperty.call(message, "pod")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pod); - if (message.podNamespace != null && Object.hasOwnProperty.call(message, "podNamespace")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.podNamespace); - if (message.force != null && Object.hasOwnProperty.call(message, "force")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.force); - return writer; - }; - - /** - * Encodes the specified StopAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest} message StopAirflowCommandRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopAirflowCommandRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StopAirflowCommandRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest} StopAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopAirflowCommandRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - case 2: { - message.executionId = reader.string(); - break; - } - case 3: { - message.pod = reader.string(); - break; - } - case 4: { - message.podNamespace = reader.string(); - break; - } - case 5: { - message.force = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StopAirflowCommandRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest} StopAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopAirflowCommandRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StopAirflowCommandRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StopAirflowCommandRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - if (message.executionId != null && message.hasOwnProperty("executionId")) - if (!$util.isString(message.executionId)) - return "executionId: string expected"; - if (message.pod != null && message.hasOwnProperty("pod")) - if (!$util.isString(message.pod)) - return "pod: string expected"; - if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) - if (!$util.isString(message.podNamespace)) - return "podNamespace: string expected"; - if (message.force != null && message.hasOwnProperty("force")) - if (typeof message.force !== "boolean") - return "force: boolean expected"; - return null; - }; - - /** - * Creates a StopAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest} StopAirflowCommandRequest - */ - StopAirflowCommandRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest(); - if (object.environment != null) - message.environment = String(object.environment); - if (object.executionId != null) - message.executionId = String(object.executionId); - if (object.pod != null) - message.pod = String(object.pod); - if (object.podNamespace != null) - message.podNamespace = String(object.podNamespace); - if (object.force != null) - message.force = Boolean(object.force); - return message; - }; - - /** - * Creates a plain object from a StopAirflowCommandRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest} message StopAirflowCommandRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StopAirflowCommandRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.environment = ""; - object.executionId = ""; - object.pod = ""; - object.podNamespace = ""; - object.force = false; - } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.executionId != null && message.hasOwnProperty("executionId")) - object.executionId = message.executionId; - if (message.pod != null && message.hasOwnProperty("pod")) - object.pod = message.pod; - if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) - object.podNamespace = message.podNamespace; - if (message.force != null && message.hasOwnProperty("force")) - object.force = message.force; - return object; - }; - - /** - * Converts this StopAirflowCommandRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest - * @instance - * @returns {Object.} JSON object - */ - StopAirflowCommandRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StopAirflowCommandRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StopAirflowCommandRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest"; - }; - - return StopAirflowCommandRequest; - })(); - - v1beta1.StopAirflowCommandResponse = (function() { - - /** - * Properties of a StopAirflowCommandResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IStopAirflowCommandResponse - * @property {boolean|null} [isDone] StopAirflowCommandResponse isDone - * @property {Array.|null} [output] StopAirflowCommandResponse output - */ - - /** - * Constructs a new StopAirflowCommandResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a StopAirflowCommandResponse. - * @implements IStopAirflowCommandResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse=} [properties] Properties to set - */ - function StopAirflowCommandResponse(properties) { - this.output = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StopAirflowCommandResponse isDone. - * @member {boolean} isDone - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse - * @instance - */ - StopAirflowCommandResponse.prototype.isDone = false; - - /** - * StopAirflowCommandResponse output. - * @member {Array.} output - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse - * @instance - */ - StopAirflowCommandResponse.prototype.output = $util.emptyArray; - - /** - * Creates a new StopAirflowCommandResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse} StopAirflowCommandResponse instance - */ - StopAirflowCommandResponse.create = function create(properties) { - return new StopAirflowCommandResponse(properties); - }; - - /** - * Encodes the specified StopAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse} message StopAirflowCommandResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopAirflowCommandResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.isDone != null && Object.hasOwnProperty.call(message, "isDone")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.isDone); - if (message.output != null && message.output.length) - for (var i = 0; i < message.output.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.output[i]); - return writer; - }; - - /** - * Encodes the specified StopAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse} message StopAirflowCommandResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StopAirflowCommandResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StopAirflowCommandResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse} StopAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopAirflowCommandResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.isDone = reader.bool(); - break; - } - case 2: { - if (!(message.output && message.output.length)) - message.output = []; - message.output.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StopAirflowCommandResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse} StopAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StopAirflowCommandResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StopAirflowCommandResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StopAirflowCommandResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.isDone != null && message.hasOwnProperty("isDone")) - if (typeof message.isDone !== "boolean") - return "isDone: boolean expected"; - if (message.output != null && message.hasOwnProperty("output")) { - if (!Array.isArray(message.output)) - return "output: array expected"; - for (var i = 0; i < message.output.length; ++i) - if (!$util.isString(message.output[i])) - return "output: string[] expected"; - } - return null; - }; - - /** - * Creates a StopAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse} StopAirflowCommandResponse - */ - StopAirflowCommandResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse(); - if (object.isDone != null) - message.isDone = Boolean(object.isDone); - if (object.output) { - if (!Array.isArray(object.output)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse.output: array expected"); - message.output = []; - for (var i = 0; i < object.output.length; ++i) - message.output[i] = String(object.output[i]); - } - return message; - }; - - /** - * Creates a plain object from a StopAirflowCommandResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse} message StopAirflowCommandResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StopAirflowCommandResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.output = []; - if (options.defaults) - object.isDone = false; - if (message.isDone != null && message.hasOwnProperty("isDone")) - object.isDone = message.isDone; - if (message.output && message.output.length) { - object.output = []; - for (var j = 0; j < message.output.length; ++j) - object.output[j] = message.output[j]; - } - return object; - }; - - /** - * Converts this StopAirflowCommandResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse - * @instance - * @returns {Object.} JSON object - */ - StopAirflowCommandResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StopAirflowCommandResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StopAirflowCommandResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse"; - }; - - return StopAirflowCommandResponse; - })(); - - v1beta1.PollAirflowCommandRequest = (function() { - - /** - * Properties of a PollAirflowCommandRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IPollAirflowCommandRequest - * @property {string|null} [environment] PollAirflowCommandRequest environment - * @property {string|null} [executionId] PollAirflowCommandRequest executionId - * @property {string|null} [pod] PollAirflowCommandRequest pod - * @property {string|null} [podNamespace] PollAirflowCommandRequest podNamespace - * @property {number|null} [nextLineNumber] PollAirflowCommandRequest nextLineNumber - */ - - /** - * Constructs a new PollAirflowCommandRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a PollAirflowCommandRequest. - * @implements IPollAirflowCommandRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest=} [properties] Properties to set - */ - function PollAirflowCommandRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PollAirflowCommandRequest environment. - * @member {string} environment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest - * @instance - */ - PollAirflowCommandRequest.prototype.environment = ""; - - /** - * PollAirflowCommandRequest executionId. - * @member {string} executionId - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest - * @instance - */ - PollAirflowCommandRequest.prototype.executionId = ""; - - /** - * PollAirflowCommandRequest pod. - * @member {string} pod - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest - * @instance - */ - PollAirflowCommandRequest.prototype.pod = ""; - - /** - * PollAirflowCommandRequest podNamespace. - * @member {string} podNamespace - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest - * @instance - */ - PollAirflowCommandRequest.prototype.podNamespace = ""; - - /** - * PollAirflowCommandRequest nextLineNumber. - * @member {number} nextLineNumber - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest - * @instance - */ - PollAirflowCommandRequest.prototype.nextLineNumber = 0; - - /** - * Creates a new PollAirflowCommandRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest} PollAirflowCommandRequest instance - */ - PollAirflowCommandRequest.create = function create(properties) { - return new PollAirflowCommandRequest(properties); - }; - - /** - * Encodes the specified PollAirflowCommandRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest} message PollAirflowCommandRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollAirflowCommandRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - if (message.executionId != null && Object.hasOwnProperty.call(message, "executionId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.executionId); - if (message.pod != null && Object.hasOwnProperty.call(message, "pod")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pod); - if (message.podNamespace != null && Object.hasOwnProperty.call(message, "podNamespace")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.podNamespace); - if (message.nextLineNumber != null && Object.hasOwnProperty.call(message, "nextLineNumber")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.nextLineNumber); - return writer; - }; - - /** - * Encodes the specified PollAirflowCommandRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest} message PollAirflowCommandRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollAirflowCommandRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PollAirflowCommandRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest} PollAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollAirflowCommandRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - case 2: { - message.executionId = reader.string(); - break; - } - case 3: { - message.pod = reader.string(); - break; - } - case 4: { - message.podNamespace = reader.string(); - break; - } - case 5: { - message.nextLineNumber = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PollAirflowCommandRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest} PollAirflowCommandRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollAirflowCommandRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PollAirflowCommandRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PollAirflowCommandRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - if (message.executionId != null && message.hasOwnProperty("executionId")) - if (!$util.isString(message.executionId)) - return "executionId: string expected"; - if (message.pod != null && message.hasOwnProperty("pod")) - if (!$util.isString(message.pod)) - return "pod: string expected"; - if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) - if (!$util.isString(message.podNamespace)) - return "podNamespace: string expected"; - if (message.nextLineNumber != null && message.hasOwnProperty("nextLineNumber")) - if (!$util.isInteger(message.nextLineNumber)) - return "nextLineNumber: integer expected"; - return null; - }; - - /** - * Creates a PollAirflowCommandRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest} PollAirflowCommandRequest - */ - PollAirflowCommandRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest(); - if (object.environment != null) - message.environment = String(object.environment); - if (object.executionId != null) - message.executionId = String(object.executionId); - if (object.pod != null) - message.pod = String(object.pod); - if (object.podNamespace != null) - message.podNamespace = String(object.podNamespace); - if (object.nextLineNumber != null) - message.nextLineNumber = object.nextLineNumber | 0; - return message; - }; - - /** - * Creates a plain object from a PollAirflowCommandRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest} message PollAirflowCommandRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PollAirflowCommandRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.environment = ""; - object.executionId = ""; - object.pod = ""; - object.podNamespace = ""; - object.nextLineNumber = 0; - } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.executionId != null && message.hasOwnProperty("executionId")) - object.executionId = message.executionId; - if (message.pod != null && message.hasOwnProperty("pod")) - object.pod = message.pod; - if (message.podNamespace != null && message.hasOwnProperty("podNamespace")) - object.podNamespace = message.podNamespace; - if (message.nextLineNumber != null && message.hasOwnProperty("nextLineNumber")) - object.nextLineNumber = message.nextLineNumber; - return object; - }; - - /** - * Converts this PollAirflowCommandRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest - * @instance - * @returns {Object.} JSON object - */ - PollAirflowCommandRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PollAirflowCommandRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PollAirflowCommandRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest"; - }; - - return PollAirflowCommandRequest; - })(); - - v1beta1.PollAirflowCommandResponse = (function() { - - /** - * Properties of a PollAirflowCommandResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IPollAirflowCommandResponse - * @property {Array.|null} [output] PollAirflowCommandResponse output - * @property {boolean|null} [outputEnd] PollAirflowCommandResponse outputEnd - * @property {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo|null} [exitInfo] PollAirflowCommandResponse exitInfo - */ - - /** - * Constructs a new PollAirflowCommandResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a PollAirflowCommandResponse. - * @implements IPollAirflowCommandResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse=} [properties] Properties to set - */ - function PollAirflowCommandResponse(properties) { - this.output = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PollAirflowCommandResponse output. - * @member {Array.} output - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @instance - */ - PollAirflowCommandResponse.prototype.output = $util.emptyArray; - - /** - * PollAirflowCommandResponse outputEnd. - * @member {boolean} outputEnd - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @instance - */ - PollAirflowCommandResponse.prototype.outputEnd = false; - - /** - * PollAirflowCommandResponse exitInfo. - * @member {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo|null|undefined} exitInfo - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @instance - */ - PollAirflowCommandResponse.prototype.exitInfo = null; - - /** - * Creates a new PollAirflowCommandResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse} PollAirflowCommandResponse instance - */ - PollAirflowCommandResponse.create = function create(properties) { - return new PollAirflowCommandResponse(properties); - }; - - /** - * Encodes the specified PollAirflowCommandResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse} message PollAirflowCommandResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollAirflowCommandResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.output != null && message.output.length) - for (var i = 0; i < message.output.length; ++i) - $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.encode(message.output[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.outputEnd != null && Object.hasOwnProperty.call(message, "outputEnd")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.outputEnd); - if (message.exitInfo != null && Object.hasOwnProperty.call(message, "exitInfo")) - $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.encode(message.exitInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PollAirflowCommandResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse} message PollAirflowCommandResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PollAirflowCommandResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PollAirflowCommandResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse} PollAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollAirflowCommandResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.output && message.output.length)) - message.output = []; - message.output.push($root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.decode(reader, reader.uint32())); - break; - } - case 2: { - message.outputEnd = reader.bool(); - break; - } - case 3: { - message.exitInfo = $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PollAirflowCommandResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse} PollAirflowCommandResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PollAirflowCommandResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PollAirflowCommandResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PollAirflowCommandResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.output != null && message.hasOwnProperty("output")) { - if (!Array.isArray(message.output)) - return "output: array expected"; - for (var i = 0; i < message.output.length; ++i) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.verify(message.output[i]); - if (error) - return "output." + error; - } - } - if (message.outputEnd != null && message.hasOwnProperty("outputEnd")) - if (typeof message.outputEnd !== "boolean") - return "outputEnd: boolean expected"; - if (message.exitInfo != null && message.hasOwnProperty("exitInfo")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.verify(message.exitInfo); - if (error) - return "exitInfo." + error; - } - return null; - }; - - /** - * Creates a PollAirflowCommandResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse} PollAirflowCommandResponse - */ - PollAirflowCommandResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse(); - if (object.output) { - if (!Array.isArray(object.output)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.output: array expected"); - message.output = []; - for (var i = 0; i < object.output.length; ++i) { - if (typeof object.output[i] !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.output: object expected"); - message.output[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.fromObject(object.output[i]); - } - } - if (object.outputEnd != null) - message.outputEnd = Boolean(object.outputEnd); - if (object.exitInfo != null) { - if (typeof object.exitInfo !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.exitInfo: object expected"); - message.exitInfo = $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.fromObject(object.exitInfo); - } - return message; - }; - - /** - * Creates a plain object from a PollAirflowCommandResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse} message PollAirflowCommandResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PollAirflowCommandResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.output = []; - if (options.defaults) { - object.outputEnd = false; - object.exitInfo = null; - } - if (message.output && message.output.length) { - object.output = []; - for (var j = 0; j < message.output.length; ++j) - object.output[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.toObject(message.output[j], options); - } - if (message.outputEnd != null && message.hasOwnProperty("outputEnd")) - object.outputEnd = message.outputEnd; - if (message.exitInfo != null && message.hasOwnProperty("exitInfo")) - object.exitInfo = $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.toObject(message.exitInfo, options); - return object; - }; - - /** - * Converts this PollAirflowCommandResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @instance - * @returns {Object.} JSON object - */ - PollAirflowCommandResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PollAirflowCommandResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PollAirflowCommandResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse"; - }; - - PollAirflowCommandResponse.Line = (function() { - - /** - * Properties of a Line. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @interface ILine - * @property {number|null} [lineNumber] Line lineNumber - * @property {string|null} [content] Line content - */ - - /** - * Constructs a new Line. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @classdesc Represents a Line. - * @implements ILine - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine=} [properties] Properties to set - */ - function Line(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Line lineNumber. - * @member {number} lineNumber - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line - * @instance - */ - Line.prototype.lineNumber = 0; - - /** - * Line content. - * @member {string} content - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line - * @instance - */ - Line.prototype.content = ""; - - /** - * Creates a new Line instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line} Line instance - */ - Line.create = function create(properties) { - return new Line(properties); - }; - - /** - * Encodes the specified Line message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine} message Line message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Line.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.lineNumber != null && Object.hasOwnProperty.call(message, "lineNumber")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.lineNumber); - if (message.content != null && Object.hasOwnProperty.call(message, "content")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.content); - return writer; - }; - - /** - * Encodes the specified Line message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ILine} message Line message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Line.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Line message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line} Line - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Line.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.lineNumber = reader.int32(); - break; - } - case 2: { - message.content = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Line message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line} Line - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Line.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Line message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Line.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.lineNumber != null && message.hasOwnProperty("lineNumber")) - if (!$util.isInteger(message.lineNumber)) - return "lineNumber: integer expected"; - if (message.content != null && message.hasOwnProperty("content")) - if (!$util.isString(message.content)) - return "content: string expected"; - return null; - }; - - /** - * Creates a Line message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line} Line - */ - Line.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line(); - if (object.lineNumber != null) - message.lineNumber = object.lineNumber | 0; - if (object.content != null) - message.content = String(object.content); - return message; - }; - - /** - * Creates a plain object from a Line message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line} message Line - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Line.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.lineNumber = 0; - object.content = ""; - } - if (message.lineNumber != null && message.hasOwnProperty("lineNumber")) - object.lineNumber = message.lineNumber; - if (message.content != null && message.hasOwnProperty("content")) - object.content = message.content; - return object; - }; - - /** - * Converts this Line to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line - * @instance - * @returns {Object.} JSON object - */ - Line.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Line - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Line.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.Line"; - }; - - return Line; - })(); - - PollAirflowCommandResponse.ExitInfo = (function() { - - /** - * Properties of an ExitInfo. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @interface IExitInfo - * @property {number|null} [exitCode] ExitInfo exitCode - * @property {string|null} [error] ExitInfo error - */ - - /** - * Constructs a new ExitInfo. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse - * @classdesc Represents an ExitInfo. - * @implements IExitInfo - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo=} [properties] Properties to set - */ - function ExitInfo(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ExitInfo exitCode. - * @member {number} exitCode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo - * @instance - */ - ExitInfo.prototype.exitCode = 0; - - /** - * ExitInfo error. - * @member {string} error - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo - * @instance - */ - ExitInfo.prototype.error = ""; - - /** - * Creates a new ExitInfo instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo} ExitInfo instance - */ - ExitInfo.create = function create(properties) { - return new ExitInfo(properties); - }; - - /** - * Encodes the specified ExitInfo message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo} message ExitInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExitInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.exitCode != null && Object.hasOwnProperty.call(message, "exitCode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.exitCode); - if (message.error != null && Object.hasOwnProperty.call(message, "error")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.error); - return writer; - }; - - /** - * Encodes the specified ExitInfo message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.IExitInfo} message ExitInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExitInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExitInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo} ExitInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExitInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.exitCode = reader.int32(); - break; - } - case 2: { - message.error = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExitInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo} ExitInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExitInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExitInfo message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExitInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.exitCode != null && message.hasOwnProperty("exitCode")) - if (!$util.isInteger(message.exitCode)) - return "exitCode: integer expected"; - if (message.error != null && message.hasOwnProperty("error")) - if (!$util.isString(message.error)) - return "error: string expected"; - return null; - }; - - /** - * Creates an ExitInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo} ExitInfo - */ - ExitInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo(); - if (object.exitCode != null) - message.exitCode = object.exitCode | 0; - if (object.error != null) - message.error = String(object.error); - return message; - }; - - /** - * Creates a plain object from an ExitInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo} message ExitInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExitInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.exitCode = 0; - object.error = ""; - } - if (message.exitCode != null && message.hasOwnProperty("exitCode")) - object.exitCode = message.exitCode; - if (message.error != null && message.hasOwnProperty("error")) - object.error = message.error; - return object; - }; - - /** - * Converts this ExitInfo to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo - * @instance - * @returns {Object.} JSON object - */ - ExitInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExitInfo - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExitInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse.ExitInfo"; - }; - - return ExitInfo; - })(); - - return PollAirflowCommandResponse; - })(); - - v1beta1.CreateUserWorkloadsSecretRequest = (function() { - - /** - * Properties of a CreateUserWorkloadsSecretRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface ICreateUserWorkloadsSecretRequest - * @property {string|null} [parent] CreateUserWorkloadsSecretRequest parent - * @property {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null} [userWorkloadsSecret] CreateUserWorkloadsSecretRequest userWorkloadsSecret - */ - - /** - * Constructs a new CreateUserWorkloadsSecretRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a CreateUserWorkloadsSecretRequest. - * @implements ICreateUserWorkloadsSecretRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest=} [properties] Properties to set - */ - function CreateUserWorkloadsSecretRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateUserWorkloadsSecretRequest parent. - * @member {string} parent - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest - * @instance - */ - CreateUserWorkloadsSecretRequest.prototype.parent = ""; - - /** - * CreateUserWorkloadsSecretRequest userWorkloadsSecret. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null|undefined} userWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest - * @instance - */ - CreateUserWorkloadsSecretRequest.prototype.userWorkloadsSecret = null; - - /** - * Creates a new CreateUserWorkloadsSecretRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest} CreateUserWorkloadsSecretRequest instance - */ - CreateUserWorkloadsSecretRequest.create = function create(properties) { - return new CreateUserWorkloadsSecretRequest(properties); - }; - - /** - * Encodes the specified CreateUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest} message CreateUserWorkloadsSecretRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateUserWorkloadsSecretRequest.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.userWorkloadsSecret != null && Object.hasOwnProperty.call(message, "userWorkloadsSecret")) - $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.encode(message.userWorkloadsSecret, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest} message CreateUserWorkloadsSecretRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateUserWorkloadsSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateUserWorkloadsSecretRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest} CreateUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateUserWorkloadsSecretRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest} CreateUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateUserWorkloadsSecretRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateUserWorkloadsSecretRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateUserWorkloadsSecretRequest.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.userWorkloadsSecret != null && message.hasOwnProperty("userWorkloadsSecret")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.verify(message.userWorkloadsSecret); - if (error) - return "userWorkloadsSecret." + error; - } - return null; - }; - - /** - * Creates a CreateUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest} CreateUserWorkloadsSecretRequest - */ - CreateUserWorkloadsSecretRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.userWorkloadsSecret != null) { - if (typeof object.userWorkloadsSecret !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest.userWorkloadsSecret: object expected"); - message.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.fromObject(object.userWorkloadsSecret); - } - return message; - }; - - /** - * Creates a plain object from a CreateUserWorkloadsSecretRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest} message CreateUserWorkloadsSecretRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateUserWorkloadsSecretRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.userWorkloadsSecret = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.userWorkloadsSecret != null && message.hasOwnProperty("userWorkloadsSecret")) - object.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.toObject(message.userWorkloadsSecret, options); - return object; - }; - - /** - * Converts this CreateUserWorkloadsSecretRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest - * @instance - * @returns {Object.} JSON object - */ - CreateUserWorkloadsSecretRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateUserWorkloadsSecretRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateUserWorkloadsSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest"; - }; - - return CreateUserWorkloadsSecretRequest; - })(); - - v1beta1.GetUserWorkloadsSecretRequest = (function() { - - /** - * Properties of a GetUserWorkloadsSecretRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IGetUserWorkloadsSecretRequest - * @property {string|null} [name] GetUserWorkloadsSecretRequest name - */ - - /** - * Constructs a new GetUserWorkloadsSecretRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a GetUserWorkloadsSecretRequest. - * @implements IGetUserWorkloadsSecretRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest=} [properties] Properties to set - */ - function GetUserWorkloadsSecretRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetUserWorkloadsSecretRequest name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest - * @instance - */ - GetUserWorkloadsSecretRequest.prototype.name = ""; - - /** - * Creates a new GetUserWorkloadsSecretRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest} GetUserWorkloadsSecretRequest instance - */ - GetUserWorkloadsSecretRequest.create = function create(properties) { - return new GetUserWorkloadsSecretRequest(properties); - }; - - /** - * Encodes the specified GetUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest} message GetUserWorkloadsSecretRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetUserWorkloadsSecretRequest.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 GetUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest} message GetUserWorkloadsSecretRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetUserWorkloadsSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetUserWorkloadsSecretRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest} GetUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetUserWorkloadsSecretRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest} GetUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetUserWorkloadsSecretRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetUserWorkloadsSecretRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetUserWorkloadsSecretRequest.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 GetUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest} GetUserWorkloadsSecretRequest - */ - GetUserWorkloadsSecretRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetUserWorkloadsSecretRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest} message GetUserWorkloadsSecretRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetUserWorkloadsSecretRequest.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 GetUserWorkloadsSecretRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest - * @instance - * @returns {Object.} JSON object - */ - GetUserWorkloadsSecretRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetUserWorkloadsSecretRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetUserWorkloadsSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest"; - }; - - return GetUserWorkloadsSecretRequest; - })(); - - v1beta1.ListUserWorkloadsSecretsRequest = (function() { - - /** - * Properties of a ListUserWorkloadsSecretsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IListUserWorkloadsSecretsRequest - * @property {string|null} [parent] ListUserWorkloadsSecretsRequest parent - * @property {number|null} [pageSize] ListUserWorkloadsSecretsRequest pageSize - * @property {string|null} [pageToken] ListUserWorkloadsSecretsRequest pageToken - */ - - /** - * Constructs a new ListUserWorkloadsSecretsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a ListUserWorkloadsSecretsRequest. - * @implements IListUserWorkloadsSecretsRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest=} [properties] Properties to set - */ - function ListUserWorkloadsSecretsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUserWorkloadsSecretsRequest parent. - * @member {string} parent - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest - * @instance - */ - ListUserWorkloadsSecretsRequest.prototype.parent = ""; - - /** - * ListUserWorkloadsSecretsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest - * @instance - */ - ListUserWorkloadsSecretsRequest.prototype.pageSize = 0; - - /** - * ListUserWorkloadsSecretsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest - * @instance - */ - ListUserWorkloadsSecretsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListUserWorkloadsSecretsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest} ListUserWorkloadsSecretsRequest instance - */ - ListUserWorkloadsSecretsRequest.create = function create(properties) { - return new ListUserWorkloadsSecretsRequest(properties); - }; - - /** - * Encodes the specified ListUserWorkloadsSecretsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest} message ListUserWorkloadsSecretsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserWorkloadsSecretsRequest.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); - return writer; - }; - - /** - * Encodes the specified ListUserWorkloadsSecretsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest} message ListUserWorkloadsSecretsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserWorkloadsSecretsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUserWorkloadsSecretsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest} ListUserWorkloadsSecretsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserWorkloadsSecretsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUserWorkloadsSecretsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest} ListUserWorkloadsSecretsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserWorkloadsSecretsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUserWorkloadsSecretsRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUserWorkloadsSecretsRequest.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"; - return null; - }; - - /** - * Creates a ListUserWorkloadsSecretsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest} ListUserWorkloadsSecretsRequest - */ - ListUserWorkloadsSecretsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListUserWorkloadsSecretsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest} message ListUserWorkloadsSecretsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUserWorkloadsSecretsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListUserWorkloadsSecretsRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest - * @instance - * @returns {Object.} JSON object - */ - ListUserWorkloadsSecretsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUserWorkloadsSecretsRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUserWorkloadsSecretsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest"; - }; - - return ListUserWorkloadsSecretsRequest; - })(); - - v1beta1.UpdateUserWorkloadsSecretRequest = (function() { - - /** - * Properties of an UpdateUserWorkloadsSecretRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IUpdateUserWorkloadsSecretRequest - * @property {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null} [userWorkloadsSecret] UpdateUserWorkloadsSecretRequest userWorkloadsSecret - */ - - /** - * Constructs a new UpdateUserWorkloadsSecretRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents an UpdateUserWorkloadsSecretRequest. - * @implements IUpdateUserWorkloadsSecretRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest=} [properties] Properties to set - */ - function UpdateUserWorkloadsSecretRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateUserWorkloadsSecretRequest userWorkloadsSecret. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null|undefined} userWorkloadsSecret - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest - * @instance - */ - UpdateUserWorkloadsSecretRequest.prototype.userWorkloadsSecret = null; - - /** - * Creates a new UpdateUserWorkloadsSecretRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest} UpdateUserWorkloadsSecretRequest instance - */ - UpdateUserWorkloadsSecretRequest.create = function create(properties) { - return new UpdateUserWorkloadsSecretRequest(properties); - }; - - /** - * Encodes the specified UpdateUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest} message UpdateUserWorkloadsSecretRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateUserWorkloadsSecretRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userWorkloadsSecret != null && Object.hasOwnProperty.call(message, "userWorkloadsSecret")) - $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.encode(message.userWorkloadsSecret, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest} message UpdateUserWorkloadsSecretRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateUserWorkloadsSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateUserWorkloadsSecretRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest} UpdateUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateUserWorkloadsSecretRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest} UpdateUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateUserWorkloadsSecretRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateUserWorkloadsSecretRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateUserWorkloadsSecretRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userWorkloadsSecret != null && message.hasOwnProperty("userWorkloadsSecret")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.verify(message.userWorkloadsSecret); - if (error) - return "userWorkloadsSecret." + error; - } - return null; - }; - - /** - * Creates an UpdateUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest} UpdateUserWorkloadsSecretRequest - */ - UpdateUserWorkloadsSecretRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest(); - if (object.userWorkloadsSecret != null) { - if (typeof object.userWorkloadsSecret !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest.userWorkloadsSecret: object expected"); - message.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.fromObject(object.userWorkloadsSecret); - } - return message; - }; - - /** - * Creates a plain object from an UpdateUserWorkloadsSecretRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest} message UpdateUserWorkloadsSecretRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateUserWorkloadsSecretRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.userWorkloadsSecret = null; - if (message.userWorkloadsSecret != null && message.hasOwnProperty("userWorkloadsSecret")) - object.userWorkloadsSecret = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.toObject(message.userWorkloadsSecret, options); - return object; - }; - - /** - * Converts this UpdateUserWorkloadsSecretRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateUserWorkloadsSecretRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateUserWorkloadsSecretRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateUserWorkloadsSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest"; - }; - - return UpdateUserWorkloadsSecretRequest; - })(); - - v1beta1.DeleteUserWorkloadsSecretRequest = (function() { - - /** - * Properties of a DeleteUserWorkloadsSecretRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IDeleteUserWorkloadsSecretRequest - * @property {string|null} [name] DeleteUserWorkloadsSecretRequest name - */ - - /** - * Constructs a new DeleteUserWorkloadsSecretRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a DeleteUserWorkloadsSecretRequest. - * @implements IDeleteUserWorkloadsSecretRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest=} [properties] Properties to set - */ - function DeleteUserWorkloadsSecretRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteUserWorkloadsSecretRequest name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest - * @instance - */ - DeleteUserWorkloadsSecretRequest.prototype.name = ""; - - /** - * Creates a new DeleteUserWorkloadsSecretRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest} DeleteUserWorkloadsSecretRequest instance - */ - DeleteUserWorkloadsSecretRequest.create = function create(properties) { - return new DeleteUserWorkloadsSecretRequest(properties); - }; - - /** - * Encodes the specified DeleteUserWorkloadsSecretRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest} message DeleteUserWorkloadsSecretRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteUserWorkloadsSecretRequest.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 DeleteUserWorkloadsSecretRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest} message DeleteUserWorkloadsSecretRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteUserWorkloadsSecretRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteUserWorkloadsSecretRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest} DeleteUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteUserWorkloadsSecretRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteUserWorkloadsSecretRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest} DeleteUserWorkloadsSecretRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteUserWorkloadsSecretRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteUserWorkloadsSecretRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteUserWorkloadsSecretRequest.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 DeleteUserWorkloadsSecretRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest} DeleteUserWorkloadsSecretRequest - */ - DeleteUserWorkloadsSecretRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteUserWorkloadsSecretRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest} message DeleteUserWorkloadsSecretRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteUserWorkloadsSecretRequest.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 DeleteUserWorkloadsSecretRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteUserWorkloadsSecretRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteUserWorkloadsSecretRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteUserWorkloadsSecretRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest"; - }; - - return DeleteUserWorkloadsSecretRequest; - })(); - - v1beta1.CreateUserWorkloadsConfigMapRequest = (function() { - - /** - * Properties of a CreateUserWorkloadsConfigMapRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface ICreateUserWorkloadsConfigMapRequest - * @property {string|null} [parent] CreateUserWorkloadsConfigMapRequest parent - * @property {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null} [userWorkloadsConfigMap] CreateUserWorkloadsConfigMapRequest userWorkloadsConfigMap - */ - - /** - * Constructs a new CreateUserWorkloadsConfigMapRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a CreateUserWorkloadsConfigMapRequest. - * @implements ICreateUserWorkloadsConfigMapRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest=} [properties] Properties to set - */ - function CreateUserWorkloadsConfigMapRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CreateUserWorkloadsConfigMapRequest parent. - * @member {string} parent - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest - * @instance - */ - CreateUserWorkloadsConfigMapRequest.prototype.parent = ""; - - /** - * CreateUserWorkloadsConfigMapRequest userWorkloadsConfigMap. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null|undefined} userWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest - * @instance - */ - CreateUserWorkloadsConfigMapRequest.prototype.userWorkloadsConfigMap = null; - - /** - * Creates a new CreateUserWorkloadsConfigMapRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest} CreateUserWorkloadsConfigMapRequest instance - */ - CreateUserWorkloadsConfigMapRequest.create = function create(properties) { - return new CreateUserWorkloadsConfigMapRequest(properties); - }; - - /** - * Encodes the specified CreateUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest} message CreateUserWorkloadsConfigMapRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateUserWorkloadsConfigMapRequest.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.userWorkloadsConfigMap != null && Object.hasOwnProperty.call(message, "userWorkloadsConfigMap")) - $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.encode(message.userWorkloadsConfigMap, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest} message CreateUserWorkloadsConfigMapRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateUserWorkloadsConfigMapRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateUserWorkloadsConfigMapRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest} CreateUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateUserWorkloadsConfigMapRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest} CreateUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateUserWorkloadsConfigMapRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateUserWorkloadsConfigMapRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateUserWorkloadsConfigMapRequest.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.userWorkloadsConfigMap != null && message.hasOwnProperty("userWorkloadsConfigMap")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.verify(message.userWorkloadsConfigMap); - if (error) - return "userWorkloadsConfigMap." + error; - } - return null; - }; - - /** - * Creates a CreateUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest} CreateUserWorkloadsConfigMapRequest - */ - CreateUserWorkloadsConfigMapRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.userWorkloadsConfigMap != null) { - if (typeof object.userWorkloadsConfigMap !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest.userWorkloadsConfigMap: object expected"); - message.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.fromObject(object.userWorkloadsConfigMap); - } - return message; - }; - - /** - * Creates a plain object from a CreateUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest} message CreateUserWorkloadsConfigMapRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateUserWorkloadsConfigMapRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.userWorkloadsConfigMap = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.userWorkloadsConfigMap != null && message.hasOwnProperty("userWorkloadsConfigMap")) - object.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.toObject(message.userWorkloadsConfigMap, options); - return object; - }; - - /** - * Converts this CreateUserWorkloadsConfigMapRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest - * @instance - * @returns {Object.} JSON object - */ - CreateUserWorkloadsConfigMapRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateUserWorkloadsConfigMapRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateUserWorkloadsConfigMapRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest"; - }; - - return CreateUserWorkloadsConfigMapRequest; - })(); - - v1beta1.GetUserWorkloadsConfigMapRequest = (function() { - - /** - * Properties of a GetUserWorkloadsConfigMapRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IGetUserWorkloadsConfigMapRequest - * @property {string|null} [name] GetUserWorkloadsConfigMapRequest name - */ - - /** - * Constructs a new GetUserWorkloadsConfigMapRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a GetUserWorkloadsConfigMapRequest. - * @implements IGetUserWorkloadsConfigMapRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest=} [properties] Properties to set - */ - function GetUserWorkloadsConfigMapRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * GetUserWorkloadsConfigMapRequest name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest - * @instance - */ - GetUserWorkloadsConfigMapRequest.prototype.name = ""; - - /** - * Creates a new GetUserWorkloadsConfigMapRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest} GetUserWorkloadsConfigMapRequest instance - */ - GetUserWorkloadsConfigMapRequest.create = function create(properties) { - return new GetUserWorkloadsConfigMapRequest(properties); - }; - - /** - * Encodes the specified GetUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest} message GetUserWorkloadsConfigMapRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetUserWorkloadsConfigMapRequest.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 GetUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest} message GetUserWorkloadsConfigMapRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetUserWorkloadsConfigMapRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetUserWorkloadsConfigMapRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest} GetUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetUserWorkloadsConfigMapRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest} GetUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetUserWorkloadsConfigMapRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetUserWorkloadsConfigMapRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetUserWorkloadsConfigMapRequest.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 GetUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest} GetUserWorkloadsConfigMapRequest - */ - GetUserWorkloadsConfigMapRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest} message GetUserWorkloadsConfigMapRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetUserWorkloadsConfigMapRequest.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 GetUserWorkloadsConfigMapRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest - * @instance - * @returns {Object.} JSON object - */ - GetUserWorkloadsConfigMapRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetUserWorkloadsConfigMapRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetUserWorkloadsConfigMapRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest"; - }; - - return GetUserWorkloadsConfigMapRequest; - })(); - - v1beta1.ListUserWorkloadsConfigMapsRequest = (function() { - - /** - * Properties of a ListUserWorkloadsConfigMapsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IListUserWorkloadsConfigMapsRequest - * @property {string|null} [parent] ListUserWorkloadsConfigMapsRequest parent - * @property {number|null} [pageSize] ListUserWorkloadsConfigMapsRequest pageSize - * @property {string|null} [pageToken] ListUserWorkloadsConfigMapsRequest pageToken - */ - - /** - * Constructs a new ListUserWorkloadsConfigMapsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a ListUserWorkloadsConfigMapsRequest. - * @implements IListUserWorkloadsConfigMapsRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest=} [properties] Properties to set - */ - function ListUserWorkloadsConfigMapsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUserWorkloadsConfigMapsRequest parent. - * @member {string} parent - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest - * @instance - */ - ListUserWorkloadsConfigMapsRequest.prototype.parent = ""; - - /** - * ListUserWorkloadsConfigMapsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest - * @instance - */ - ListUserWorkloadsConfigMapsRequest.prototype.pageSize = 0; - - /** - * ListUserWorkloadsConfigMapsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest - * @instance - */ - ListUserWorkloadsConfigMapsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListUserWorkloadsConfigMapsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest} ListUserWorkloadsConfigMapsRequest instance - */ - ListUserWorkloadsConfigMapsRequest.create = function create(properties) { - return new ListUserWorkloadsConfigMapsRequest(properties); - }; - - /** - * Encodes the specified ListUserWorkloadsConfigMapsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest} message ListUserWorkloadsConfigMapsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserWorkloadsConfigMapsRequest.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); - return writer; - }; - - /** - * Encodes the specified ListUserWorkloadsConfigMapsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest} message ListUserWorkloadsConfigMapsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserWorkloadsConfigMapsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUserWorkloadsConfigMapsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest} ListUserWorkloadsConfigMapsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserWorkloadsConfigMapsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUserWorkloadsConfigMapsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest} ListUserWorkloadsConfigMapsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserWorkloadsConfigMapsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUserWorkloadsConfigMapsRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUserWorkloadsConfigMapsRequest.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"; - return null; - }; - - /** - * Creates a ListUserWorkloadsConfigMapsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest} ListUserWorkloadsConfigMapsRequest - */ - ListUserWorkloadsConfigMapsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListUserWorkloadsConfigMapsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest} message ListUserWorkloadsConfigMapsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUserWorkloadsConfigMapsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListUserWorkloadsConfigMapsRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest - * @instance - * @returns {Object.} JSON object - */ - ListUserWorkloadsConfigMapsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUserWorkloadsConfigMapsRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUserWorkloadsConfigMapsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest"; - }; - - return ListUserWorkloadsConfigMapsRequest; - })(); - - v1beta1.UpdateUserWorkloadsConfigMapRequest = (function() { - - /** - * Properties of an UpdateUserWorkloadsConfigMapRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IUpdateUserWorkloadsConfigMapRequest - * @property {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null} [userWorkloadsConfigMap] UpdateUserWorkloadsConfigMapRequest userWorkloadsConfigMap - */ - - /** - * Constructs a new UpdateUserWorkloadsConfigMapRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents an UpdateUserWorkloadsConfigMapRequest. - * @implements IUpdateUserWorkloadsConfigMapRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest=} [properties] Properties to set - */ - function UpdateUserWorkloadsConfigMapRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdateUserWorkloadsConfigMapRequest userWorkloadsConfigMap. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null|undefined} userWorkloadsConfigMap - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest - * @instance - */ - UpdateUserWorkloadsConfigMapRequest.prototype.userWorkloadsConfigMap = null; - - /** - * Creates a new UpdateUserWorkloadsConfigMapRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest} UpdateUserWorkloadsConfigMapRequest instance - */ - UpdateUserWorkloadsConfigMapRequest.create = function create(properties) { - return new UpdateUserWorkloadsConfigMapRequest(properties); - }; - - /** - * Encodes the specified UpdateUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest} message UpdateUserWorkloadsConfigMapRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateUserWorkloadsConfigMapRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userWorkloadsConfigMap != null && Object.hasOwnProperty.call(message, "userWorkloadsConfigMap")) - $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.encode(message.userWorkloadsConfigMap, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified UpdateUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest} message UpdateUserWorkloadsConfigMapRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UpdateUserWorkloadsConfigMapRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UpdateUserWorkloadsConfigMapRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest} UpdateUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateUserWorkloadsConfigMapRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UpdateUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest} UpdateUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UpdateUserWorkloadsConfigMapRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UpdateUserWorkloadsConfigMapRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UpdateUserWorkloadsConfigMapRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userWorkloadsConfigMap != null && message.hasOwnProperty("userWorkloadsConfigMap")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.verify(message.userWorkloadsConfigMap); - if (error) - return "userWorkloadsConfigMap." + error; - } - return null; - }; - - /** - * Creates an UpdateUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest} UpdateUserWorkloadsConfigMapRequest - */ - UpdateUserWorkloadsConfigMapRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest(); - if (object.userWorkloadsConfigMap != null) { - if (typeof object.userWorkloadsConfigMap !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest.userWorkloadsConfigMap: object expected"); - message.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.fromObject(object.userWorkloadsConfigMap); - } - return message; - }; - - /** - * Creates a plain object from an UpdateUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest} message UpdateUserWorkloadsConfigMapRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UpdateUserWorkloadsConfigMapRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.userWorkloadsConfigMap = null; - if (message.userWorkloadsConfigMap != null && message.hasOwnProperty("userWorkloadsConfigMap")) - object.userWorkloadsConfigMap = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.toObject(message.userWorkloadsConfigMap, options); - return object; - }; - - /** - * Converts this UpdateUserWorkloadsConfigMapRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest - * @instance - * @returns {Object.} JSON object - */ - UpdateUserWorkloadsConfigMapRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UpdateUserWorkloadsConfigMapRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UpdateUserWorkloadsConfigMapRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest"; - }; - - return UpdateUserWorkloadsConfigMapRequest; - })(); - - v1beta1.DeleteUserWorkloadsConfigMapRequest = (function() { - - /** - * Properties of a DeleteUserWorkloadsConfigMapRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IDeleteUserWorkloadsConfigMapRequest - * @property {string|null} [name] DeleteUserWorkloadsConfigMapRequest name - */ - - /** - * Constructs a new DeleteUserWorkloadsConfigMapRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a DeleteUserWorkloadsConfigMapRequest. - * @implements IDeleteUserWorkloadsConfigMapRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest=} [properties] Properties to set - */ - function DeleteUserWorkloadsConfigMapRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DeleteUserWorkloadsConfigMapRequest name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest - * @instance - */ - DeleteUserWorkloadsConfigMapRequest.prototype.name = ""; - - /** - * Creates a new DeleteUserWorkloadsConfigMapRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest} DeleteUserWorkloadsConfigMapRequest instance - */ - DeleteUserWorkloadsConfigMapRequest.create = function create(properties) { - return new DeleteUserWorkloadsConfigMapRequest(properties); - }; - - /** - * Encodes the specified DeleteUserWorkloadsConfigMapRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest} message DeleteUserWorkloadsConfigMapRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteUserWorkloadsConfigMapRequest.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 DeleteUserWorkloadsConfigMapRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest} message DeleteUserWorkloadsConfigMapRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteUserWorkloadsConfigMapRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteUserWorkloadsConfigMapRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest} DeleteUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteUserWorkloadsConfigMapRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteUserWorkloadsConfigMapRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest} DeleteUserWorkloadsConfigMapRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteUserWorkloadsConfigMapRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteUserWorkloadsConfigMapRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteUserWorkloadsConfigMapRequest.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 DeleteUserWorkloadsConfigMapRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest} DeleteUserWorkloadsConfigMapRequest - */ - DeleteUserWorkloadsConfigMapRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteUserWorkloadsConfigMapRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest} message DeleteUserWorkloadsConfigMapRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteUserWorkloadsConfigMapRequest.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 DeleteUserWorkloadsConfigMapRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteUserWorkloadsConfigMapRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteUserWorkloadsConfigMapRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteUserWorkloadsConfigMapRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest"; - }; - - return DeleteUserWorkloadsConfigMapRequest; - })(); - - v1beta1.UserWorkloadsSecret = (function() { - - /** - * Properties of a UserWorkloadsSecret. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IUserWorkloadsSecret - * @property {string|null} [name] UserWorkloadsSecret name - * @property {Object.|null} [data] UserWorkloadsSecret data - */ - - /** - * Constructs a new UserWorkloadsSecret. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a UserWorkloadsSecret. - * @implements IUserWorkloadsSecret - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret=} [properties] Properties to set - */ - function UserWorkloadsSecret(properties) { - this.data = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserWorkloadsSecret name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret - * @instance - */ - UserWorkloadsSecret.prototype.name = ""; - - /** - * UserWorkloadsSecret data. - * @member {Object.} data - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret - * @instance - */ - UserWorkloadsSecret.prototype.data = $util.emptyObject; - - /** - * Creates a new UserWorkloadsSecret instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} UserWorkloadsSecret instance - */ - UserWorkloadsSecret.create = function create(properties) { - return new UserWorkloadsSecret(properties); - }; - - /** - * Encodes the specified UserWorkloadsSecret message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret} message UserWorkloadsSecret message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserWorkloadsSecret.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.data != null && Object.hasOwnProperty.call(message, "data")) - for (var keys = Object.keys(message.data), 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.data[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified UserWorkloadsSecret message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret} message UserWorkloadsSecret message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserWorkloadsSecret.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserWorkloadsSecret message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} UserWorkloadsSecret - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserWorkloadsSecret.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (message.data === $util.emptyObject) - message.data = {}; - 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.data[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserWorkloadsSecret message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} UserWorkloadsSecret - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserWorkloadsSecret.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserWorkloadsSecret message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserWorkloadsSecret.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.data != null && message.hasOwnProperty("data")) { - if (!$util.isObject(message.data)) - return "data: object expected"; - var key = Object.keys(message.data); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.data[key[i]])) - return "data: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a UserWorkloadsSecret message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} UserWorkloadsSecret - */ - UserWorkloadsSecret.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret(); - if (object.name != null) - message.name = String(object.name); - if (object.data) { - if (typeof object.data !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.data: object expected"); - message.data = {}; - for (var keys = Object.keys(object.data), i = 0; i < keys.length; ++i) - message.data[keys[i]] = String(object.data[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a UserWorkloadsSecret message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} message UserWorkloadsSecret - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserWorkloadsSecret.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.data = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - var keys2; - if (message.data && (keys2 = Object.keys(message.data)).length) { - object.data = {}; - for (var j = 0; j < keys2.length; ++j) - object.data[keys2[j]] = message.data[keys2[j]]; - } - return object; - }; - - /** - * Converts this UserWorkloadsSecret to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret - * @instance - * @returns {Object.} JSON object - */ - UserWorkloadsSecret.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserWorkloadsSecret - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserWorkloadsSecret.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret"; - }; - - return UserWorkloadsSecret; - })(); - - v1beta1.ListUserWorkloadsSecretsResponse = (function() { - - /** - * Properties of a ListUserWorkloadsSecretsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IListUserWorkloadsSecretsResponse - * @property {Array.|null} [userWorkloadsSecrets] ListUserWorkloadsSecretsResponse userWorkloadsSecrets - * @property {string|null} [nextPageToken] ListUserWorkloadsSecretsResponse nextPageToken - */ - - /** - * Constructs a new ListUserWorkloadsSecretsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a ListUserWorkloadsSecretsResponse. - * @implements IListUserWorkloadsSecretsResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse=} [properties] Properties to set - */ - function ListUserWorkloadsSecretsResponse(properties) { - this.userWorkloadsSecrets = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUserWorkloadsSecretsResponse userWorkloadsSecrets. - * @member {Array.} userWorkloadsSecrets - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse - * @instance - */ - ListUserWorkloadsSecretsResponse.prototype.userWorkloadsSecrets = $util.emptyArray; - - /** - * ListUserWorkloadsSecretsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse - * @instance - */ - ListUserWorkloadsSecretsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListUserWorkloadsSecretsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse} ListUserWorkloadsSecretsResponse instance - */ - ListUserWorkloadsSecretsResponse.create = function create(properties) { - return new ListUserWorkloadsSecretsResponse(properties); - }; - - /** - * Encodes the specified ListUserWorkloadsSecretsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse} message ListUserWorkloadsSecretsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserWorkloadsSecretsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userWorkloadsSecrets != null && message.userWorkloadsSecrets.length) - for (var i = 0; i < message.userWorkloadsSecrets.length; ++i) - $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.encode(message.userWorkloadsSecrets[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 ListUserWorkloadsSecretsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse} message ListUserWorkloadsSecretsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserWorkloadsSecretsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUserWorkloadsSecretsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse} ListUserWorkloadsSecretsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserWorkloadsSecretsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.userWorkloadsSecrets && message.userWorkloadsSecrets.length)) - message.userWorkloadsSecrets = []; - message.userWorkloadsSecrets.push($root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUserWorkloadsSecretsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse} ListUserWorkloadsSecretsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserWorkloadsSecretsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUserWorkloadsSecretsResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUserWorkloadsSecretsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userWorkloadsSecrets != null && message.hasOwnProperty("userWorkloadsSecrets")) { - if (!Array.isArray(message.userWorkloadsSecrets)) - return "userWorkloadsSecrets: array expected"; - for (var i = 0; i < message.userWorkloadsSecrets.length; ++i) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.verify(message.userWorkloadsSecrets[i]); - if (error) - return "userWorkloadsSecrets." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListUserWorkloadsSecretsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse} ListUserWorkloadsSecretsResponse - */ - ListUserWorkloadsSecretsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse(); - if (object.userWorkloadsSecrets) { - if (!Array.isArray(object.userWorkloadsSecrets)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse.userWorkloadsSecrets: array expected"); - message.userWorkloadsSecrets = []; - for (var i = 0; i < object.userWorkloadsSecrets.length; ++i) { - if (typeof object.userWorkloadsSecrets[i] !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse.userWorkloadsSecrets: object expected"); - message.userWorkloadsSecrets[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.fromObject(object.userWorkloadsSecrets[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListUserWorkloadsSecretsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse} message ListUserWorkloadsSecretsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUserWorkloadsSecretsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.userWorkloadsSecrets = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.userWorkloadsSecrets && message.userWorkloadsSecrets.length) { - object.userWorkloadsSecrets = []; - for (var j = 0; j < message.userWorkloadsSecrets.length; ++j) - object.userWorkloadsSecrets[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret.toObject(message.userWorkloadsSecrets[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListUserWorkloadsSecretsResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse - * @instance - * @returns {Object.} JSON object - */ - ListUserWorkloadsSecretsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUserWorkloadsSecretsResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUserWorkloadsSecretsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse"; - }; - - return ListUserWorkloadsSecretsResponse; - })(); - - v1beta1.UserWorkloadsConfigMap = (function() { - - /** - * Properties of a UserWorkloadsConfigMap. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IUserWorkloadsConfigMap - * @property {string|null} [name] UserWorkloadsConfigMap name - * @property {Object.|null} [data] UserWorkloadsConfigMap data - */ - - /** - * Constructs a new UserWorkloadsConfigMap. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a UserWorkloadsConfigMap. - * @implements IUserWorkloadsConfigMap - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap=} [properties] Properties to set - */ - function UserWorkloadsConfigMap(properties) { - this.data = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UserWorkloadsConfigMap name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap - * @instance - */ - UserWorkloadsConfigMap.prototype.name = ""; - - /** - * UserWorkloadsConfigMap data. - * @member {Object.} data - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap - * @instance - */ - UserWorkloadsConfigMap.prototype.data = $util.emptyObject; - - /** - * Creates a new UserWorkloadsConfigMap instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} UserWorkloadsConfigMap instance - */ - UserWorkloadsConfigMap.create = function create(properties) { - return new UserWorkloadsConfigMap(properties); - }; - - /** - * Encodes the specified UserWorkloadsConfigMap message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap} message UserWorkloadsConfigMap message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserWorkloadsConfigMap.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.data != null && Object.hasOwnProperty.call(message, "data")) - for (var keys = Object.keys(message.data), 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.data[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified UserWorkloadsConfigMap message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap} message UserWorkloadsConfigMap message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UserWorkloadsConfigMap.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a UserWorkloadsConfigMap message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} UserWorkloadsConfigMap - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserWorkloadsConfigMap.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (message.data === $util.emptyObject) - message.data = {}; - 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.data[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a UserWorkloadsConfigMap message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} UserWorkloadsConfigMap - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UserWorkloadsConfigMap.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a UserWorkloadsConfigMap message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UserWorkloadsConfigMap.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.data != null && message.hasOwnProperty("data")) { - if (!$util.isObject(message.data)) - return "data: object expected"; - var key = Object.keys(message.data); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.data[key[i]])) - return "data: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a UserWorkloadsConfigMap message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} UserWorkloadsConfigMap - */ - UserWorkloadsConfigMap.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap(); - if (object.name != null) - message.name = String(object.name); - if (object.data) { - if (typeof object.data !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.data: object expected"); - message.data = {}; - for (var keys = Object.keys(object.data), i = 0; i < keys.length; ++i) - message.data[keys[i]] = String(object.data[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a UserWorkloadsConfigMap message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} message UserWorkloadsConfigMap - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UserWorkloadsConfigMap.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.data = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - var keys2; - if (message.data && (keys2 = Object.keys(message.data)).length) { - object.data = {}; - for (var j = 0; j < keys2.length; ++j) - object.data[keys2[j]] = message.data[keys2[j]]; - } - return object; - }; - - /** - * Converts this UserWorkloadsConfigMap to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap - * @instance - * @returns {Object.} JSON object - */ - UserWorkloadsConfigMap.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UserWorkloadsConfigMap - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UserWorkloadsConfigMap.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap"; - }; - - return UserWorkloadsConfigMap; - })(); - - v1beta1.ListUserWorkloadsConfigMapsResponse = (function() { - - /** - * Properties of a ListUserWorkloadsConfigMapsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IListUserWorkloadsConfigMapsResponse - * @property {Array.|null} [userWorkloadsConfigMaps] ListUserWorkloadsConfigMapsResponse userWorkloadsConfigMaps - * @property {string|null} [nextPageToken] ListUserWorkloadsConfigMapsResponse nextPageToken - */ - - /** - * Constructs a new ListUserWorkloadsConfigMapsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a ListUserWorkloadsConfigMapsResponse. - * @implements IListUserWorkloadsConfigMapsResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse=} [properties] Properties to set - */ - function ListUserWorkloadsConfigMapsResponse(properties) { - this.userWorkloadsConfigMaps = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListUserWorkloadsConfigMapsResponse userWorkloadsConfigMaps. - * @member {Array.} userWorkloadsConfigMaps - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse - * @instance - */ - ListUserWorkloadsConfigMapsResponse.prototype.userWorkloadsConfigMaps = $util.emptyArray; - - /** - * ListUserWorkloadsConfigMapsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse - * @instance - */ - ListUserWorkloadsConfigMapsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListUserWorkloadsConfigMapsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse} ListUserWorkloadsConfigMapsResponse instance - */ - ListUserWorkloadsConfigMapsResponse.create = function create(properties) { - return new ListUserWorkloadsConfigMapsResponse(properties); - }; - - /** - * Encodes the specified ListUserWorkloadsConfigMapsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse} message ListUserWorkloadsConfigMapsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserWorkloadsConfigMapsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.userWorkloadsConfigMaps != null && message.userWorkloadsConfigMaps.length) - for (var i = 0; i < message.userWorkloadsConfigMaps.length; ++i) - $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.encode(message.userWorkloadsConfigMaps[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 ListUserWorkloadsConfigMapsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse} message ListUserWorkloadsConfigMapsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListUserWorkloadsConfigMapsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListUserWorkloadsConfigMapsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse} ListUserWorkloadsConfigMapsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserWorkloadsConfigMapsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.userWorkloadsConfigMaps && message.userWorkloadsConfigMaps.length)) - message.userWorkloadsConfigMaps = []; - message.userWorkloadsConfigMaps.push($root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListUserWorkloadsConfigMapsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse} ListUserWorkloadsConfigMapsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListUserWorkloadsConfigMapsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListUserWorkloadsConfigMapsResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListUserWorkloadsConfigMapsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.userWorkloadsConfigMaps != null && message.hasOwnProperty("userWorkloadsConfigMaps")) { - if (!Array.isArray(message.userWorkloadsConfigMaps)) - return "userWorkloadsConfigMaps: array expected"; - for (var i = 0; i < message.userWorkloadsConfigMaps.length; ++i) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.verify(message.userWorkloadsConfigMaps[i]); - if (error) - return "userWorkloadsConfigMaps." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListUserWorkloadsConfigMapsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse} ListUserWorkloadsConfigMapsResponse - */ - ListUserWorkloadsConfigMapsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse(); - if (object.userWorkloadsConfigMaps) { - if (!Array.isArray(object.userWorkloadsConfigMaps)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse.userWorkloadsConfigMaps: array expected"); - message.userWorkloadsConfigMaps = []; - for (var i = 0; i < object.userWorkloadsConfigMaps.length; ++i) { - if (typeof object.userWorkloadsConfigMaps[i] !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse.userWorkloadsConfigMaps: object expected"); - message.userWorkloadsConfigMaps[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.fromObject(object.userWorkloadsConfigMaps[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListUserWorkloadsConfigMapsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse} message ListUserWorkloadsConfigMapsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListUserWorkloadsConfigMapsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.userWorkloadsConfigMaps = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.userWorkloadsConfigMaps && message.userWorkloadsConfigMaps.length) { - object.userWorkloadsConfigMaps = []; - for (var j = 0; j < message.userWorkloadsConfigMaps.length; ++j) - object.userWorkloadsConfigMaps[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap.toObject(message.userWorkloadsConfigMaps[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListUserWorkloadsConfigMapsResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse - * @instance - * @returns {Object.} JSON object - */ - ListUserWorkloadsConfigMapsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListUserWorkloadsConfigMapsResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListUserWorkloadsConfigMapsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse"; - }; - - return ListUserWorkloadsConfigMapsResponse; - })(); - - v1beta1.ListWorkloadsRequest = (function() { - - /** - * Properties of a ListWorkloadsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IListWorkloadsRequest - * @property {string|null} [parent] ListWorkloadsRequest parent - * @property {number|null} [pageSize] ListWorkloadsRequest pageSize - * @property {string|null} [pageToken] ListWorkloadsRequest pageToken - * @property {string|null} [filter] ListWorkloadsRequest filter - */ - - /** - * Constructs a new ListWorkloadsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a ListWorkloadsRequest. - * @implements IListWorkloadsRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest=} [properties] Properties to set - */ - function ListWorkloadsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListWorkloadsRequest parent. - * @member {string} parent - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest - * @instance - */ - ListWorkloadsRequest.prototype.parent = ""; - - /** - * ListWorkloadsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest - * @instance - */ - ListWorkloadsRequest.prototype.pageSize = 0; - - /** - * ListWorkloadsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest - * @instance - */ - ListWorkloadsRequest.prototype.pageToken = ""; - - /** - * ListWorkloadsRequest filter. - * @member {string} filter - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest - * @instance - */ - ListWorkloadsRequest.prototype.filter = ""; - - /** - * Creates a new ListWorkloadsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest} ListWorkloadsRequest instance - */ - ListWorkloadsRequest.create = function create(properties) { - return new ListWorkloadsRequest(properties); - }; - - /** - * Encodes the specified ListWorkloadsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest} message ListWorkloadsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListWorkloadsRequest.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); - return writer; - }; - - /** - * Encodes the specified ListWorkloadsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest} message ListWorkloadsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListWorkloadsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListWorkloadsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest} ListWorkloadsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListWorkloadsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListWorkloadsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest} ListWorkloadsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListWorkloadsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListWorkloadsRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListWorkloadsRequest.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"; - return null; - }; - - /** - * Creates a ListWorkloadsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest} ListWorkloadsRequest - */ - ListWorkloadsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a ListWorkloadsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest} message ListWorkloadsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListWorkloadsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this ListWorkloadsRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest - * @instance - * @returns {Object.} JSON object - */ - ListWorkloadsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListWorkloadsRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListWorkloadsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest"; - }; - - return ListWorkloadsRequest; - })(); - - v1beta1.ListWorkloadsResponse = (function() { - - /** - * Properties of a ListWorkloadsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IListWorkloadsResponse - * @property {Array.|null} [workloads] ListWorkloadsResponse workloads - * @property {string|null} [nextPageToken] ListWorkloadsResponse nextPageToken - */ - - /** - * Constructs a new ListWorkloadsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a ListWorkloadsResponse. - * @implements IListWorkloadsResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse=} [properties] Properties to set - */ - function ListWorkloadsResponse(properties) { - this.workloads = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListWorkloadsResponse workloads. - * @member {Array.} workloads - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse - * @instance - */ - ListWorkloadsResponse.prototype.workloads = $util.emptyArray; - - /** - * ListWorkloadsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse - * @instance - */ - ListWorkloadsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListWorkloadsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse} ListWorkloadsResponse instance - */ - ListWorkloadsResponse.create = function create(properties) { - return new ListWorkloadsResponse(properties); - }; - - /** - * Encodes the specified ListWorkloadsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse} message ListWorkloadsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListWorkloadsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.workloads != null && message.workloads.length) - for (var i = 0; i < message.workloads.length; ++i) - $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.encode(message.workloads[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 ListWorkloadsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse} message ListWorkloadsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListWorkloadsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListWorkloadsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse} ListWorkloadsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListWorkloadsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.workloads && message.workloads.length)) - message.workloads = []; - message.workloads.push($root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListWorkloadsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse} ListWorkloadsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListWorkloadsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListWorkloadsResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListWorkloadsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.workloads != null && message.hasOwnProperty("workloads")) { - if (!Array.isArray(message.workloads)) - return "workloads: array expected"; - for (var i = 0; i < message.workloads.length; ++i) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.verify(message.workloads[i]); - if (error) - return "workloads." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListWorkloadsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse} ListWorkloadsResponse - */ - ListWorkloadsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse(); - if (object.workloads) { - if (!Array.isArray(object.workloads)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.workloads: array expected"); - message.workloads = []; - for (var i = 0; i < object.workloads.length; ++i) { - if (typeof object.workloads[i] !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.workloads: object expected"); - message.workloads[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.fromObject(object.workloads[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListWorkloadsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse} message ListWorkloadsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListWorkloadsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.workloads = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.workloads && message.workloads.length) { - object.workloads = []; - for (var j = 0; j < message.workloads.length; ++j) - object.workloads[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.toObject(message.workloads[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListWorkloadsResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse - * @instance - * @returns {Object.} JSON object - */ - ListWorkloadsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListWorkloadsResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListWorkloadsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse"; - }; - - ListWorkloadsResponse.ComposerWorkload = (function() { - - /** - * Properties of a ComposerWorkload. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse - * @interface IComposerWorkload - * @property {string|null} [name] ComposerWorkload name - * @property {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType|null} [type] ComposerWorkload type - * @property {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus|null} [status] ComposerWorkload status - */ - - /** - * Constructs a new ComposerWorkload. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse - * @classdesc Represents a ComposerWorkload. - * @implements IComposerWorkload - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload=} [properties] Properties to set - */ - function ComposerWorkload(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComposerWorkload name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload - * @instance - */ - ComposerWorkload.prototype.name = ""; - - /** - * ComposerWorkload type. - * @member {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType} type - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload - * @instance - */ - ComposerWorkload.prototype.type = 0; - - /** - * ComposerWorkload status. - * @member {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus|null|undefined} status - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload - * @instance - */ - ComposerWorkload.prototype.status = null; - - /** - * Creates a new ComposerWorkload instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload} ComposerWorkload instance - */ - ComposerWorkload.create = function create(properties) { - return new ComposerWorkload(properties); - }; - - /** - * Encodes the specified ComposerWorkload message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload} message ComposerWorkload message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComposerWorkload.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.status != null && Object.hasOwnProperty.call(message, "status")) - $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.encode(message.status, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ComposerWorkload message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload} message ComposerWorkload message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComposerWorkload.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComposerWorkload message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload} ComposerWorkload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComposerWorkload.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.type = reader.int32(); - break; - } - case 3: { - message.status = $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComposerWorkload message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload} ComposerWorkload - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComposerWorkload.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComposerWorkload message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComposerWorkload.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: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - if (message.status != null && message.hasOwnProperty("status")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.verify(message.status); - if (error) - return "status." + error; - } - return null; - }; - - /** - * Creates a ComposerWorkload message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload} ComposerWorkload - */ - ComposerWorkload.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload(); - 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 "COMPOSER_WORKLOAD_TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "CELERY_WORKER": - case 1: - message.type = 1; - break; - case "KUBERNETES_WORKER": - case 2: - message.type = 2; - break; - case "KUBERNETES_OPERATOR_POD": - case 3: - message.type = 3; - break; - case "SCHEDULER": - case 4: - message.type = 4; - break; - case "DAG_PROCESSOR": - case 5: - message.type = 5; - break; - case "TRIGGERER": - case 6: - message.type = 6; - break; - case "WEB_SERVER": - case 7: - message.type = 7; - break; - case "REDIS": - case 8: - message.type = 8; - break; - } - if (object.status != null) { - if (typeof object.status !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload.status: object expected"); - message.status = $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.fromObject(object.status); - } - return message; - }; - - /** - * Creates a plain object from a ComposerWorkload message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload} message ComposerWorkload - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComposerWorkload.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.type = options.enums === String ? "COMPOSER_WORKLOAD_TYPE_UNSPECIFIED" : 0; - object.status = null; - } - 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.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType[message.type] === undefined ? message.type : $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType[message.type] : message.type; - if (message.status != null && message.hasOwnProperty("status")) - object.status = $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.toObject(message.status, options); - return object; - }; - - /** - * Converts this ComposerWorkload to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload - * @instance - * @returns {Object.} JSON object - */ - ComposerWorkload.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComposerWorkload - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComposerWorkload.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload"; - }; - - return ComposerWorkload; - })(); - - /** - * ComposerWorkloadType enum. - * @name google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadType - * @enum {number} - * @property {number} COMPOSER_WORKLOAD_TYPE_UNSPECIFIED=0 COMPOSER_WORKLOAD_TYPE_UNSPECIFIED value - * @property {number} CELERY_WORKER=1 CELERY_WORKER value - * @property {number} KUBERNETES_WORKER=2 KUBERNETES_WORKER value - * @property {number} KUBERNETES_OPERATOR_POD=3 KUBERNETES_OPERATOR_POD value - * @property {number} SCHEDULER=4 SCHEDULER value - * @property {number} DAG_PROCESSOR=5 DAG_PROCESSOR value - * @property {number} TRIGGERER=6 TRIGGERER value - * @property {number} WEB_SERVER=7 WEB_SERVER value - * @property {number} REDIS=8 REDIS value - */ - ListWorkloadsResponse.ComposerWorkloadType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPOSER_WORKLOAD_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CELERY_WORKER"] = 1; - values[valuesById[2] = "KUBERNETES_WORKER"] = 2; - values[valuesById[3] = "KUBERNETES_OPERATOR_POD"] = 3; - values[valuesById[4] = "SCHEDULER"] = 4; - values[valuesById[5] = "DAG_PROCESSOR"] = 5; - values[valuesById[6] = "TRIGGERER"] = 6; - values[valuesById[7] = "WEB_SERVER"] = 7; - values[valuesById[8] = "REDIS"] = 8; - return values; - })(); - - ListWorkloadsResponse.ComposerWorkloadStatus = (function() { - - /** - * Properties of a ComposerWorkloadStatus. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse - * @interface IComposerWorkloadStatus - * @property {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState|null} [state] ComposerWorkloadStatus state - * @property {string|null} [statusMessage] ComposerWorkloadStatus statusMessage - * @property {string|null} [detailedStatusMessage] ComposerWorkloadStatus detailedStatusMessage - */ - - /** - * Constructs a new ComposerWorkloadStatus. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse - * @classdesc Represents a ComposerWorkloadStatus. - * @implements IComposerWorkloadStatus - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus=} [properties] Properties to set - */ - function ComposerWorkloadStatus(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ComposerWorkloadStatus state. - * @member {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState} state - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus - * @instance - */ - ComposerWorkloadStatus.prototype.state = 0; - - /** - * ComposerWorkloadStatus statusMessage. - * @member {string} statusMessage - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus - * @instance - */ - ComposerWorkloadStatus.prototype.statusMessage = ""; - - /** - * ComposerWorkloadStatus detailedStatusMessage. - * @member {string} detailedStatusMessage - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus - * @instance - */ - ComposerWorkloadStatus.prototype.detailedStatusMessage = ""; - - /** - * Creates a new ComposerWorkloadStatus instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus} ComposerWorkloadStatus instance - */ - ComposerWorkloadStatus.create = function create(properties) { - return new ComposerWorkloadStatus(properties); - }; - - /** - * Encodes the specified ComposerWorkloadStatus message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus} message ComposerWorkloadStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComposerWorkloadStatus.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.statusMessage); - if (message.detailedStatusMessage != null && Object.hasOwnProperty.call(message, "detailedStatusMessage")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.detailedStatusMessage); - return writer; - }; - - /** - * Encodes the specified ComposerWorkloadStatus message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkloadStatus} message ComposerWorkloadStatus message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ComposerWorkloadStatus.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ComposerWorkloadStatus message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus} ComposerWorkloadStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComposerWorkloadStatus.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.statusMessage = reader.string(); - break; - } - case 3: { - message.detailedStatusMessage = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ComposerWorkloadStatus message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus} ComposerWorkloadStatus - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ComposerWorkloadStatus.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ComposerWorkloadStatus message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ComposerWorkloadStatus.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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.statusMessage != null && message.hasOwnProperty("statusMessage")) - if (!$util.isString(message.statusMessage)) - return "statusMessage: string expected"; - if (message.detailedStatusMessage != null && message.hasOwnProperty("detailedStatusMessage")) - if (!$util.isString(message.detailedStatusMessage)) - return "detailedStatusMessage: string expected"; - return null; - }; - - /** - * Creates a ComposerWorkloadStatus message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus} ComposerWorkloadStatus - */ - ComposerWorkloadStatus.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus(); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "COMPOSER_WORKLOAD_STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "PENDING": - case 1: - message.state = 1; - break; - case "OK": - case 2: - message.state = 2; - break; - case "WARNING": - case 3: - message.state = 3; - break; - case "ERROR": - case 4: - message.state = 4; - break; - case "SUCCEEDED": - case 5: - message.state = 5; - break; - case "FAILED": - case 6: - message.state = 6; - break; - } - if (object.statusMessage != null) - message.statusMessage = String(object.statusMessage); - if (object.detailedStatusMessage != null) - message.detailedStatusMessage = String(object.detailedStatusMessage); - return message; - }; - - /** - * Creates a plain object from a ComposerWorkloadStatus message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus} message ComposerWorkloadStatus - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ComposerWorkloadStatus.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.state = options.enums === String ? "COMPOSER_WORKLOAD_STATE_UNSPECIFIED" : 0; - object.statusMessage = ""; - object.detailedStatusMessage = ""; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState[message.state] === undefined ? message.state : $root.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState[message.state] : message.state; - if (message.statusMessage != null && message.hasOwnProperty("statusMessage")) - object.statusMessage = message.statusMessage; - if (message.detailedStatusMessage != null && message.hasOwnProperty("detailedStatusMessage")) - object.detailedStatusMessage = message.detailedStatusMessage; - return object; - }; - - /** - * Converts this ComposerWorkloadStatus to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus - * @instance - * @returns {Object.} JSON object - */ - ComposerWorkloadStatus.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ComposerWorkloadStatus - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ComposerWorkloadStatus.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadStatus"; - }; - - return ComposerWorkloadStatus; - })(); - - /** - * ComposerWorkloadState enum. - * @name google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkloadState - * @enum {number} - * @property {number} COMPOSER_WORKLOAD_STATE_UNSPECIFIED=0 COMPOSER_WORKLOAD_STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} OK=2 OK value - * @property {number} WARNING=3 WARNING value - * @property {number} ERROR=4 ERROR value - * @property {number} SUCCEEDED=5 SUCCEEDED value - * @property {number} FAILED=6 FAILED value - */ - ListWorkloadsResponse.ComposerWorkloadState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPOSER_WORKLOAD_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "OK"] = 2; - values[valuesById[3] = "WARNING"] = 3; - values[valuesById[4] = "ERROR"] = 4; - values[valuesById[5] = "SUCCEEDED"] = 5; - values[valuesById[6] = "FAILED"] = 6; - return values; - })(); - - return ListWorkloadsResponse; - })(); - - v1beta1.SaveSnapshotRequest = (function() { - - /** - * Properties of a SaveSnapshotRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface ISaveSnapshotRequest - * @property {string|null} [environment] SaveSnapshotRequest environment - * @property {string|null} [snapshotLocation] SaveSnapshotRequest snapshotLocation - */ - - /** - * Constructs a new SaveSnapshotRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a SaveSnapshotRequest. - * @implements ISaveSnapshotRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest=} [properties] Properties to set - */ - function SaveSnapshotRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SaveSnapshotRequest environment. - * @member {string} environment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest - * @instance - */ - SaveSnapshotRequest.prototype.environment = ""; - - /** - * SaveSnapshotRequest snapshotLocation. - * @member {string} snapshotLocation - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest - * @instance - */ - SaveSnapshotRequest.prototype.snapshotLocation = ""; - - /** - * Creates a new SaveSnapshotRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest} SaveSnapshotRequest instance - */ - SaveSnapshotRequest.create = function create(properties) { - return new SaveSnapshotRequest(properties); - }; - - /** - * Encodes the specified SaveSnapshotRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest} message SaveSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SaveSnapshotRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - if (message.snapshotLocation != null && Object.hasOwnProperty.call(message, "snapshotLocation")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.snapshotLocation); - return writer; - }; - - /** - * Encodes the specified SaveSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest} message SaveSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SaveSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SaveSnapshotRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest} SaveSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SaveSnapshotRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - case 2: { - message.snapshotLocation = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SaveSnapshotRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest} SaveSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SaveSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SaveSnapshotRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SaveSnapshotRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - if (message.snapshotLocation != null && message.hasOwnProperty("snapshotLocation")) - if (!$util.isString(message.snapshotLocation)) - return "snapshotLocation: string expected"; - return null; - }; - - /** - * Creates a SaveSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest} SaveSnapshotRequest - */ - SaveSnapshotRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest(); - if (object.environment != null) - message.environment = String(object.environment); - if (object.snapshotLocation != null) - message.snapshotLocation = String(object.snapshotLocation); - return message; - }; - - /** - * Creates a plain object from a SaveSnapshotRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest} message SaveSnapshotRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SaveSnapshotRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.environment = ""; - object.snapshotLocation = ""; - } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.snapshotLocation != null && message.hasOwnProperty("snapshotLocation")) - object.snapshotLocation = message.snapshotLocation; - return object; - }; - - /** - * Converts this SaveSnapshotRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest - * @instance - * @returns {Object.} JSON object - */ - SaveSnapshotRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SaveSnapshotRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SaveSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest"; - }; - - return SaveSnapshotRequest; - })(); - - v1beta1.SaveSnapshotResponse = (function() { - - /** - * Properties of a SaveSnapshotResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface ISaveSnapshotResponse - * @property {string|null} [snapshotPath] SaveSnapshotResponse snapshotPath - */ - - /** - * Constructs a new SaveSnapshotResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a SaveSnapshotResponse. - * @implements ISaveSnapshotResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotResponse=} [properties] Properties to set - */ - function SaveSnapshotResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SaveSnapshotResponse snapshotPath. - * @member {string} snapshotPath - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse - * @instance - */ - SaveSnapshotResponse.prototype.snapshotPath = ""; - - /** - * Creates a new SaveSnapshotResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse} SaveSnapshotResponse instance - */ - SaveSnapshotResponse.create = function create(properties) { - return new SaveSnapshotResponse(properties); - }; - - /** - * Encodes the specified SaveSnapshotResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotResponse} message SaveSnapshotResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SaveSnapshotResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.snapshotPath != null && Object.hasOwnProperty.call(message, "snapshotPath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.snapshotPath); - return writer; - }; - - /** - * Encodes the specified SaveSnapshotResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotResponse} message SaveSnapshotResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SaveSnapshotResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SaveSnapshotResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse} SaveSnapshotResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SaveSnapshotResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.snapshotPath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SaveSnapshotResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse} SaveSnapshotResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SaveSnapshotResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SaveSnapshotResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SaveSnapshotResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.snapshotPath != null && message.hasOwnProperty("snapshotPath")) - if (!$util.isString(message.snapshotPath)) - return "snapshotPath: string expected"; - return null; - }; - - /** - * Creates a SaveSnapshotResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse} SaveSnapshotResponse - */ - SaveSnapshotResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse(); - if (object.snapshotPath != null) - message.snapshotPath = String(object.snapshotPath); - return message; - }; - - /** - * Creates a plain object from a SaveSnapshotResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse} message SaveSnapshotResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SaveSnapshotResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.snapshotPath = ""; - if (message.snapshotPath != null && message.hasOwnProperty("snapshotPath")) - object.snapshotPath = message.snapshotPath; - return object; - }; - - /** - * Converts this SaveSnapshotResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse - * @instance - * @returns {Object.} JSON object - */ - SaveSnapshotResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SaveSnapshotResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SaveSnapshotResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse"; - }; - - return SaveSnapshotResponse; - })(); - - v1beta1.LoadSnapshotRequest = (function() { - - /** - * Properties of a LoadSnapshotRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface ILoadSnapshotRequest - * @property {string|null} [environment] LoadSnapshotRequest environment - * @property {string|null} [snapshotPath] LoadSnapshotRequest snapshotPath - * @property {boolean|null} [skipPypiPackagesInstallation] LoadSnapshotRequest skipPypiPackagesInstallation - * @property {boolean|null} [skipEnvironmentVariablesSetting] LoadSnapshotRequest skipEnvironmentVariablesSetting - * @property {boolean|null} [skipAirflowOverridesSetting] LoadSnapshotRequest skipAirflowOverridesSetting - * @property {boolean|null} [skipGcsDataCopying] LoadSnapshotRequest skipGcsDataCopying - */ - - /** - * Constructs a new LoadSnapshotRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a LoadSnapshotRequest. - * @implements ILoadSnapshotRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest=} [properties] Properties to set - */ - function LoadSnapshotRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * LoadSnapshotRequest environment. - * @member {string} environment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest - * @instance - */ - LoadSnapshotRequest.prototype.environment = ""; - - /** - * LoadSnapshotRequest snapshotPath. - * @member {string} snapshotPath - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest - * @instance - */ - LoadSnapshotRequest.prototype.snapshotPath = ""; - - /** - * LoadSnapshotRequest skipPypiPackagesInstallation. - * @member {boolean} skipPypiPackagesInstallation - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest - * @instance - */ - LoadSnapshotRequest.prototype.skipPypiPackagesInstallation = false; - - /** - * LoadSnapshotRequest skipEnvironmentVariablesSetting. - * @member {boolean} skipEnvironmentVariablesSetting - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest - * @instance - */ - LoadSnapshotRequest.prototype.skipEnvironmentVariablesSetting = false; - - /** - * LoadSnapshotRequest skipAirflowOverridesSetting. - * @member {boolean} skipAirflowOverridesSetting - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest - * @instance - */ - LoadSnapshotRequest.prototype.skipAirflowOverridesSetting = false; - - /** - * LoadSnapshotRequest skipGcsDataCopying. - * @member {boolean} skipGcsDataCopying - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest - * @instance - */ - LoadSnapshotRequest.prototype.skipGcsDataCopying = false; - - /** - * Creates a new LoadSnapshotRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest} LoadSnapshotRequest instance - */ - LoadSnapshotRequest.create = function create(properties) { - return new LoadSnapshotRequest(properties); - }; - - /** - * Encodes the specified LoadSnapshotRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest} message LoadSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadSnapshotRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - if (message.snapshotPath != null && Object.hasOwnProperty.call(message, "snapshotPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.snapshotPath); - if (message.skipPypiPackagesInstallation != null && Object.hasOwnProperty.call(message, "skipPypiPackagesInstallation")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.skipPypiPackagesInstallation); - if (message.skipEnvironmentVariablesSetting != null && Object.hasOwnProperty.call(message, "skipEnvironmentVariablesSetting")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.skipEnvironmentVariablesSetting); - if (message.skipAirflowOverridesSetting != null && Object.hasOwnProperty.call(message, "skipAirflowOverridesSetting")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.skipAirflowOverridesSetting); - if (message.skipGcsDataCopying != null && Object.hasOwnProperty.call(message, "skipGcsDataCopying")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.skipGcsDataCopying); - return writer; - }; - - /** - * Encodes the specified LoadSnapshotRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest} message LoadSnapshotRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadSnapshotRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadSnapshotRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest} LoadSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadSnapshotRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - case 2: { - message.snapshotPath = reader.string(); - break; - } - case 3: { - message.skipPypiPackagesInstallation = reader.bool(); - break; - } - case 4: { - message.skipEnvironmentVariablesSetting = reader.bool(); - break; - } - case 5: { - message.skipAirflowOverridesSetting = reader.bool(); - break; - } - case 6: { - message.skipGcsDataCopying = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadSnapshotRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest} LoadSnapshotRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadSnapshotRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadSnapshotRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadSnapshotRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - if (message.snapshotPath != null && message.hasOwnProperty("snapshotPath")) - if (!$util.isString(message.snapshotPath)) - return "snapshotPath: string expected"; - if (message.skipPypiPackagesInstallation != null && message.hasOwnProperty("skipPypiPackagesInstallation")) - if (typeof message.skipPypiPackagesInstallation !== "boolean") - return "skipPypiPackagesInstallation: boolean expected"; - if (message.skipEnvironmentVariablesSetting != null && message.hasOwnProperty("skipEnvironmentVariablesSetting")) - if (typeof message.skipEnvironmentVariablesSetting !== "boolean") - return "skipEnvironmentVariablesSetting: boolean expected"; - if (message.skipAirflowOverridesSetting != null && message.hasOwnProperty("skipAirflowOverridesSetting")) - if (typeof message.skipAirflowOverridesSetting !== "boolean") - return "skipAirflowOverridesSetting: boolean expected"; - if (message.skipGcsDataCopying != null && message.hasOwnProperty("skipGcsDataCopying")) - if (typeof message.skipGcsDataCopying !== "boolean") - return "skipGcsDataCopying: boolean expected"; - return null; - }; - - /** - * Creates a LoadSnapshotRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest} LoadSnapshotRequest - */ - LoadSnapshotRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest(); - if (object.environment != null) - message.environment = String(object.environment); - if (object.snapshotPath != null) - message.snapshotPath = String(object.snapshotPath); - if (object.skipPypiPackagesInstallation != null) - message.skipPypiPackagesInstallation = Boolean(object.skipPypiPackagesInstallation); - if (object.skipEnvironmentVariablesSetting != null) - message.skipEnvironmentVariablesSetting = Boolean(object.skipEnvironmentVariablesSetting); - if (object.skipAirflowOverridesSetting != null) - message.skipAirflowOverridesSetting = Boolean(object.skipAirflowOverridesSetting); - if (object.skipGcsDataCopying != null) - message.skipGcsDataCopying = Boolean(object.skipGcsDataCopying); - return message; - }; - - /** - * Creates a plain object from a LoadSnapshotRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest} message LoadSnapshotRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadSnapshotRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.environment = ""; - object.snapshotPath = ""; - object.skipPypiPackagesInstallation = false; - object.skipEnvironmentVariablesSetting = false; - object.skipAirflowOverridesSetting = false; - object.skipGcsDataCopying = false; - } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.snapshotPath != null && message.hasOwnProperty("snapshotPath")) - object.snapshotPath = message.snapshotPath; - if (message.skipPypiPackagesInstallation != null && message.hasOwnProperty("skipPypiPackagesInstallation")) - object.skipPypiPackagesInstallation = message.skipPypiPackagesInstallation; - if (message.skipEnvironmentVariablesSetting != null && message.hasOwnProperty("skipEnvironmentVariablesSetting")) - object.skipEnvironmentVariablesSetting = message.skipEnvironmentVariablesSetting; - if (message.skipAirflowOverridesSetting != null && message.hasOwnProperty("skipAirflowOverridesSetting")) - object.skipAirflowOverridesSetting = message.skipAirflowOverridesSetting; - if (message.skipGcsDataCopying != null && message.hasOwnProperty("skipGcsDataCopying")) - object.skipGcsDataCopying = message.skipGcsDataCopying; - return object; - }; - - /** - * Converts this LoadSnapshotRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest - * @instance - * @returns {Object.} JSON object - */ - LoadSnapshotRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoadSnapshotRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoadSnapshotRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest"; - }; - - return LoadSnapshotRequest; - })(); - - v1beta1.LoadSnapshotResponse = (function() { - - /** - * Properties of a LoadSnapshotResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface ILoadSnapshotResponse - */ - - /** - * Constructs a new LoadSnapshotResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a LoadSnapshotResponse. - * @implements ILoadSnapshotResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotResponse=} [properties] Properties to set - */ - function LoadSnapshotResponse(properties) { - if (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 LoadSnapshotResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse} LoadSnapshotResponse instance - */ - LoadSnapshotResponse.create = function create(properties) { - return new LoadSnapshotResponse(properties); - }; - - /** - * Encodes the specified LoadSnapshotResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotResponse} message LoadSnapshotResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadSnapshotResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified LoadSnapshotResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotResponse} message LoadSnapshotResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LoadSnapshotResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LoadSnapshotResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse} LoadSnapshotResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadSnapshotResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LoadSnapshotResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse} LoadSnapshotResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LoadSnapshotResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LoadSnapshotResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LoadSnapshotResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a LoadSnapshotResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse} LoadSnapshotResponse - */ - LoadSnapshotResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse) - return object; - return new $root.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse(); - }; - - /** - * Creates a plain object from a LoadSnapshotResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse} message LoadSnapshotResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LoadSnapshotResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this LoadSnapshotResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse - * @instance - * @returns {Object.} JSON object - */ - LoadSnapshotResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LoadSnapshotResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LoadSnapshotResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse"; - }; - - return LoadSnapshotResponse; - })(); - - v1beta1.DatabaseFailoverRequest = (function() { - - /** - * Properties of a DatabaseFailoverRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IDatabaseFailoverRequest - * @property {string|null} [environment] DatabaseFailoverRequest environment - */ - - /** - * Constructs a new DatabaseFailoverRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a DatabaseFailoverRequest. - * @implements IDatabaseFailoverRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest=} [properties] Properties to set - */ - function DatabaseFailoverRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DatabaseFailoverRequest environment. - * @member {string} environment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest - * @instance - */ - DatabaseFailoverRequest.prototype.environment = ""; - - /** - * Creates a new DatabaseFailoverRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest} DatabaseFailoverRequest instance - */ - DatabaseFailoverRequest.create = function create(properties) { - return new DatabaseFailoverRequest(properties); - }; - - /** - * Encodes the specified DatabaseFailoverRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest} message DatabaseFailoverRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseFailoverRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - return writer; - }; - - /** - * Encodes the specified DatabaseFailoverRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest} message DatabaseFailoverRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseFailoverRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DatabaseFailoverRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest} DatabaseFailoverRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseFailoverRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DatabaseFailoverRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest} DatabaseFailoverRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseFailoverRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DatabaseFailoverRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DatabaseFailoverRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - return null; - }; - - /** - * Creates a DatabaseFailoverRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest} DatabaseFailoverRequest - */ - DatabaseFailoverRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest(); - if (object.environment != null) - message.environment = String(object.environment); - return message; - }; - - /** - * Creates a plain object from a DatabaseFailoverRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest} message DatabaseFailoverRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DatabaseFailoverRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.environment = ""; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - return object; - }; - - /** - * Converts this DatabaseFailoverRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest - * @instance - * @returns {Object.} JSON object - */ - DatabaseFailoverRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DatabaseFailoverRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DatabaseFailoverRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest"; - }; - - return DatabaseFailoverRequest; - })(); - - v1beta1.DatabaseFailoverResponse = (function() { - - /** - * Properties of a DatabaseFailoverResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IDatabaseFailoverResponse - */ - - /** - * Constructs a new DatabaseFailoverResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a DatabaseFailoverResponse. - * @implements IDatabaseFailoverResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverResponse=} [properties] Properties to set - */ - function DatabaseFailoverResponse(properties) { - if (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 DatabaseFailoverResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse} DatabaseFailoverResponse instance - */ - DatabaseFailoverResponse.create = function create(properties) { - return new DatabaseFailoverResponse(properties); - }; - - /** - * Encodes the specified DatabaseFailoverResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverResponse} message DatabaseFailoverResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseFailoverResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified DatabaseFailoverResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverResponse} message DatabaseFailoverResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseFailoverResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DatabaseFailoverResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse} DatabaseFailoverResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseFailoverResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DatabaseFailoverResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse} DatabaseFailoverResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseFailoverResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DatabaseFailoverResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DatabaseFailoverResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a DatabaseFailoverResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse} DatabaseFailoverResponse - */ - DatabaseFailoverResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse) - return object; - return new $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse(); - }; - - /** - * Creates a plain object from a DatabaseFailoverResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse} message DatabaseFailoverResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DatabaseFailoverResponse.toObject = function toObject() { - return {}; - }; - - /** - * Converts this DatabaseFailoverResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse - * @instance - * @returns {Object.} JSON object - */ - DatabaseFailoverResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DatabaseFailoverResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DatabaseFailoverResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse"; - }; - - return DatabaseFailoverResponse; - })(); - - v1beta1.FetchDatabasePropertiesRequest = (function() { - - /** - * Properties of a FetchDatabasePropertiesRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IFetchDatabasePropertiesRequest - * @property {string|null} [environment] FetchDatabasePropertiesRequest environment - */ - - /** - * Constructs a new FetchDatabasePropertiesRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a FetchDatabasePropertiesRequest. - * @implements IFetchDatabasePropertiesRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest=} [properties] Properties to set - */ - function FetchDatabasePropertiesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FetchDatabasePropertiesRequest environment. - * @member {string} environment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest - * @instance - */ - FetchDatabasePropertiesRequest.prototype.environment = ""; - - /** - * Creates a new FetchDatabasePropertiesRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest} FetchDatabasePropertiesRequest instance - */ - FetchDatabasePropertiesRequest.create = function create(properties) { - return new FetchDatabasePropertiesRequest(properties); - }; - - /** - * Encodes the specified FetchDatabasePropertiesRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest} message FetchDatabasePropertiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchDatabasePropertiesRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - return writer; - }; - - /** - * Encodes the specified FetchDatabasePropertiesRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest} message FetchDatabasePropertiesRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchDatabasePropertiesRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchDatabasePropertiesRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest} FetchDatabasePropertiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchDatabasePropertiesRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FetchDatabasePropertiesRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest} FetchDatabasePropertiesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchDatabasePropertiesRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchDatabasePropertiesRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchDatabasePropertiesRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - return null; - }; - - /** - * Creates a FetchDatabasePropertiesRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest} FetchDatabasePropertiesRequest - */ - FetchDatabasePropertiesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest(); - if (object.environment != null) - message.environment = String(object.environment); - return message; - }; - - /** - * Creates a plain object from a FetchDatabasePropertiesRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest} message FetchDatabasePropertiesRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchDatabasePropertiesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.environment = ""; - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - return object; - }; - - /** - * Converts this FetchDatabasePropertiesRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest - * @instance - * @returns {Object.} JSON object - */ - FetchDatabasePropertiesRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchDatabasePropertiesRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchDatabasePropertiesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest"; - }; - - return FetchDatabasePropertiesRequest; - })(); - - v1beta1.FetchDatabasePropertiesResponse = (function() { - - /** - * Properties of a FetchDatabasePropertiesResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IFetchDatabasePropertiesResponse - * @property {string|null} [primaryGceZone] FetchDatabasePropertiesResponse primaryGceZone - * @property {string|null} [secondaryGceZone] FetchDatabasePropertiesResponse secondaryGceZone - * @property {boolean|null} [isFailoverReplicaAvailable] FetchDatabasePropertiesResponse isFailoverReplicaAvailable - */ - - /** - * Constructs a new FetchDatabasePropertiesResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a FetchDatabasePropertiesResponse. - * @implements IFetchDatabasePropertiesResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse=} [properties] Properties to set - */ - function FetchDatabasePropertiesResponse(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * FetchDatabasePropertiesResponse primaryGceZone. - * @member {string} primaryGceZone - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse - * @instance - */ - FetchDatabasePropertiesResponse.prototype.primaryGceZone = ""; - - /** - * FetchDatabasePropertiesResponse secondaryGceZone. - * @member {string} secondaryGceZone - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse - * @instance - */ - FetchDatabasePropertiesResponse.prototype.secondaryGceZone = ""; - - /** - * FetchDatabasePropertiesResponse isFailoverReplicaAvailable. - * @member {boolean} isFailoverReplicaAvailable - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse - * @instance - */ - FetchDatabasePropertiesResponse.prototype.isFailoverReplicaAvailable = false; - - /** - * Creates a new FetchDatabasePropertiesResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse} FetchDatabasePropertiesResponse instance - */ - FetchDatabasePropertiesResponse.create = function create(properties) { - return new FetchDatabasePropertiesResponse(properties); - }; - - /** - * Encodes the specified FetchDatabasePropertiesResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse} message FetchDatabasePropertiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchDatabasePropertiesResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.primaryGceZone != null && Object.hasOwnProperty.call(message, "primaryGceZone")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.primaryGceZone); - if (message.secondaryGceZone != null && Object.hasOwnProperty.call(message, "secondaryGceZone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.secondaryGceZone); - if (message.isFailoverReplicaAvailable != null && Object.hasOwnProperty.call(message, "isFailoverReplicaAvailable")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.isFailoverReplicaAvailable); - return writer; - }; - - /** - * Encodes the specified FetchDatabasePropertiesResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse} message FetchDatabasePropertiesResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FetchDatabasePropertiesResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FetchDatabasePropertiesResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse} FetchDatabasePropertiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchDatabasePropertiesResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.primaryGceZone = reader.string(); - break; - } - case 2: { - message.secondaryGceZone = reader.string(); - break; - } - case 3: { - message.isFailoverReplicaAvailable = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FetchDatabasePropertiesResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse} FetchDatabasePropertiesResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FetchDatabasePropertiesResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FetchDatabasePropertiesResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FetchDatabasePropertiesResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.primaryGceZone != null && message.hasOwnProperty("primaryGceZone")) - if (!$util.isString(message.primaryGceZone)) - return "primaryGceZone: string expected"; - if (message.secondaryGceZone != null && message.hasOwnProperty("secondaryGceZone")) - if (!$util.isString(message.secondaryGceZone)) - return "secondaryGceZone: string expected"; - if (message.isFailoverReplicaAvailable != null && message.hasOwnProperty("isFailoverReplicaAvailable")) - if (typeof message.isFailoverReplicaAvailable !== "boolean") - return "isFailoverReplicaAvailable: boolean expected"; - return null; - }; - - /** - * Creates a FetchDatabasePropertiesResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse} FetchDatabasePropertiesResponse - */ - FetchDatabasePropertiesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse(); - if (object.primaryGceZone != null) - message.primaryGceZone = String(object.primaryGceZone); - if (object.secondaryGceZone != null) - message.secondaryGceZone = String(object.secondaryGceZone); - if (object.isFailoverReplicaAvailable != null) - message.isFailoverReplicaAvailable = Boolean(object.isFailoverReplicaAvailable); - return message; - }; - - /** - * Creates a plain object from a FetchDatabasePropertiesResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse} message FetchDatabasePropertiesResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FetchDatabasePropertiesResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.primaryGceZone = ""; - object.secondaryGceZone = ""; - object.isFailoverReplicaAvailable = false; - } - if (message.primaryGceZone != null && message.hasOwnProperty("primaryGceZone")) - object.primaryGceZone = message.primaryGceZone; - if (message.secondaryGceZone != null && message.hasOwnProperty("secondaryGceZone")) - object.secondaryGceZone = message.secondaryGceZone; - if (message.isFailoverReplicaAvailable != null && message.hasOwnProperty("isFailoverReplicaAvailable")) - object.isFailoverReplicaAvailable = message.isFailoverReplicaAvailable; - return object; - }; - - /** - * Converts this FetchDatabasePropertiesResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse - * @instance - * @returns {Object.} JSON object - */ - FetchDatabasePropertiesResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FetchDatabasePropertiesResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FetchDatabasePropertiesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse"; - }; - - return FetchDatabasePropertiesResponse; - })(); - - v1beta1.EnvironmentConfig = (function() { - - /** - * Properties of an EnvironmentConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IEnvironmentConfig - * @property {string|null} [gkeCluster] EnvironmentConfig gkeCluster - * @property {string|null} [dagGcsPrefix] EnvironmentConfig dagGcsPrefix - * @property {number|null} [nodeCount] EnvironmentConfig nodeCount - * @property {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig|null} [softwareConfig] EnvironmentConfig softwareConfig - * @property {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig|null} [nodeConfig] EnvironmentConfig nodeConfig - * @property {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig|null} [privateEnvironmentConfig] EnvironmentConfig privateEnvironmentConfig - * @property {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl|null} [webServerNetworkAccessControl] EnvironmentConfig webServerNetworkAccessControl - * @property {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig|null} [databaseConfig] EnvironmentConfig databaseConfig - * @property {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig|null} [webServerConfig] EnvironmentConfig webServerConfig - * @property {string|null} [airflowUri] EnvironmentConfig airflowUri - * @property {string|null} [airflowByoidUri] EnvironmentConfig airflowByoidUri - * @property {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig|null} [encryptionConfig] EnvironmentConfig encryptionConfig - * @property {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow|null} [maintenanceWindow] EnvironmentConfig maintenanceWindow - * @property {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig|null} [workloadsConfig] EnvironmentConfig workloadsConfig - * @property {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize|null} [environmentSize] EnvironmentConfig environmentSize - * @property {google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig|null} [masterAuthorizedNetworksConfig] EnvironmentConfig masterAuthorizedNetworksConfig - * @property {google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig|null} [recoveryConfig] EnvironmentConfig recoveryConfig - * @property {google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig|null} [dataRetentionConfig] EnvironmentConfig dataRetentionConfig - * @property {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode|null} [resilienceMode] EnvironmentConfig resilienceMode - */ - - /** - * Constructs a new EnvironmentConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents an EnvironmentConfig. - * @implements IEnvironmentConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig=} [properties] Properties to set - */ - function EnvironmentConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EnvironmentConfig gkeCluster. - * @member {string} gkeCluster - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.gkeCluster = ""; - - /** - * EnvironmentConfig dagGcsPrefix. - * @member {string} dagGcsPrefix - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.dagGcsPrefix = ""; - - /** - * EnvironmentConfig nodeCount. - * @member {number} nodeCount - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.nodeCount = 0; - - /** - * EnvironmentConfig softwareConfig. - * @member {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig|null|undefined} softwareConfig - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.softwareConfig = null; - - /** - * EnvironmentConfig nodeConfig. - * @member {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig|null|undefined} nodeConfig - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.nodeConfig = null; - - /** - * EnvironmentConfig privateEnvironmentConfig. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig|null|undefined} privateEnvironmentConfig - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.privateEnvironmentConfig = null; - - /** - * EnvironmentConfig webServerNetworkAccessControl. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl|null|undefined} webServerNetworkAccessControl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.webServerNetworkAccessControl = null; - - /** - * EnvironmentConfig databaseConfig. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig|null|undefined} databaseConfig - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.databaseConfig = null; - - /** - * EnvironmentConfig webServerConfig. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig|null|undefined} webServerConfig - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.webServerConfig = null; - - /** - * EnvironmentConfig airflowUri. - * @member {string} airflowUri - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.airflowUri = ""; - - /** - * EnvironmentConfig airflowByoidUri. - * @member {string} airflowByoidUri - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.airflowByoidUri = ""; - - /** - * EnvironmentConfig encryptionConfig. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig|null|undefined} encryptionConfig - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.encryptionConfig = null; - - /** - * EnvironmentConfig maintenanceWindow. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow|null|undefined} maintenanceWindow - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.maintenanceWindow = null; - - /** - * EnvironmentConfig workloadsConfig. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig|null|undefined} workloadsConfig - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.workloadsConfig = null; - - /** - * EnvironmentConfig environmentSize. - * @member {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize} environmentSize - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.environmentSize = 0; - - /** - * EnvironmentConfig masterAuthorizedNetworksConfig. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig|null|undefined} masterAuthorizedNetworksConfig - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.masterAuthorizedNetworksConfig = null; - - /** - * EnvironmentConfig recoveryConfig. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig|null|undefined} recoveryConfig - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.recoveryConfig = null; - - /** - * EnvironmentConfig dataRetentionConfig. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig|null|undefined} dataRetentionConfig - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.dataRetentionConfig = null; - - /** - * EnvironmentConfig resilienceMode. - * @member {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode} resilienceMode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - */ - EnvironmentConfig.prototype.resilienceMode = 0; - - /** - * Creates a new EnvironmentConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} EnvironmentConfig instance - */ - EnvironmentConfig.create = function create(properties) { - return new EnvironmentConfig(properties); - }; - - /** - * Encodes the specified EnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig} message EnvironmentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnvironmentConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.gkeCluster != null && Object.hasOwnProperty.call(message, "gkeCluster")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.gkeCluster); - if (message.dagGcsPrefix != null && Object.hasOwnProperty.call(message, "dagGcsPrefix")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.dagGcsPrefix); - if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.nodeCount); - if (message.softwareConfig != null && Object.hasOwnProperty.call(message, "softwareConfig")) - $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.encode(message.softwareConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.nodeConfig != null && Object.hasOwnProperty.call(message, "nodeConfig")) - $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.encode(message.nodeConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.airflowUri != null && Object.hasOwnProperty.call(message, "airflowUri")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.airflowUri); - if (message.privateEnvironmentConfig != null && Object.hasOwnProperty.call(message, "privateEnvironmentConfig")) - $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.encode(message.privateEnvironmentConfig, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.webServerNetworkAccessControl != null && Object.hasOwnProperty.call(message, "webServerNetworkAccessControl")) - $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.encode(message.webServerNetworkAccessControl, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.databaseConfig != null && Object.hasOwnProperty.call(message, "databaseConfig")) - $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.encode(message.databaseConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.webServerConfig != null && Object.hasOwnProperty.call(message, "webServerConfig")) - $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.encode(message.webServerConfig, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.encryptionConfig != null && Object.hasOwnProperty.call(message, "encryptionConfig")) - $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.encode(message.encryptionConfig, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.maintenanceWindow != null && Object.hasOwnProperty.call(message, "maintenanceWindow")) - $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.encode(message.maintenanceWindow, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - if (message.workloadsConfig != null && Object.hasOwnProperty.call(message, "workloadsConfig")) - $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.encode(message.workloadsConfig, writer.uint32(/* id 15, wireType 2 =*/122).fork()).ldelim(); - if (message.environmentSize != null && Object.hasOwnProperty.call(message, "environmentSize")) - writer.uint32(/* id 16, wireType 0 =*/128).int32(message.environmentSize); - if (message.masterAuthorizedNetworksConfig != null && Object.hasOwnProperty.call(message, "masterAuthorizedNetworksConfig")) - $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.encode(message.masterAuthorizedNetworksConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.recoveryConfig != null && Object.hasOwnProperty.call(message, "recoveryConfig")) - $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.encode(message.recoveryConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); - if (message.dataRetentionConfig != null && Object.hasOwnProperty.call(message, "dataRetentionConfig")) - $root.google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.encode(message.dataRetentionConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.resilienceMode != null && Object.hasOwnProperty.call(message, "resilienceMode")) - writer.uint32(/* id 20, wireType 0 =*/160).int32(message.resilienceMode); - if (message.airflowByoidUri != null && Object.hasOwnProperty.call(message, "airflowByoidUri")) - writer.uint32(/* id 21, wireType 2 =*/170).string(message.airflowByoidUri); - return writer; - }; - - /** - * Encodes the specified EnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig} message EnvironmentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnvironmentConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnvironmentConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} EnvironmentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnvironmentConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.gkeCluster = reader.string(); - break; - } - case 2: { - message.dagGcsPrefix = reader.string(); - break; - } - case 3: { - message.nodeCount = reader.int32(); - break; - } - case 4: { - message.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.decode(reader, reader.uint32()); - break; - } - case 7: { - message.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.decode(reader, reader.uint32()); - break; - } - case 9: { - message.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.decode(reader, reader.uint32()); - break; - } - case 10: { - message.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.decode(reader, reader.uint32()); - break; - } - case 11: { - message.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.decode(reader, reader.uint32()); - break; - } - case 6: { - message.airflowUri = reader.string(); - break; - } - case 21: { - message.airflowByoidUri = reader.string(); - break; - } - case 12: { - message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.decode(reader, reader.uint32()); - break; - } - case 13: { - message.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.decode(reader, reader.uint32()); - break; - } - case 15: { - message.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.decode(reader, reader.uint32()); - break; - } - case 16: { - message.environmentSize = reader.int32(); - break; - } - case 17: { - message.masterAuthorizedNetworksConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.decode(reader, reader.uint32()); - break; - } - case 18: { - message.recoveryConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.decode(reader, reader.uint32()); - break; - } - case 19: { - message.dataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.decode(reader, reader.uint32()); - break; - } - case 20: { - message.resilienceMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnvironmentConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} EnvironmentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnvironmentConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnvironmentConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnvironmentConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) - if (!$util.isString(message.gkeCluster)) - return "gkeCluster: string expected"; - if (message.dagGcsPrefix != null && message.hasOwnProperty("dagGcsPrefix")) - if (!$util.isString(message.dagGcsPrefix)) - return "dagGcsPrefix: string expected"; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - if (!$util.isInteger(message.nodeCount)) - return "nodeCount: integer expected"; - if (message.softwareConfig != null && message.hasOwnProperty("softwareConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.verify(message.softwareConfig); - if (error) - return "softwareConfig." + error; - } - if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.verify(message.nodeConfig); - if (error) - return "nodeConfig." + error; - } - if (message.privateEnvironmentConfig != null && message.hasOwnProperty("privateEnvironmentConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.verify(message.privateEnvironmentConfig); - if (error) - return "privateEnvironmentConfig." + error; - } - if (message.webServerNetworkAccessControl != null && message.hasOwnProperty("webServerNetworkAccessControl")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.verify(message.webServerNetworkAccessControl); - if (error) - return "webServerNetworkAccessControl." + error; - } - if (message.databaseConfig != null && message.hasOwnProperty("databaseConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.verify(message.databaseConfig); - if (error) - return "databaseConfig." + error; - } - if (message.webServerConfig != null && message.hasOwnProperty("webServerConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.verify(message.webServerConfig); - if (error) - return "webServerConfig." + error; - } - if (message.airflowUri != null && message.hasOwnProperty("airflowUri")) - if (!$util.isString(message.airflowUri)) - return "airflowUri: string expected"; - if (message.airflowByoidUri != null && message.hasOwnProperty("airflowByoidUri")) - if (!$util.isString(message.airflowByoidUri)) - return "airflowByoidUri: string expected"; - if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.verify(message.encryptionConfig); - if (error) - return "encryptionConfig." + error; - } - if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.verify(message.maintenanceWindow); - if (error) - return "maintenanceWindow." + error; - } - if (message.workloadsConfig != null && message.hasOwnProperty("workloadsConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.verify(message.workloadsConfig); - if (error) - return "workloadsConfig." + error; - } - if (message.environmentSize != null && message.hasOwnProperty("environmentSize")) - switch (message.environmentSize) { - default: - return "environmentSize: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.verify(message.masterAuthorizedNetworksConfig); - if (error) - return "masterAuthorizedNetworksConfig." + error; - } - if (message.recoveryConfig != null && message.hasOwnProperty("recoveryConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.verify(message.recoveryConfig); - if (error) - return "recoveryConfig." + error; - } - if (message.dataRetentionConfig != null && message.hasOwnProperty("dataRetentionConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.verify(message.dataRetentionConfig); - if (error) - return "dataRetentionConfig." + error; - } - if (message.resilienceMode != null && message.hasOwnProperty("resilienceMode")) - switch (message.resilienceMode) { - default: - return "resilienceMode: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an EnvironmentConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} EnvironmentConfig - */ - EnvironmentConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig(); - if (object.gkeCluster != null) - message.gkeCluster = String(object.gkeCluster); - if (object.dagGcsPrefix != null) - message.dagGcsPrefix = String(object.dagGcsPrefix); - if (object.nodeCount != null) - message.nodeCount = object.nodeCount | 0; - if (object.softwareConfig != null) { - if (typeof object.softwareConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.softwareConfig: object expected"); - message.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.fromObject(object.softwareConfig); - } - if (object.nodeConfig != null) { - if (typeof object.nodeConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.nodeConfig: object expected"); - message.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.fromObject(object.nodeConfig); - } - if (object.privateEnvironmentConfig != null) { - if (typeof object.privateEnvironmentConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.privateEnvironmentConfig: object expected"); - message.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.fromObject(object.privateEnvironmentConfig); - } - if (object.webServerNetworkAccessControl != null) { - if (typeof object.webServerNetworkAccessControl !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.webServerNetworkAccessControl: object expected"); - message.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.fromObject(object.webServerNetworkAccessControl); - } - if (object.databaseConfig != null) { - if (typeof object.databaseConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.databaseConfig: object expected"); - message.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.fromObject(object.databaseConfig); - } - if (object.webServerConfig != null) { - if (typeof object.webServerConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.webServerConfig: object expected"); - message.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.fromObject(object.webServerConfig); - } - if (object.airflowUri != null) - message.airflowUri = String(object.airflowUri); - if (object.airflowByoidUri != null) - message.airflowByoidUri = String(object.airflowByoidUri); - if (object.encryptionConfig != null) { - if (typeof object.encryptionConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.encryptionConfig: object expected"); - message.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.fromObject(object.encryptionConfig); - } - if (object.maintenanceWindow != null) { - if (typeof object.maintenanceWindow !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.maintenanceWindow: object expected"); - message.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.fromObject(object.maintenanceWindow); - } - if (object.workloadsConfig != null) { - if (typeof object.workloadsConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.workloadsConfig: object expected"); - message.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.fromObject(object.workloadsConfig); - } - switch (object.environmentSize) { - default: - if (typeof object.environmentSize === "number") { - message.environmentSize = object.environmentSize; - break; - } - break; - case "ENVIRONMENT_SIZE_UNSPECIFIED": - case 0: - message.environmentSize = 0; - break; - case "ENVIRONMENT_SIZE_SMALL": - case 1: - message.environmentSize = 1; - break; - case "ENVIRONMENT_SIZE_MEDIUM": - case 2: - message.environmentSize = 2; - break; - case "ENVIRONMENT_SIZE_LARGE": - case 3: - message.environmentSize = 3; - break; - } - if (object.masterAuthorizedNetworksConfig != null) { - if (typeof object.masterAuthorizedNetworksConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.masterAuthorizedNetworksConfig: object expected"); - message.masterAuthorizedNetworksConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.fromObject(object.masterAuthorizedNetworksConfig); - } - if (object.recoveryConfig != null) { - if (typeof object.recoveryConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.recoveryConfig: object expected"); - message.recoveryConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.fromObject(object.recoveryConfig); - } - if (object.dataRetentionConfig != null) { - if (typeof object.dataRetentionConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.dataRetentionConfig: object expected"); - message.dataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.fromObject(object.dataRetentionConfig); - } - switch (object.resilienceMode) { - default: - if (typeof object.resilienceMode === "number") { - message.resilienceMode = object.resilienceMode; - break; - } - break; - case "RESILIENCE_MODE_UNSPECIFIED": - case 0: - message.resilienceMode = 0; - break; - case "HIGH_RESILIENCE": - case 1: - message.resilienceMode = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an EnvironmentConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig} message EnvironmentConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnvironmentConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.gkeCluster = ""; - object.dagGcsPrefix = ""; - object.nodeCount = 0; - object.softwareConfig = null; - object.nodeConfig = null; - object.airflowUri = ""; - object.privateEnvironmentConfig = null; - object.webServerNetworkAccessControl = null; - object.databaseConfig = null; - object.webServerConfig = null; - object.encryptionConfig = null; - object.maintenanceWindow = null; - object.workloadsConfig = null; - object.environmentSize = options.enums === String ? "ENVIRONMENT_SIZE_UNSPECIFIED" : 0; - object.masterAuthorizedNetworksConfig = null; - object.recoveryConfig = null; - object.dataRetentionConfig = null; - object.resilienceMode = options.enums === String ? "RESILIENCE_MODE_UNSPECIFIED" : 0; - object.airflowByoidUri = ""; - } - if (message.gkeCluster != null && message.hasOwnProperty("gkeCluster")) - object.gkeCluster = message.gkeCluster; - if (message.dagGcsPrefix != null && message.hasOwnProperty("dagGcsPrefix")) - object.dagGcsPrefix = message.dagGcsPrefix; - if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) - object.nodeCount = message.nodeCount; - if (message.softwareConfig != null && message.hasOwnProperty("softwareConfig")) - object.softwareConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.toObject(message.softwareConfig, options); - if (message.nodeConfig != null && message.hasOwnProperty("nodeConfig")) - object.nodeConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.toObject(message.nodeConfig, options); - if (message.airflowUri != null && message.hasOwnProperty("airflowUri")) - object.airflowUri = message.airflowUri; - if (message.privateEnvironmentConfig != null && message.hasOwnProperty("privateEnvironmentConfig")) - object.privateEnvironmentConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.toObject(message.privateEnvironmentConfig, options); - if (message.webServerNetworkAccessControl != null && message.hasOwnProperty("webServerNetworkAccessControl")) - object.webServerNetworkAccessControl = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.toObject(message.webServerNetworkAccessControl, options); - if (message.databaseConfig != null && message.hasOwnProperty("databaseConfig")) - object.databaseConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.toObject(message.databaseConfig, options); - if (message.webServerConfig != null && message.hasOwnProperty("webServerConfig")) - object.webServerConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.toObject(message.webServerConfig, options); - if (message.encryptionConfig != null && message.hasOwnProperty("encryptionConfig")) - object.encryptionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.toObject(message.encryptionConfig, options); - if (message.maintenanceWindow != null && message.hasOwnProperty("maintenanceWindow")) - object.maintenanceWindow = $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.toObject(message.maintenanceWindow, options); - if (message.workloadsConfig != null && message.hasOwnProperty("workloadsConfig")) - object.workloadsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.toObject(message.workloadsConfig, options); - if (message.environmentSize != null && message.hasOwnProperty("environmentSize")) - object.environmentSize = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize[message.environmentSize] === undefined ? message.environmentSize : $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize[message.environmentSize] : message.environmentSize; - if (message.masterAuthorizedNetworksConfig != null && message.hasOwnProperty("masterAuthorizedNetworksConfig")) - object.masterAuthorizedNetworksConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.toObject(message.masterAuthorizedNetworksConfig, options); - if (message.recoveryConfig != null && message.hasOwnProperty("recoveryConfig")) - object.recoveryConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.toObject(message.recoveryConfig, options); - if (message.dataRetentionConfig != null && message.hasOwnProperty("dataRetentionConfig")) - object.dataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.toObject(message.dataRetentionConfig, options); - if (message.resilienceMode != null && message.hasOwnProperty("resilienceMode")) - object.resilienceMode = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode[message.resilienceMode] === undefined ? message.resilienceMode : $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode[message.resilienceMode] : message.resilienceMode; - if (message.airflowByoidUri != null && message.hasOwnProperty("airflowByoidUri")) - object.airflowByoidUri = message.airflowByoidUri; - return object; - }; - - /** - * Converts this EnvironmentConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @instance - * @returns {Object.} JSON object - */ - EnvironmentConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnvironmentConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnvironmentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig"; - }; - - /** - * EnvironmentSize enum. - * @name google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.EnvironmentSize - * @enum {number} - * @property {number} ENVIRONMENT_SIZE_UNSPECIFIED=0 ENVIRONMENT_SIZE_UNSPECIFIED value - * @property {number} ENVIRONMENT_SIZE_SMALL=1 ENVIRONMENT_SIZE_SMALL value - * @property {number} ENVIRONMENT_SIZE_MEDIUM=2 ENVIRONMENT_SIZE_MEDIUM value - * @property {number} ENVIRONMENT_SIZE_LARGE=3 ENVIRONMENT_SIZE_LARGE value - */ - EnvironmentConfig.EnvironmentSize = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENVIRONMENT_SIZE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ENVIRONMENT_SIZE_SMALL"] = 1; - values[valuesById[2] = "ENVIRONMENT_SIZE_MEDIUM"] = 2; - values[valuesById[3] = "ENVIRONMENT_SIZE_LARGE"] = 3; - return values; - })(); - - /** - * ResilienceMode enum. - * @name google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.ResilienceMode - * @enum {number} - * @property {number} RESILIENCE_MODE_UNSPECIFIED=0 RESILIENCE_MODE_UNSPECIFIED value - * @property {number} HIGH_RESILIENCE=1 HIGH_RESILIENCE value - */ - EnvironmentConfig.ResilienceMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RESILIENCE_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "HIGH_RESILIENCE"] = 1; - return values; - })(); - - return EnvironmentConfig; - })(); - - v1beta1.WebServerNetworkAccessControl = (function() { - - /** - * Properties of a WebServerNetworkAccessControl. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IWebServerNetworkAccessControl - * @property {Array.|null} [allowedIpRanges] WebServerNetworkAccessControl allowedIpRanges - */ - - /** - * Constructs a new WebServerNetworkAccessControl. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a WebServerNetworkAccessControl. - * @implements IWebServerNetworkAccessControl - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl=} [properties] Properties to set - */ - function WebServerNetworkAccessControl(properties) { - this.allowedIpRanges = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WebServerNetworkAccessControl allowedIpRanges. - * @member {Array.} allowedIpRanges - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl - * @instance - */ - WebServerNetworkAccessControl.prototype.allowedIpRanges = $util.emptyArray; - - /** - * Creates a new WebServerNetworkAccessControl instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} WebServerNetworkAccessControl instance - */ - WebServerNetworkAccessControl.create = function create(properties) { - return new WebServerNetworkAccessControl(properties); - }; - - /** - * Encodes the specified WebServerNetworkAccessControl message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl} message WebServerNetworkAccessControl message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebServerNetworkAccessControl.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowedIpRanges != null && message.allowedIpRanges.length) - for (var i = 0; i < message.allowedIpRanges.length; ++i) - $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.encode(message.allowedIpRanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WebServerNetworkAccessControl message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerNetworkAccessControl} message WebServerNetworkAccessControl message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebServerNetworkAccessControl.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} WebServerNetworkAccessControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebServerNetworkAccessControl.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.allowedIpRanges && message.allowedIpRanges.length)) - message.allowedIpRanges = []; - message.allowedIpRanges.push($root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WebServerNetworkAccessControl message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} WebServerNetworkAccessControl - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebServerNetworkAccessControl.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WebServerNetworkAccessControl message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WebServerNetworkAccessControl.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowedIpRanges != null && message.hasOwnProperty("allowedIpRanges")) { - if (!Array.isArray(message.allowedIpRanges)) - return "allowedIpRanges: array expected"; - for (var i = 0; i < message.allowedIpRanges.length; ++i) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.verify(message.allowedIpRanges[i]); - if (error) - return "allowedIpRanges." + error; - } - } - return null; - }; - - /** - * Creates a WebServerNetworkAccessControl message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} WebServerNetworkAccessControl - */ - WebServerNetworkAccessControl.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl(); - if (object.allowedIpRanges) { - if (!Array.isArray(object.allowedIpRanges)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.allowedIpRanges: array expected"); - message.allowedIpRanges = []; - for (var i = 0; i < object.allowedIpRanges.length; ++i) { - if (typeof object.allowedIpRanges[i] !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.allowedIpRanges: object expected"); - message.allowedIpRanges[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.fromObject(object.allowedIpRanges[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a WebServerNetworkAccessControl message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl} message WebServerNetworkAccessControl - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WebServerNetworkAccessControl.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.allowedIpRanges = []; - if (message.allowedIpRanges && message.allowedIpRanges.length) { - object.allowedIpRanges = []; - for (var j = 0; j < message.allowedIpRanges.length; ++j) - object.allowedIpRanges[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.toObject(message.allowedIpRanges[j], options); - } - return object; - }; - - /** - * Converts this WebServerNetworkAccessControl to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl - * @instance - * @returns {Object.} JSON object - */ - WebServerNetworkAccessControl.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WebServerNetworkAccessControl - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WebServerNetworkAccessControl.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl"; - }; - - WebServerNetworkAccessControl.AllowedIpRange = (function() { - - /** - * Properties of an AllowedIpRange. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl - * @interface IAllowedIpRange - * @property {string|null} [value] AllowedIpRange value - * @property {string|null} [description] AllowedIpRange description - */ - - /** - * Constructs a new AllowedIpRange. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl - * @classdesc Represents an AllowedIpRange. - * @implements IAllowedIpRange - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange=} [properties] Properties to set - */ - function AllowedIpRange(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AllowedIpRange value. - * @member {string} value - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange - * @instance - */ - AllowedIpRange.prototype.value = ""; - - /** - * AllowedIpRange description. - * @member {string} description - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange - * @instance - */ - AllowedIpRange.prototype.description = ""; - - /** - * Creates a new AllowedIpRange instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange instance - */ - AllowedIpRange.create = function create(properties) { - return new AllowedIpRange(properties); - }; - - /** - * Encodes the specified AllowedIpRange message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange} message AllowedIpRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AllowedIpRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.value); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - return writer; - }; - - /** - * Encodes the specified AllowedIpRange message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.IAllowedIpRange} message AllowedIpRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AllowedIpRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AllowedIpRange message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AllowedIpRange.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.value = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AllowedIpRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AllowedIpRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AllowedIpRange message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AllowedIpRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates an AllowedIpRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} AllowedIpRange - */ - AllowedIpRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange(); - if (object.value != null) - message.value = String(object.value); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from an AllowedIpRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange} message AllowedIpRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AllowedIpRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.description = ""; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this AllowedIpRange to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange - * @instance - * @returns {Object.} JSON object - */ - AllowedIpRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AllowedIpRange - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AllowedIpRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WebServerNetworkAccessControl.AllowedIpRange"; - }; - - return AllowedIpRange; - })(); - - return WebServerNetworkAccessControl; - })(); - - v1beta1.SoftwareConfig = (function() { - - /** - * Properties of a SoftwareConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface ISoftwareConfig - * @property {string|null} [imageVersion] SoftwareConfig imageVersion - * @property {Object.|null} [airflowConfigOverrides] SoftwareConfig airflowConfigOverrides - * @property {Object.|null} [pypiPackages] SoftwareConfig pypiPackages - * @property {Object.|null} [envVariables] SoftwareConfig envVariables - * @property {string|null} [pythonVersion] SoftwareConfig pythonVersion - * @property {number|null} [schedulerCount] SoftwareConfig schedulerCount - * @property {google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration|null} [cloudDataLineageIntegration] SoftwareConfig cloudDataLineageIntegration - * @property {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode|null} [webServerPluginsMode] SoftwareConfig webServerPluginsMode - */ - - /** - * Constructs a new SoftwareConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a SoftwareConfig. - * @implements ISoftwareConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig=} [properties] Properties to set - */ - function SoftwareConfig(properties) { - this.airflowConfigOverrides = {}; - this.pypiPackages = {}; - this.envVariables = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SoftwareConfig imageVersion. - * @member {string} imageVersion - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @instance - */ - SoftwareConfig.prototype.imageVersion = ""; - - /** - * SoftwareConfig airflowConfigOverrides. - * @member {Object.} airflowConfigOverrides - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @instance - */ - SoftwareConfig.prototype.airflowConfigOverrides = $util.emptyObject; - - /** - * SoftwareConfig pypiPackages. - * @member {Object.} pypiPackages - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @instance - */ - SoftwareConfig.prototype.pypiPackages = $util.emptyObject; - - /** - * SoftwareConfig envVariables. - * @member {Object.} envVariables - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @instance - */ - SoftwareConfig.prototype.envVariables = $util.emptyObject; - - /** - * SoftwareConfig pythonVersion. - * @member {string} pythonVersion - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @instance - */ - SoftwareConfig.prototype.pythonVersion = ""; - - /** - * SoftwareConfig schedulerCount. - * @member {number} schedulerCount - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @instance - */ - SoftwareConfig.prototype.schedulerCount = 0; - - /** - * SoftwareConfig cloudDataLineageIntegration. - * @member {google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration|null|undefined} cloudDataLineageIntegration - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @instance - */ - SoftwareConfig.prototype.cloudDataLineageIntegration = null; - - /** - * SoftwareConfig webServerPluginsMode. - * @member {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode} webServerPluginsMode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @instance - */ - SoftwareConfig.prototype.webServerPluginsMode = 0; - - /** - * Creates a new SoftwareConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} SoftwareConfig instance - */ - SoftwareConfig.create = function create(properties) { - return new SoftwareConfig(properties); - }; - - /** - * Encodes the specified SoftwareConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig} message SoftwareConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SoftwareConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageVersion); - if (message.airflowConfigOverrides != null && Object.hasOwnProperty.call(message, "airflowConfigOverrides")) - for (var keys = Object.keys(message.airflowConfigOverrides), 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.airflowConfigOverrides[keys[i]]).ldelim(); - if (message.pypiPackages != null && Object.hasOwnProperty.call(message, "pypiPackages")) - for (var keys = Object.keys(message.pypiPackages), 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.pypiPackages[keys[i]]).ldelim(); - if (message.envVariables != null && Object.hasOwnProperty.call(message, "envVariables")) - for (var keys = Object.keys(message.envVariables), i = 0; i < keys.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.envVariables[keys[i]]).ldelim(); - if (message.pythonVersion != null && Object.hasOwnProperty.call(message, "pythonVersion")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.pythonVersion); - if (message.schedulerCount != null && Object.hasOwnProperty.call(message, "schedulerCount")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.schedulerCount); - if (message.cloudDataLineageIntegration != null && Object.hasOwnProperty.call(message, "cloudDataLineageIntegration")) - $root.google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.encode(message.cloudDataLineageIntegration, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.webServerPluginsMode != null && Object.hasOwnProperty.call(message, "webServerPluginsMode")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.webServerPluginsMode); - return writer; - }; - - /** - * Encodes the specified SoftwareConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ISoftwareConfig} message SoftwareConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SoftwareConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SoftwareConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} SoftwareConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SoftwareConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.imageVersion = reader.string(); - break; - } - case 2: { - if (message.airflowConfigOverrides === $util.emptyObject) - message.airflowConfigOverrides = {}; - 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.airflowConfigOverrides[key] = value; - break; - } - case 3: { - if (message.pypiPackages === $util.emptyObject) - message.pypiPackages = {}; - 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.pypiPackages[key] = value; - break; - } - case 4: { - if (message.envVariables === $util.emptyObject) - message.envVariables = {}; - 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.envVariables[key] = value; - break; - } - case 6: { - message.pythonVersion = reader.string(); - break; - } - case 7: { - message.schedulerCount = reader.int32(); - break; - } - case 8: { - message.cloudDataLineageIntegration = $root.google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.decode(reader, reader.uint32()); - break; - } - case 10: { - message.webServerPluginsMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SoftwareConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} SoftwareConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SoftwareConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SoftwareConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SoftwareConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) - if (!$util.isString(message.imageVersion)) - return "imageVersion: string expected"; - if (message.airflowConfigOverrides != null && message.hasOwnProperty("airflowConfigOverrides")) { - if (!$util.isObject(message.airflowConfigOverrides)) - return "airflowConfigOverrides: object expected"; - var key = Object.keys(message.airflowConfigOverrides); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.airflowConfigOverrides[key[i]])) - return "airflowConfigOverrides: string{k:string} expected"; - } - if (message.pypiPackages != null && message.hasOwnProperty("pypiPackages")) { - if (!$util.isObject(message.pypiPackages)) - return "pypiPackages: object expected"; - var key = Object.keys(message.pypiPackages); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.pypiPackages[key[i]])) - return "pypiPackages: string{k:string} expected"; - } - if (message.envVariables != null && message.hasOwnProperty("envVariables")) { - if (!$util.isObject(message.envVariables)) - return "envVariables: object expected"; - var key = Object.keys(message.envVariables); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.envVariables[key[i]])) - return "envVariables: string{k:string} expected"; - } - if (message.pythonVersion != null && message.hasOwnProperty("pythonVersion")) - if (!$util.isString(message.pythonVersion)) - return "pythonVersion: string expected"; - if (message.schedulerCount != null && message.hasOwnProperty("schedulerCount")) - if (!$util.isInteger(message.schedulerCount)) - return "schedulerCount: integer expected"; - if (message.cloudDataLineageIntegration != null && message.hasOwnProperty("cloudDataLineageIntegration")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.verify(message.cloudDataLineageIntegration); - if (error) - return "cloudDataLineageIntegration." + error; - } - if (message.webServerPluginsMode != null && message.hasOwnProperty("webServerPluginsMode")) - switch (message.webServerPluginsMode) { - default: - return "webServerPluginsMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a SoftwareConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} SoftwareConfig - */ - SoftwareConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig(); - if (object.imageVersion != null) - message.imageVersion = String(object.imageVersion); - if (object.airflowConfigOverrides) { - if (typeof object.airflowConfigOverrides !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.airflowConfigOverrides: object expected"); - message.airflowConfigOverrides = {}; - for (var keys = Object.keys(object.airflowConfigOverrides), i = 0; i < keys.length; ++i) - message.airflowConfigOverrides[keys[i]] = String(object.airflowConfigOverrides[keys[i]]); - } - if (object.pypiPackages) { - if (typeof object.pypiPackages !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.pypiPackages: object expected"); - message.pypiPackages = {}; - for (var keys = Object.keys(object.pypiPackages), i = 0; i < keys.length; ++i) - message.pypiPackages[keys[i]] = String(object.pypiPackages[keys[i]]); - } - if (object.envVariables) { - if (typeof object.envVariables !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.envVariables: object expected"); - message.envVariables = {}; - for (var keys = Object.keys(object.envVariables), i = 0; i < keys.length; ++i) - message.envVariables[keys[i]] = String(object.envVariables[keys[i]]); - } - if (object.pythonVersion != null) - message.pythonVersion = String(object.pythonVersion); - if (object.schedulerCount != null) - message.schedulerCount = object.schedulerCount | 0; - if (object.cloudDataLineageIntegration != null) { - if (typeof object.cloudDataLineageIntegration !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.cloudDataLineageIntegration: object expected"); - message.cloudDataLineageIntegration = $root.google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.fromObject(object.cloudDataLineageIntegration); - } - switch (object.webServerPluginsMode) { - default: - if (typeof object.webServerPluginsMode === "number") { - message.webServerPluginsMode = object.webServerPluginsMode; - break; - } - break; - case "WEB_SERVER_PLUGINS_MODE_UNSPECIFIED": - case 0: - message.webServerPluginsMode = 0; - break; - case "PLUGINS_DISABLED": - case 1: - message.webServerPluginsMode = 1; - break; - case "PLUGINS_ENABLED": - case 2: - message.webServerPluginsMode = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a SoftwareConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig} message SoftwareConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SoftwareConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) { - object.airflowConfigOverrides = {}; - object.pypiPackages = {}; - object.envVariables = {}; - } - if (options.defaults) { - object.imageVersion = ""; - object.pythonVersion = ""; - object.schedulerCount = 0; - object.cloudDataLineageIntegration = null; - object.webServerPluginsMode = options.enums === String ? "WEB_SERVER_PLUGINS_MODE_UNSPECIFIED" : 0; - } - if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) - object.imageVersion = message.imageVersion; - var keys2; - if (message.airflowConfigOverrides && (keys2 = Object.keys(message.airflowConfigOverrides)).length) { - object.airflowConfigOverrides = {}; - for (var j = 0; j < keys2.length; ++j) - object.airflowConfigOverrides[keys2[j]] = message.airflowConfigOverrides[keys2[j]]; - } - if (message.pypiPackages && (keys2 = Object.keys(message.pypiPackages)).length) { - object.pypiPackages = {}; - for (var j = 0; j < keys2.length; ++j) - object.pypiPackages[keys2[j]] = message.pypiPackages[keys2[j]]; - } - if (message.envVariables && (keys2 = Object.keys(message.envVariables)).length) { - object.envVariables = {}; - for (var j = 0; j < keys2.length; ++j) - object.envVariables[keys2[j]] = message.envVariables[keys2[j]]; - } - if (message.pythonVersion != null && message.hasOwnProperty("pythonVersion")) - object.pythonVersion = message.pythonVersion; - if (message.schedulerCount != null && message.hasOwnProperty("schedulerCount")) - object.schedulerCount = message.schedulerCount; - if (message.cloudDataLineageIntegration != null && message.hasOwnProperty("cloudDataLineageIntegration")) - object.cloudDataLineageIntegration = $root.google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.toObject(message.cloudDataLineageIntegration, options); - if (message.webServerPluginsMode != null && message.hasOwnProperty("webServerPluginsMode")) - object.webServerPluginsMode = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode[message.webServerPluginsMode] === undefined ? message.webServerPluginsMode : $root.google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode[message.webServerPluginsMode] : message.webServerPluginsMode; - return object; - }; - - /** - * Converts this SoftwareConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @instance - * @returns {Object.} JSON object - */ - SoftwareConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SoftwareConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SoftwareConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig"; - }; - - /** - * WebServerPluginsMode enum. - * @name google.cloud.orchestration.airflow.service.v1beta1.SoftwareConfig.WebServerPluginsMode - * @enum {number} - * @property {number} WEB_SERVER_PLUGINS_MODE_UNSPECIFIED=0 WEB_SERVER_PLUGINS_MODE_UNSPECIFIED value - * @property {number} PLUGINS_DISABLED=1 PLUGINS_DISABLED value - * @property {number} PLUGINS_ENABLED=2 PLUGINS_ENABLED value - */ - SoftwareConfig.WebServerPluginsMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "WEB_SERVER_PLUGINS_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PLUGINS_DISABLED"] = 1; - values[valuesById[2] = "PLUGINS_ENABLED"] = 2; - return values; - })(); - - return SoftwareConfig; - })(); - - v1beta1.IPAllocationPolicy = (function() { - - /** - * Properties of a IPAllocationPolicy. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IIPAllocationPolicy - * @property {boolean|null} [useIpAliases] IPAllocationPolicy useIpAliases - * @property {string|null} [clusterSecondaryRangeName] IPAllocationPolicy clusterSecondaryRangeName - * @property {string|null} [servicesSecondaryRangeName] IPAllocationPolicy servicesSecondaryRangeName - * @property {string|null} [clusterIpv4CidrBlock] IPAllocationPolicy clusterIpv4CidrBlock - * @property {string|null} [servicesIpv4CidrBlock] IPAllocationPolicy servicesIpv4CidrBlock - */ - - /** - * Constructs a new IPAllocationPolicy. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a IPAllocationPolicy. - * @implements IIPAllocationPolicy - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy=} [properties] Properties to set - */ - function IPAllocationPolicy(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * IPAllocationPolicy useIpAliases. - * @member {boolean} useIpAliases - * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.useIpAliases = false; - - /** - * IPAllocationPolicy clusterSecondaryRangeName. - * @member {string} clusterSecondaryRangeName - * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.clusterSecondaryRangeName = ""; - - /** - * IPAllocationPolicy servicesSecondaryRangeName. - * @member {string} servicesSecondaryRangeName - * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.servicesSecondaryRangeName = ""; - - /** - * IPAllocationPolicy clusterIpv4CidrBlock. - * @member {string} clusterIpv4CidrBlock - * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.clusterIpv4CidrBlock = ""; - - /** - * IPAllocationPolicy servicesIpv4CidrBlock. - * @member {string} servicesIpv4CidrBlock - * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy - * @instance - */ - IPAllocationPolicy.prototype.servicesIpv4CidrBlock = ""; - - /** - * Creates a new IPAllocationPolicy instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} IPAllocationPolicy instance - */ - IPAllocationPolicy.create = function create(properties) { - return new IPAllocationPolicy(properties); - }; - - /** - * Encodes the specified IPAllocationPolicy message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IPAllocationPolicy.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.useIpAliases != null && Object.hasOwnProperty.call(message, "useIpAliases")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.useIpAliases); - if (message.clusterSecondaryRangeName != null && Object.hasOwnProperty.call(message, "clusterSecondaryRangeName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.clusterSecondaryRangeName); - if (message.servicesSecondaryRangeName != null && Object.hasOwnProperty.call(message, "servicesSecondaryRangeName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.servicesSecondaryRangeName); - if (message.clusterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "clusterIpv4CidrBlock")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.clusterIpv4CidrBlock); - if (message.servicesIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "servicesIpv4CidrBlock")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.servicesIpv4CidrBlock); - return writer; - }; - - /** - * Encodes the specified IPAllocationPolicy message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy} message IPAllocationPolicy message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IPAllocationPolicy.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a IPAllocationPolicy message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} IPAllocationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IPAllocationPolicy.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.useIpAliases = reader.bool(); - break; - } - case 2: { - message.clusterSecondaryRangeName = reader.string(); - break; - } - case 3: { - message.servicesSecondaryRangeName = reader.string(); - break; - } - case 4: { - message.clusterIpv4CidrBlock = reader.string(); - break; - } - case 5: { - message.servicesIpv4CidrBlock = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a IPAllocationPolicy message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} IPAllocationPolicy - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IPAllocationPolicy.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a IPAllocationPolicy message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IPAllocationPolicy.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) - if (typeof message.useIpAliases !== "boolean") - return "useIpAliases: boolean expected"; - if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) - if (!$util.isString(message.clusterSecondaryRangeName)) - return "clusterSecondaryRangeName: string expected"; - if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) - if (!$util.isString(message.servicesSecondaryRangeName)) - return "servicesSecondaryRangeName: string expected"; - if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) - if (!$util.isString(message.clusterIpv4CidrBlock)) - return "clusterIpv4CidrBlock: string expected"; - if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) - if (!$util.isString(message.servicesIpv4CidrBlock)) - return "servicesIpv4CidrBlock: string expected"; - return null; - }; - - /** - * Creates a IPAllocationPolicy message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} IPAllocationPolicy - */ - IPAllocationPolicy.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy(); - if (object.useIpAliases != null) - message.useIpAliases = Boolean(object.useIpAliases); - if (object.clusterSecondaryRangeName != null) - message.clusterSecondaryRangeName = String(object.clusterSecondaryRangeName); - if (object.servicesSecondaryRangeName != null) - message.servicesSecondaryRangeName = String(object.servicesSecondaryRangeName); - if (object.clusterIpv4CidrBlock != null) - message.clusterIpv4CidrBlock = String(object.clusterIpv4CidrBlock); - if (object.servicesIpv4CidrBlock != null) - message.servicesIpv4CidrBlock = String(object.servicesIpv4CidrBlock); - return message; - }; - - /** - * Creates a plain object from a IPAllocationPolicy message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy} message IPAllocationPolicy - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IPAllocationPolicy.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.useIpAliases = false; - object.clusterSecondaryRangeName = ""; - object.servicesSecondaryRangeName = ""; - object.clusterIpv4CidrBlock = ""; - object.servicesIpv4CidrBlock = ""; - } - if (message.useIpAliases != null && message.hasOwnProperty("useIpAliases")) - object.useIpAliases = message.useIpAliases; - if (message.clusterSecondaryRangeName != null && message.hasOwnProperty("clusterSecondaryRangeName")) - object.clusterSecondaryRangeName = message.clusterSecondaryRangeName; - if (message.servicesSecondaryRangeName != null && message.hasOwnProperty("servicesSecondaryRangeName")) - object.servicesSecondaryRangeName = message.servicesSecondaryRangeName; - if (message.clusterIpv4CidrBlock != null && message.hasOwnProperty("clusterIpv4CidrBlock")) - object.clusterIpv4CidrBlock = message.clusterIpv4CidrBlock; - if (message.servicesIpv4CidrBlock != null && message.hasOwnProperty("servicesIpv4CidrBlock")) - object.servicesIpv4CidrBlock = message.servicesIpv4CidrBlock; - return object; - }; - - /** - * Converts this IPAllocationPolicy to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy - * @instance - * @returns {Object.} JSON object - */ - IPAllocationPolicy.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IPAllocationPolicy - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IPAllocationPolicy.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy"; - }; - - return IPAllocationPolicy; - })(); - - v1beta1.NodeConfig = (function() { - - /** - * Properties of a NodeConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface INodeConfig - * @property {string|null} [location] NodeConfig location - * @property {string|null} [machineType] NodeConfig machineType - * @property {string|null} [network] NodeConfig network - * @property {string|null} [subnetwork] NodeConfig subnetwork - * @property {number|null} [diskSizeGb] NodeConfig diskSizeGb - * @property {Array.|null} [oauthScopes] NodeConfig oauthScopes - * @property {string|null} [serviceAccount] NodeConfig serviceAccount - * @property {Array.|null} [tags] NodeConfig tags - * @property {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy|null} [ipAllocationPolicy] NodeConfig ipAllocationPolicy - * @property {number|null} [maxPodsPerNode] NodeConfig maxPodsPerNode - * @property {boolean|null} [enableIpMasqAgent] NodeConfig enableIpMasqAgent - * @property {string|null} [composerNetworkAttachment] NodeConfig composerNetworkAttachment - * @property {string|null} [composerInternalIpv4CidrBlock] NodeConfig composerInternalIpv4CidrBlock - */ - - /** - * Constructs a new NodeConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a NodeConfig. - * @implements INodeConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig=} [properties] Properties to set - */ - function NodeConfig(properties) { - this.oauthScopes = []; - this.tags = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NodeConfig location. - * @member {string} location - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.location = ""; - - /** - * NodeConfig machineType. - * @member {string} machineType - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.machineType = ""; - - /** - * NodeConfig network. - * @member {string} network - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.network = ""; - - /** - * NodeConfig subnetwork. - * @member {string} subnetwork - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.subnetwork = ""; - - /** - * NodeConfig diskSizeGb. - * @member {number} diskSizeGb - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.diskSizeGb = 0; - - /** - * NodeConfig oauthScopes. - * @member {Array.} oauthScopes - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.oauthScopes = $util.emptyArray; - - /** - * NodeConfig serviceAccount. - * @member {string} serviceAccount - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.serviceAccount = ""; - - /** - * NodeConfig tags. - * @member {Array.} tags - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.tags = $util.emptyArray; - - /** - * NodeConfig ipAllocationPolicy. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IIPAllocationPolicy|null|undefined} ipAllocationPolicy - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.ipAllocationPolicy = null; - - /** - * NodeConfig maxPodsPerNode. - * @member {number} maxPodsPerNode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.maxPodsPerNode = 0; - - /** - * NodeConfig enableIpMasqAgent. - * @member {boolean} enableIpMasqAgent - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.enableIpMasqAgent = false; - - /** - * NodeConfig composerNetworkAttachment. - * @member {string} composerNetworkAttachment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.composerNetworkAttachment = ""; - - /** - * NodeConfig composerInternalIpv4CidrBlock. - * @member {string} composerInternalIpv4CidrBlock - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @instance - */ - NodeConfig.prototype.composerInternalIpv4CidrBlock = ""; - - /** - * Creates a new NodeConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} NodeConfig instance - */ - NodeConfig.create = function create(properties) { - return new NodeConfig(properties); - }; - - /** - * Encodes the specified NodeConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig} message NodeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.machineType); - if (message.network != null && Object.hasOwnProperty.call(message, "network")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.network); - if (message.subnetwork != null && Object.hasOwnProperty.call(message, "subnetwork")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.subnetwork); - if (message.diskSizeGb != null && Object.hasOwnProperty.call(message, "diskSizeGb")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.diskSizeGb); - if (message.oauthScopes != null && message.oauthScopes.length) - for (var i = 0; i < message.oauthScopes.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.oauthScopes[i]); - if (message.serviceAccount != null && Object.hasOwnProperty.call(message, "serviceAccount")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.serviceAccount); - if (message.tags != null && message.tags.length) - for (var i = 0; i < message.tags.length; ++i) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.tags[i]); - if (message.ipAllocationPolicy != null && Object.hasOwnProperty.call(message, "ipAllocationPolicy")) - $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.encode(message.ipAllocationPolicy, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.maxPodsPerNode != null && Object.hasOwnProperty.call(message, "maxPodsPerNode")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.maxPodsPerNode); - if (message.enableIpMasqAgent != null && Object.hasOwnProperty.call(message, "enableIpMasqAgent")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enableIpMasqAgent); - if (message.composerNetworkAttachment != null && Object.hasOwnProperty.call(message, "composerNetworkAttachment")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.composerNetworkAttachment); - if (message.composerInternalIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "composerInternalIpv4CidrBlock")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.composerInternalIpv4CidrBlock); - return writer; - }; - - /** - * Encodes the specified NodeConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.INodeConfig} message NodeConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} NodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.location = reader.string(); - break; - } - case 2: { - message.machineType = reader.string(); - break; - } - case 3: { - message.network = reader.string(); - break; - } - case 4: { - message.subnetwork = reader.string(); - break; - } - case 5: { - message.diskSizeGb = reader.int32(); - break; - } - case 6: { - if (!(message.oauthScopes && message.oauthScopes.length)) - message.oauthScopes = []; - message.oauthScopes.push(reader.string()); - break; - } - case 7: { - message.serviceAccount = reader.string(); - break; - } - case 8: { - if (!(message.tags && message.tags.length)) - message.tags = []; - message.tags.push(reader.string()); - break; - } - case 9: { - message.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.decode(reader, reader.uint32()); - break; - } - case 10: { - message.maxPodsPerNode = reader.int32(); - break; - } - case 11: { - message.enableIpMasqAgent = reader.bool(); - break; - } - case 12: { - message.composerNetworkAttachment = reader.string(); - break; - } - case 13: { - message.composerInternalIpv4CidrBlock = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} NodeConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) - if (!$util.isString(message.location)) - return "location: string expected"; - if (message.machineType != null && message.hasOwnProperty("machineType")) - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - if (message.network != null && message.hasOwnProperty("network")) - if (!$util.isString(message.network)) - return "network: string expected"; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - if (!$util.isString(message.subnetwork)) - return "subnetwork: string expected"; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - if (!$util.isInteger(message.diskSizeGb)) - return "diskSizeGb: integer expected"; - if (message.oauthScopes != null && message.hasOwnProperty("oauthScopes")) { - if (!Array.isArray(message.oauthScopes)) - return "oauthScopes: array expected"; - for (var i = 0; i < message.oauthScopes.length; ++i) - if (!$util.isString(message.oauthScopes[i])) - return "oauthScopes: string[] expected"; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - if (!$util.isString(message.serviceAccount)) - return "serviceAccount: string expected"; - if (message.tags != null && message.hasOwnProperty("tags")) { - if (!Array.isArray(message.tags)) - return "tags: array expected"; - for (var i = 0; i < message.tags.length; ++i) - if (!$util.isString(message.tags[i])) - return "tags: string[] expected"; - } - if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.verify(message.ipAllocationPolicy); - if (error) - return "ipAllocationPolicy." + error; - } - if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) - if (!$util.isInteger(message.maxPodsPerNode)) - return "maxPodsPerNode: integer expected"; - if (message.enableIpMasqAgent != null && message.hasOwnProperty("enableIpMasqAgent")) - if (typeof message.enableIpMasqAgent !== "boolean") - return "enableIpMasqAgent: boolean expected"; - if (message.composerNetworkAttachment != null && message.hasOwnProperty("composerNetworkAttachment")) - if (!$util.isString(message.composerNetworkAttachment)) - return "composerNetworkAttachment: string expected"; - if (message.composerInternalIpv4CidrBlock != null && message.hasOwnProperty("composerInternalIpv4CidrBlock")) - if (!$util.isString(message.composerInternalIpv4CidrBlock)) - return "composerInternalIpv4CidrBlock: string expected"; - return null; - }; - - /** - * Creates a NodeConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} NodeConfig - */ - NodeConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.NodeConfig(); - if (object.location != null) - message.location = String(object.location); - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.network != null) - message.network = String(object.network); - if (object.subnetwork != null) - message.subnetwork = String(object.subnetwork); - if (object.diskSizeGb != null) - message.diskSizeGb = object.diskSizeGb | 0; - if (object.oauthScopes) { - if (!Array.isArray(object.oauthScopes)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.oauthScopes: array expected"); - message.oauthScopes = []; - for (var i = 0; i < object.oauthScopes.length; ++i) - message.oauthScopes[i] = String(object.oauthScopes[i]); - } - if (object.serviceAccount != null) - message.serviceAccount = String(object.serviceAccount); - if (object.tags) { - if (!Array.isArray(object.tags)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.tags: array expected"); - message.tags = []; - for (var i = 0; i < object.tags.length; ++i) - message.tags[i] = String(object.tags[i]); - } - if (object.ipAllocationPolicy != null) { - if (typeof object.ipAllocationPolicy !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.NodeConfig.ipAllocationPolicy: object expected"); - message.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.fromObject(object.ipAllocationPolicy); - } - if (object.maxPodsPerNode != null) - message.maxPodsPerNode = object.maxPodsPerNode | 0; - if (object.enableIpMasqAgent != null) - message.enableIpMasqAgent = Boolean(object.enableIpMasqAgent); - if (object.composerNetworkAttachment != null) - message.composerNetworkAttachment = String(object.composerNetworkAttachment); - if (object.composerInternalIpv4CidrBlock != null) - message.composerInternalIpv4CidrBlock = String(object.composerInternalIpv4CidrBlock); - return message; - }; - - /** - * Creates a plain object from a NodeConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.NodeConfig} message NodeConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.oauthScopes = []; - object.tags = []; - } - if (options.defaults) { - object.location = ""; - object.machineType = ""; - object.network = ""; - object.subnetwork = ""; - object.diskSizeGb = 0; - object.serviceAccount = ""; - object.ipAllocationPolicy = null; - object.maxPodsPerNode = 0; - object.enableIpMasqAgent = false; - object.composerNetworkAttachment = ""; - object.composerInternalIpv4CidrBlock = ""; - } - if (message.location != null && message.hasOwnProperty("location")) - object.location = message.location; - if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = message.machineType; - if (message.network != null && message.hasOwnProperty("network")) - object.network = message.network; - if (message.subnetwork != null && message.hasOwnProperty("subnetwork")) - object.subnetwork = message.subnetwork; - if (message.diskSizeGb != null && message.hasOwnProperty("diskSizeGb")) - object.diskSizeGb = message.diskSizeGb; - if (message.oauthScopes && message.oauthScopes.length) { - object.oauthScopes = []; - for (var j = 0; j < message.oauthScopes.length; ++j) - object.oauthScopes[j] = message.oauthScopes[j]; - } - if (message.serviceAccount != null && message.hasOwnProperty("serviceAccount")) - object.serviceAccount = message.serviceAccount; - if (message.tags && message.tags.length) { - object.tags = []; - for (var j = 0; j < message.tags.length; ++j) - object.tags[j] = message.tags[j]; - } - if (message.ipAllocationPolicy != null && message.hasOwnProperty("ipAllocationPolicy")) - object.ipAllocationPolicy = $root.google.cloud.orchestration.airflow.service.v1beta1.IPAllocationPolicy.toObject(message.ipAllocationPolicy, options); - if (message.maxPodsPerNode != null && message.hasOwnProperty("maxPodsPerNode")) - object.maxPodsPerNode = message.maxPodsPerNode; - if (message.enableIpMasqAgent != null && message.hasOwnProperty("enableIpMasqAgent")) - object.enableIpMasqAgent = message.enableIpMasqAgent; - if (message.composerNetworkAttachment != null && message.hasOwnProperty("composerNetworkAttachment")) - object.composerNetworkAttachment = message.composerNetworkAttachment; - if (message.composerInternalIpv4CidrBlock != null && message.hasOwnProperty("composerInternalIpv4CidrBlock")) - object.composerInternalIpv4CidrBlock = message.composerInternalIpv4CidrBlock; - return object; - }; - - /** - * Converts this NodeConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @instance - * @returns {Object.} JSON object - */ - NodeConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NodeConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.NodeConfig"; - }; - - return NodeConfig; - })(); - - v1beta1.PrivateClusterConfig = (function() { - - /** - * Properties of a PrivateClusterConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IPrivateClusterConfig - * @property {boolean|null} [enablePrivateEndpoint] PrivateClusterConfig enablePrivateEndpoint - * @property {string|null} [masterIpv4CidrBlock] PrivateClusterConfig masterIpv4CidrBlock - * @property {string|null} [masterIpv4ReservedRange] PrivateClusterConfig masterIpv4ReservedRange - */ - - /** - * Constructs a new PrivateClusterConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a PrivateClusterConfig. - * @implements IPrivateClusterConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig=} [properties] Properties to set - */ - function PrivateClusterConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PrivateClusterConfig enablePrivateEndpoint. - * @member {boolean} enablePrivateEndpoint - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.enablePrivateEndpoint = false; - - /** - * PrivateClusterConfig masterIpv4CidrBlock. - * @member {string} masterIpv4CidrBlock - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.masterIpv4CidrBlock = ""; - - /** - * PrivateClusterConfig masterIpv4ReservedRange. - * @member {string} masterIpv4ReservedRange - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig - * @instance - */ - PrivateClusterConfig.prototype.masterIpv4ReservedRange = ""; - - /** - * Creates a new PrivateClusterConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} PrivateClusterConfig instance - */ - PrivateClusterConfig.create = function create(properties) { - return new PrivateClusterConfig(properties); - }; - - /** - * Encodes the specified PrivateClusterConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateClusterConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enablePrivateEndpoint != null && Object.hasOwnProperty.call(message, "enablePrivateEndpoint")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePrivateEndpoint); - if (message.masterIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "masterIpv4CidrBlock")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.masterIpv4CidrBlock); - if (message.masterIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "masterIpv4ReservedRange")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.masterIpv4ReservedRange); - return writer; - }; - - /** - * Encodes the specified PrivateClusterConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig} message PrivateClusterConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateClusterConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrivateClusterConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} PrivateClusterConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateClusterConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enablePrivateEndpoint = reader.bool(); - break; - } - case 2: { - message.masterIpv4CidrBlock = reader.string(); - break; - } - case 3: { - message.masterIpv4ReservedRange = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrivateClusterConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} PrivateClusterConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateClusterConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrivateClusterConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrivateClusterConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) - if (typeof message.enablePrivateEndpoint !== "boolean") - return "enablePrivateEndpoint: boolean expected"; - if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) - if (!$util.isString(message.masterIpv4CidrBlock)) - return "masterIpv4CidrBlock: string expected"; - if (message.masterIpv4ReservedRange != null && message.hasOwnProperty("masterIpv4ReservedRange")) - if (!$util.isString(message.masterIpv4ReservedRange)) - return "masterIpv4ReservedRange: string expected"; - return null; - }; - - /** - * Creates a PrivateClusterConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} PrivateClusterConfig - */ - PrivateClusterConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig(); - if (object.enablePrivateEndpoint != null) - message.enablePrivateEndpoint = Boolean(object.enablePrivateEndpoint); - if (object.masterIpv4CidrBlock != null) - message.masterIpv4CidrBlock = String(object.masterIpv4CidrBlock); - if (object.masterIpv4ReservedRange != null) - message.masterIpv4ReservedRange = String(object.masterIpv4ReservedRange); - return message; - }; - - /** - * Creates a plain object from a PrivateClusterConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig} message PrivateClusterConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrivateClusterConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enablePrivateEndpoint = false; - object.masterIpv4CidrBlock = ""; - object.masterIpv4ReservedRange = ""; - } - if (message.enablePrivateEndpoint != null && message.hasOwnProperty("enablePrivateEndpoint")) - object.enablePrivateEndpoint = message.enablePrivateEndpoint; - if (message.masterIpv4CidrBlock != null && message.hasOwnProperty("masterIpv4CidrBlock")) - object.masterIpv4CidrBlock = message.masterIpv4CidrBlock; - if (message.masterIpv4ReservedRange != null && message.hasOwnProperty("masterIpv4ReservedRange")) - object.masterIpv4ReservedRange = message.masterIpv4ReservedRange; - return object; - }; - - /** - * Converts this PrivateClusterConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig - * @instance - * @returns {Object.} JSON object - */ - PrivateClusterConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PrivateClusterConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PrivateClusterConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig"; - }; - - return PrivateClusterConfig; - })(); - - v1beta1.NetworkingConfig = (function() { - - /** - * Properties of a NetworkingConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface INetworkingConfig - * @property {google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType|null} [connectionType] NetworkingConfig connectionType - */ - - /** - * Constructs a new NetworkingConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a NetworkingConfig. - * @implements INetworkingConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig=} [properties] Properties to set - */ - function NetworkingConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * NetworkingConfig connectionType. - * @member {google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType} connectionType - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig - * @instance - */ - NetworkingConfig.prototype.connectionType = 0; - - /** - * Creates a new NetworkingConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig} NetworkingConfig instance - */ - NetworkingConfig.create = function create(properties) { - return new NetworkingConfig(properties); - }; - - /** - * Encodes the specified NetworkingConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig} message NetworkingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkingConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.connectionType != null && Object.hasOwnProperty.call(message, "connectionType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.connectionType); - return writer; - }; - - /** - * Encodes the specified NetworkingConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig} message NetworkingConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NetworkingConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NetworkingConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig} NetworkingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkingConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.connectionType = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NetworkingConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig} NetworkingConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NetworkingConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NetworkingConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NetworkingConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.connectionType != null && message.hasOwnProperty("connectionType")) - switch (message.connectionType) { - default: - return "connectionType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a NetworkingConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig} NetworkingConfig - */ - NetworkingConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig(); - switch (object.connectionType) { - default: - if (typeof object.connectionType === "number") { - message.connectionType = object.connectionType; - break; - } - break; - case "CONNECTION_TYPE_UNSPECIFIED": - case 0: - message.connectionType = 0; - break; - case "VPC_PEERING": - case 1: - message.connectionType = 1; - break; - case "PRIVATE_SERVICE_CONNECT": - case 2: - message.connectionType = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a NetworkingConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig} message NetworkingConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NetworkingConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.connectionType = options.enums === String ? "CONNECTION_TYPE_UNSPECIFIED" : 0; - if (message.connectionType != null && message.hasOwnProperty("connectionType")) - object.connectionType = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType[message.connectionType] === undefined ? message.connectionType : $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType[message.connectionType] : message.connectionType; - return object; - }; - - /** - * Converts this NetworkingConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig - * @instance - * @returns {Object.} JSON object - */ - NetworkingConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NetworkingConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NetworkingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig"; - }; - - /** - * ConnectionType enum. - * @name google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.ConnectionType - * @enum {number} - * @property {number} CONNECTION_TYPE_UNSPECIFIED=0 CONNECTION_TYPE_UNSPECIFIED value - * @property {number} VPC_PEERING=1 VPC_PEERING value - * @property {number} PRIVATE_SERVICE_CONNECT=2 PRIVATE_SERVICE_CONNECT value - */ - NetworkingConfig.ConnectionType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONNECTION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VPC_PEERING"] = 1; - values[valuesById[2] = "PRIVATE_SERVICE_CONNECT"] = 2; - return values; - })(); - - return NetworkingConfig; - })(); - - v1beta1.PrivateEnvironmentConfig = (function() { - - /** - * Properties of a PrivateEnvironmentConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IPrivateEnvironmentConfig - * @property {boolean|null} [enablePrivateEnvironment] PrivateEnvironmentConfig enablePrivateEnvironment - * @property {boolean|null} [enablePrivateBuildsOnly] PrivateEnvironmentConfig enablePrivateBuildsOnly - * @property {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig|null} [privateClusterConfig] PrivateEnvironmentConfig privateClusterConfig - * @property {string|null} [webServerIpv4CidrBlock] PrivateEnvironmentConfig webServerIpv4CidrBlock - * @property {string|null} [cloudSqlIpv4CidrBlock] PrivateEnvironmentConfig cloudSqlIpv4CidrBlock - * @property {string|null} [webServerIpv4ReservedRange] PrivateEnvironmentConfig webServerIpv4ReservedRange - * @property {string|null} [cloudComposerNetworkIpv4CidrBlock] PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock - * @property {string|null} [cloudComposerNetworkIpv4ReservedRange] PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange - * @property {boolean|null} [enablePrivatelyUsedPublicIps] PrivateEnvironmentConfig enablePrivatelyUsedPublicIps - * @property {string|null} [cloudComposerConnectionSubnetwork] PrivateEnvironmentConfig cloudComposerConnectionSubnetwork - * @property {google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig|null} [networkingConfig] PrivateEnvironmentConfig networkingConfig - */ - - /** - * Constructs a new PrivateEnvironmentConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a PrivateEnvironmentConfig. - * @implements IPrivateEnvironmentConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig=} [properties] Properties to set - */ - function PrivateEnvironmentConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PrivateEnvironmentConfig enablePrivateEnvironment. - * @member {boolean} enablePrivateEnvironment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.enablePrivateEnvironment = false; - - /** - * PrivateEnvironmentConfig enablePrivateBuildsOnly. - * @member {boolean} enablePrivateBuildsOnly - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.enablePrivateBuildsOnly = false; - - /** - * PrivateEnvironmentConfig privateClusterConfig. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IPrivateClusterConfig|null|undefined} privateClusterConfig - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.privateClusterConfig = null; - - /** - * PrivateEnvironmentConfig webServerIpv4CidrBlock. - * @member {string} webServerIpv4CidrBlock - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.webServerIpv4CidrBlock = ""; - - /** - * PrivateEnvironmentConfig cloudSqlIpv4CidrBlock. - * @member {string} cloudSqlIpv4CidrBlock - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.cloudSqlIpv4CidrBlock = ""; - - /** - * PrivateEnvironmentConfig webServerIpv4ReservedRange. - * @member {string} webServerIpv4ReservedRange - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.webServerIpv4ReservedRange = ""; - - /** - * PrivateEnvironmentConfig cloudComposerNetworkIpv4CidrBlock. - * @member {string} cloudComposerNetworkIpv4CidrBlock - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.cloudComposerNetworkIpv4CidrBlock = ""; - - /** - * PrivateEnvironmentConfig cloudComposerNetworkIpv4ReservedRange. - * @member {string} cloudComposerNetworkIpv4ReservedRange - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.cloudComposerNetworkIpv4ReservedRange = ""; - - /** - * PrivateEnvironmentConfig enablePrivatelyUsedPublicIps. - * @member {boolean} enablePrivatelyUsedPublicIps - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.enablePrivatelyUsedPublicIps = false; - - /** - * PrivateEnvironmentConfig cloudComposerConnectionSubnetwork. - * @member {string} cloudComposerConnectionSubnetwork - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.cloudComposerConnectionSubnetwork = ""; - - /** - * PrivateEnvironmentConfig networkingConfig. - * @member {google.cloud.orchestration.airflow.service.v1beta1.INetworkingConfig|null|undefined} networkingConfig - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @instance - */ - PrivateEnvironmentConfig.prototype.networkingConfig = null; - - /** - * Creates a new PrivateEnvironmentConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} PrivateEnvironmentConfig instance - */ - PrivateEnvironmentConfig.create = function create(properties) { - return new PrivateEnvironmentConfig(properties); - }; - - /** - * Encodes the specified PrivateEnvironmentConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig} message PrivateEnvironmentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateEnvironmentConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.enablePrivateEnvironment != null && Object.hasOwnProperty.call(message, "enablePrivateEnvironment")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enablePrivateEnvironment); - if (message.privateClusterConfig != null && Object.hasOwnProperty.call(message, "privateClusterConfig")) - $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.encode(message.privateClusterConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.webServerIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "webServerIpv4CidrBlock")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.webServerIpv4CidrBlock); - if (message.cloudSqlIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "cloudSqlIpv4CidrBlock")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.cloudSqlIpv4CidrBlock); - if (message.webServerIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "webServerIpv4ReservedRange")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.webServerIpv4ReservedRange); - if (message.enablePrivatelyUsedPublicIps != null && Object.hasOwnProperty.call(message, "enablePrivatelyUsedPublicIps")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.enablePrivatelyUsedPublicIps); - if (message.cloudComposerNetworkIpv4CidrBlock != null && Object.hasOwnProperty.call(message, "cloudComposerNetworkIpv4CidrBlock")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.cloudComposerNetworkIpv4CidrBlock); - if (message.cloudComposerNetworkIpv4ReservedRange != null && Object.hasOwnProperty.call(message, "cloudComposerNetworkIpv4ReservedRange")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.cloudComposerNetworkIpv4ReservedRange); - if (message.cloudComposerConnectionSubnetwork != null && Object.hasOwnProperty.call(message, "cloudComposerConnectionSubnetwork")) - writer.uint32(/* id 9, wireType 2 =*/74).string(message.cloudComposerConnectionSubnetwork); - if (message.networkingConfig != null && Object.hasOwnProperty.call(message, "networkingConfig")) - $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.encode(message.networkingConfig, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.enablePrivateBuildsOnly != null && Object.hasOwnProperty.call(message, "enablePrivateBuildsOnly")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.enablePrivateBuildsOnly); - return writer; - }; - - /** - * Encodes the specified PrivateEnvironmentConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IPrivateEnvironmentConfig} message PrivateEnvironmentConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PrivateEnvironmentConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} PrivateEnvironmentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateEnvironmentConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enablePrivateEnvironment = reader.bool(); - break; - } - case 11: { - message.enablePrivateBuildsOnly = reader.bool(); - break; - } - case 2: { - message.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.webServerIpv4CidrBlock = reader.string(); - break; - } - case 4: { - message.cloudSqlIpv4CidrBlock = reader.string(); - break; - } - case 5: { - message.webServerIpv4ReservedRange = reader.string(); - break; - } - case 7: { - message.cloudComposerNetworkIpv4CidrBlock = reader.string(); - break; - } - case 8: { - message.cloudComposerNetworkIpv4ReservedRange = reader.string(); - break; - } - case 6: { - message.enablePrivatelyUsedPublicIps = reader.bool(); - break; - } - case 9: { - message.cloudComposerConnectionSubnetwork = reader.string(); - break; - } - case 10: { - message.networkingConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrivateEnvironmentConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} PrivateEnvironmentConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrivateEnvironmentConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrivateEnvironmentConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PrivateEnvironmentConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enablePrivateEnvironment != null && message.hasOwnProperty("enablePrivateEnvironment")) - if (typeof message.enablePrivateEnvironment !== "boolean") - return "enablePrivateEnvironment: boolean expected"; - if (message.enablePrivateBuildsOnly != null && message.hasOwnProperty("enablePrivateBuildsOnly")) - if (typeof message.enablePrivateBuildsOnly !== "boolean") - return "enablePrivateBuildsOnly: boolean expected"; - if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.verify(message.privateClusterConfig); - if (error) - return "privateClusterConfig." + error; - } - if (message.webServerIpv4CidrBlock != null && message.hasOwnProperty("webServerIpv4CidrBlock")) - if (!$util.isString(message.webServerIpv4CidrBlock)) - return "webServerIpv4CidrBlock: string expected"; - if (message.cloudSqlIpv4CidrBlock != null && message.hasOwnProperty("cloudSqlIpv4CidrBlock")) - if (!$util.isString(message.cloudSqlIpv4CidrBlock)) - return "cloudSqlIpv4CidrBlock: string expected"; - if (message.webServerIpv4ReservedRange != null && message.hasOwnProperty("webServerIpv4ReservedRange")) - if (!$util.isString(message.webServerIpv4ReservedRange)) - return "webServerIpv4ReservedRange: string expected"; - if (message.cloudComposerNetworkIpv4CidrBlock != null && message.hasOwnProperty("cloudComposerNetworkIpv4CidrBlock")) - if (!$util.isString(message.cloudComposerNetworkIpv4CidrBlock)) - return "cloudComposerNetworkIpv4CidrBlock: string expected"; - if (message.cloudComposerNetworkIpv4ReservedRange != null && message.hasOwnProperty("cloudComposerNetworkIpv4ReservedRange")) - if (!$util.isString(message.cloudComposerNetworkIpv4ReservedRange)) - return "cloudComposerNetworkIpv4ReservedRange: string expected"; - if (message.enablePrivatelyUsedPublicIps != null && message.hasOwnProperty("enablePrivatelyUsedPublicIps")) - if (typeof message.enablePrivatelyUsedPublicIps !== "boolean") - return "enablePrivatelyUsedPublicIps: boolean expected"; - if (message.cloudComposerConnectionSubnetwork != null && message.hasOwnProperty("cloudComposerConnectionSubnetwork")) - if (!$util.isString(message.cloudComposerConnectionSubnetwork)) - return "cloudComposerConnectionSubnetwork: string expected"; - if (message.networkingConfig != null && message.hasOwnProperty("networkingConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.verify(message.networkingConfig); - if (error) - return "networkingConfig." + error; - } - return null; - }; - - /** - * Creates a PrivateEnvironmentConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} PrivateEnvironmentConfig - */ - PrivateEnvironmentConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig(); - if (object.enablePrivateEnvironment != null) - message.enablePrivateEnvironment = Boolean(object.enablePrivateEnvironment); - if (object.enablePrivateBuildsOnly != null) - message.enablePrivateBuildsOnly = Boolean(object.enablePrivateBuildsOnly); - if (object.privateClusterConfig != null) { - if (typeof object.privateClusterConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.privateClusterConfig: object expected"); - message.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.fromObject(object.privateClusterConfig); - } - if (object.webServerIpv4CidrBlock != null) - message.webServerIpv4CidrBlock = String(object.webServerIpv4CidrBlock); - if (object.cloudSqlIpv4CidrBlock != null) - message.cloudSqlIpv4CidrBlock = String(object.cloudSqlIpv4CidrBlock); - if (object.webServerIpv4ReservedRange != null) - message.webServerIpv4ReservedRange = String(object.webServerIpv4ReservedRange); - if (object.cloudComposerNetworkIpv4CidrBlock != null) - message.cloudComposerNetworkIpv4CidrBlock = String(object.cloudComposerNetworkIpv4CidrBlock); - if (object.cloudComposerNetworkIpv4ReservedRange != null) - message.cloudComposerNetworkIpv4ReservedRange = String(object.cloudComposerNetworkIpv4ReservedRange); - if (object.enablePrivatelyUsedPublicIps != null) - message.enablePrivatelyUsedPublicIps = Boolean(object.enablePrivatelyUsedPublicIps); - if (object.cloudComposerConnectionSubnetwork != null) - message.cloudComposerConnectionSubnetwork = String(object.cloudComposerConnectionSubnetwork); - if (object.networkingConfig != null) { - if (typeof object.networkingConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig.networkingConfig: object expected"); - message.networkingConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.fromObject(object.networkingConfig); - } - return message; - }; - - /** - * Creates a plain object from a PrivateEnvironmentConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig} message PrivateEnvironmentConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrivateEnvironmentConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enablePrivateEnvironment = false; - object.privateClusterConfig = null; - object.webServerIpv4CidrBlock = ""; - object.cloudSqlIpv4CidrBlock = ""; - object.webServerIpv4ReservedRange = ""; - object.enablePrivatelyUsedPublicIps = false; - object.cloudComposerNetworkIpv4CidrBlock = ""; - object.cloudComposerNetworkIpv4ReservedRange = ""; - object.cloudComposerConnectionSubnetwork = ""; - object.networkingConfig = null; - object.enablePrivateBuildsOnly = false; - } - if (message.enablePrivateEnvironment != null && message.hasOwnProperty("enablePrivateEnvironment")) - object.enablePrivateEnvironment = message.enablePrivateEnvironment; - if (message.privateClusterConfig != null && message.hasOwnProperty("privateClusterConfig")) - object.privateClusterConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.PrivateClusterConfig.toObject(message.privateClusterConfig, options); - if (message.webServerIpv4CidrBlock != null && message.hasOwnProperty("webServerIpv4CidrBlock")) - object.webServerIpv4CidrBlock = message.webServerIpv4CidrBlock; - if (message.cloudSqlIpv4CidrBlock != null && message.hasOwnProperty("cloudSqlIpv4CidrBlock")) - object.cloudSqlIpv4CidrBlock = message.cloudSqlIpv4CidrBlock; - if (message.webServerIpv4ReservedRange != null && message.hasOwnProperty("webServerIpv4ReservedRange")) - object.webServerIpv4ReservedRange = message.webServerIpv4ReservedRange; - if (message.enablePrivatelyUsedPublicIps != null && message.hasOwnProperty("enablePrivatelyUsedPublicIps")) - object.enablePrivatelyUsedPublicIps = message.enablePrivatelyUsedPublicIps; - if (message.cloudComposerNetworkIpv4CidrBlock != null && message.hasOwnProperty("cloudComposerNetworkIpv4CidrBlock")) - object.cloudComposerNetworkIpv4CidrBlock = message.cloudComposerNetworkIpv4CidrBlock; - if (message.cloudComposerNetworkIpv4ReservedRange != null && message.hasOwnProperty("cloudComposerNetworkIpv4ReservedRange")) - object.cloudComposerNetworkIpv4ReservedRange = message.cloudComposerNetworkIpv4ReservedRange; - if (message.cloudComposerConnectionSubnetwork != null && message.hasOwnProperty("cloudComposerConnectionSubnetwork")) - object.cloudComposerConnectionSubnetwork = message.cloudComposerConnectionSubnetwork; - if (message.networkingConfig != null && message.hasOwnProperty("networkingConfig")) - object.networkingConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.NetworkingConfig.toObject(message.networkingConfig, options); - if (message.enablePrivateBuildsOnly != null && message.hasOwnProperty("enablePrivateBuildsOnly")) - object.enablePrivateBuildsOnly = message.enablePrivateBuildsOnly; - return object; - }; - - /** - * Converts this PrivateEnvironmentConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @instance - * @returns {Object.} JSON object - */ - PrivateEnvironmentConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PrivateEnvironmentConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PrivateEnvironmentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.PrivateEnvironmentConfig"; - }; - - return PrivateEnvironmentConfig; - })(); - - v1beta1.DatabaseConfig = (function() { - - /** - * Properties of a DatabaseConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IDatabaseConfig - * @property {string|null} [machineType] DatabaseConfig machineType - * @property {string|null} [zone] DatabaseConfig zone - */ - - /** - * Constructs a new DatabaseConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a DatabaseConfig. - * @implements IDatabaseConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig=} [properties] Properties to set - */ - function DatabaseConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DatabaseConfig machineType. - * @member {string} machineType - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig - * @instance - */ - DatabaseConfig.prototype.machineType = ""; - - /** - * DatabaseConfig zone. - * @member {string} zone - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig - * @instance - */ - DatabaseConfig.prototype.zone = ""; - - /** - * Creates a new DatabaseConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} DatabaseConfig instance - */ - DatabaseConfig.create = function create(properties) { - return new DatabaseConfig(properties); - }; - - /** - * Encodes the specified DatabaseConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig} message DatabaseConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); - if (message.zone != null && Object.hasOwnProperty.call(message, "zone")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.zone); - return writer; - }; - - /** - * Encodes the specified DatabaseConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDatabaseConfig} message DatabaseConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatabaseConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DatabaseConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} DatabaseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.machineType = reader.string(); - break; - } - case 2: { - message.zone = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DatabaseConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} DatabaseConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatabaseConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DatabaseConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DatabaseConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.machineType != null && message.hasOwnProperty("machineType")) - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - if (message.zone != null && message.hasOwnProperty("zone")) - if (!$util.isString(message.zone)) - return "zone: string expected"; - return null; - }; - - /** - * Creates a DatabaseConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} DatabaseConfig - */ - DatabaseConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig(); - if (object.machineType != null) - message.machineType = String(object.machineType); - if (object.zone != null) - message.zone = String(object.zone); - return message; - }; - - /** - * Creates a plain object from a DatabaseConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig} message DatabaseConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DatabaseConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.machineType = ""; - object.zone = ""; - } - if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = message.machineType; - if (message.zone != null && message.hasOwnProperty("zone")) - object.zone = message.zone; - return object; - }; - - /** - * Converts this DatabaseConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig - * @instance - * @returns {Object.} JSON object - */ - DatabaseConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DatabaseConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DatabaseConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.DatabaseConfig"; - }; - - return DatabaseConfig; - })(); - - v1beta1.WebServerConfig = (function() { - - /** - * Properties of a WebServerConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IWebServerConfig - * @property {string|null} [machineType] WebServerConfig machineType - */ - - /** - * Constructs a new WebServerConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a WebServerConfig. - * @implements IWebServerConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig=} [properties] Properties to set - */ - function WebServerConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WebServerConfig machineType. - * @member {string} machineType - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig - * @instance - */ - WebServerConfig.prototype.machineType = ""; - - /** - * Creates a new WebServerConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} WebServerConfig instance - */ - WebServerConfig.create = function create(properties) { - return new WebServerConfig(properties); - }; - - /** - * Encodes the specified WebServerConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig} message WebServerConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebServerConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.machineType != null && Object.hasOwnProperty.call(message, "machineType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.machineType); - return writer; - }; - - /** - * Encodes the specified WebServerConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IWebServerConfig} message WebServerConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebServerConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WebServerConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} WebServerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebServerConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.machineType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WebServerConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} WebServerConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebServerConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WebServerConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WebServerConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.machineType != null && message.hasOwnProperty("machineType")) - if (!$util.isString(message.machineType)) - return "machineType: string expected"; - return null; - }; - - /** - * Creates a WebServerConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} WebServerConfig - */ - WebServerConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig(); - if (object.machineType != null) - message.machineType = String(object.machineType); - return message; - }; - - /** - * Creates a plain object from a WebServerConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig} message WebServerConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WebServerConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.machineType = ""; - if (message.machineType != null && message.hasOwnProperty("machineType")) - object.machineType = message.machineType; - return object; - }; - - /** - * Converts this WebServerConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig - * @instance - * @returns {Object.} JSON object - */ - WebServerConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WebServerConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WebServerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WebServerConfig"; - }; - - return WebServerConfig; - })(); - - v1beta1.EncryptionConfig = (function() { - - /** - * Properties of an EncryptionConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IEncryptionConfig - * @property {string|null} [kmsKeyName] EncryptionConfig kmsKeyName - */ - - /** - * Constructs a new EncryptionConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents an EncryptionConfig. - * @implements IEncryptionConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig=} [properties] Properties to set - */ - function EncryptionConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * EncryptionConfig kmsKeyName. - * @member {string} kmsKeyName - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig - * @instance - */ - EncryptionConfig.prototype.kmsKeyName = ""; - - /** - * Creates a new EncryptionConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} EncryptionConfig instance - */ - EncryptionConfig.create = function create(properties) { - return new EncryptionConfig(properties); - }; - - /** - * Encodes the specified EncryptionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig} message EncryptionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EncryptionConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kmsKeyName != null && Object.hasOwnProperty.call(message, "kmsKeyName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kmsKeyName); - return writer; - }; - - /** - * Encodes the specified EncryptionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IEncryptionConfig} message EncryptionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EncryptionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EncryptionConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} EncryptionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EncryptionConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.kmsKeyName = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EncryptionConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} EncryptionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EncryptionConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EncryptionConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EncryptionConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - if (!$util.isString(message.kmsKeyName)) - return "kmsKeyName: string expected"; - return null; - }; - - /** - * Creates an EncryptionConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} EncryptionConfig - */ - EncryptionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig(); - if (object.kmsKeyName != null) - message.kmsKeyName = String(object.kmsKeyName); - return message; - }; - - /** - * Creates a plain object from an EncryptionConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig} message EncryptionConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EncryptionConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.kmsKeyName = ""; - if (message.kmsKeyName != null && message.hasOwnProperty("kmsKeyName")) - object.kmsKeyName = message.kmsKeyName; - return object; - }; - - /** - * Converts this EncryptionConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig - * @instance - * @returns {Object.} JSON object - */ - EncryptionConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EncryptionConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EncryptionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.EncryptionConfig"; - }; - - return EncryptionConfig; - })(); - - v1beta1.MaintenanceWindow = (function() { - - /** - * Properties of a MaintenanceWindow. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IMaintenanceWindow - * @property {google.protobuf.ITimestamp|null} [startTime] MaintenanceWindow startTime - * @property {google.protobuf.ITimestamp|null} [endTime] MaintenanceWindow endTime - * @property {string|null} [recurrence] MaintenanceWindow recurrence - */ - - /** - * Constructs a new MaintenanceWindow. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a MaintenanceWindow. - * @implements IMaintenanceWindow - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow=} [properties] Properties to set - */ - function MaintenanceWindow(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MaintenanceWindow startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow - * @instance - */ - MaintenanceWindow.prototype.startTime = null; - - /** - * MaintenanceWindow endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow - * @instance - */ - MaintenanceWindow.prototype.endTime = null; - - /** - * MaintenanceWindow recurrence. - * @member {string} recurrence - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow - * @instance - */ - MaintenanceWindow.prototype.recurrence = ""; - - /** - * Creates a new MaintenanceWindow instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} MaintenanceWindow instance - */ - MaintenanceWindow.create = function create(properties) { - return new MaintenanceWindow(properties); - }; - - /** - * Encodes the specified MaintenanceWindow message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaintenanceWindow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, 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.recurrence != null && Object.hasOwnProperty.call(message, "recurrence")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.recurrence); - return writer; - }; - - /** - * Encodes the specified MaintenanceWindow message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IMaintenanceWindow} message MaintenanceWindow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MaintenanceWindow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MaintenanceWindow message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} MaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaintenanceWindow.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.startTime = $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.recurrence = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MaintenanceWindow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} MaintenanceWindow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MaintenanceWindow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MaintenanceWindow message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MaintenanceWindow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - if (message.recurrence != null && message.hasOwnProperty("recurrence")) - if (!$util.isString(message.recurrence)) - return "recurrence: string expected"; - return null; - }; - - /** - * Creates a MaintenanceWindow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} MaintenanceWindow - */ - MaintenanceWindow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - if (object.recurrence != null) - message.recurrence = String(object.recurrence); - return message; - }; - - /** - * Creates a plain object from a MaintenanceWindow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow} message MaintenanceWindow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MaintenanceWindow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startTime = null; - object.endTime = null; - object.recurrence = ""; - } - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.recurrence != null && message.hasOwnProperty("recurrence")) - object.recurrence = message.recurrence; - return object; - }; - - /** - * Converts this MaintenanceWindow to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow - * @instance - * @returns {Object.} JSON object - */ - MaintenanceWindow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MaintenanceWindow - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MaintenanceWindow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.MaintenanceWindow"; - }; - - return MaintenanceWindow; - })(); - - v1beta1.WorkloadsConfig = (function() { - - /** - * Properties of a WorkloadsConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IWorkloadsConfig - * @property {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource|null} [scheduler] WorkloadsConfig scheduler - * @property {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource|null} [webServer] WorkloadsConfig webServer - * @property {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource|null} [worker] WorkloadsConfig worker - * @property {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource|null} [triggerer] WorkloadsConfig triggerer - * @property {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource|null} [dagProcessor] WorkloadsConfig dagProcessor - */ - - /** - * Constructs a new WorkloadsConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a WorkloadsConfig. - * @implements IWorkloadsConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig=} [properties] Properties to set - */ - function WorkloadsConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkloadsConfig scheduler. - * @member {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource|null|undefined} scheduler - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @instance - */ - WorkloadsConfig.prototype.scheduler = null; - - /** - * WorkloadsConfig webServer. - * @member {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource|null|undefined} webServer - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @instance - */ - WorkloadsConfig.prototype.webServer = null; - - /** - * WorkloadsConfig worker. - * @member {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource|null|undefined} worker - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @instance - */ - WorkloadsConfig.prototype.worker = null; - - /** - * WorkloadsConfig triggerer. - * @member {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource|null|undefined} triggerer - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @instance - */ - WorkloadsConfig.prototype.triggerer = null; - - /** - * WorkloadsConfig dagProcessor. - * @member {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource|null|undefined} dagProcessor - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @instance - */ - WorkloadsConfig.prototype.dagProcessor = null; - - /** - * Creates a new WorkloadsConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} WorkloadsConfig instance - */ - WorkloadsConfig.create = function create(properties) { - return new WorkloadsConfig(properties); - }; - - /** - * Encodes the specified WorkloadsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig} message WorkloadsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadsConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scheduler != null && Object.hasOwnProperty.call(message, "scheduler")) - $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.encode(message.scheduler, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.webServer != null && Object.hasOwnProperty.call(message, "webServer")) - $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.encode(message.webServer, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.worker != null && Object.hasOwnProperty.call(message, "worker")) - $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.encode(message.worker, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.triggerer != null && Object.hasOwnProperty.call(message, "triggerer")) - $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.encode(message.triggerer, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.dagProcessor != null && Object.hasOwnProperty.call(message, "dagProcessor")) - $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.encode(message.dagProcessor, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified WorkloadsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IWorkloadsConfig} message WorkloadsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkloadsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkloadsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} WorkloadsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadsConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.scheduler = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.decode(reader, reader.uint32()); - break; - } - case 2: { - message.webServer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.decode(reader, reader.uint32()); - break; - } - case 3: { - message.worker = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.decode(reader, reader.uint32()); - break; - } - case 4: { - message.triggerer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.decode(reader, reader.uint32()); - break; - } - case 5: { - message.dagProcessor = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkloadsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} WorkloadsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkloadsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkloadsConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkloadsConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scheduler != null && message.hasOwnProperty("scheduler")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.verify(message.scheduler); - if (error) - return "scheduler." + error; - } - if (message.webServer != null && message.hasOwnProperty("webServer")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.verify(message.webServer); - if (error) - return "webServer." + error; - } - if (message.worker != null && message.hasOwnProperty("worker")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.verify(message.worker); - if (error) - return "worker." + error; - } - if (message.triggerer != null && message.hasOwnProperty("triggerer")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.verify(message.triggerer); - if (error) - return "triggerer." + error; - } - if (message.dagProcessor != null && message.hasOwnProperty("dagProcessor")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.verify(message.dagProcessor); - if (error) - return "dagProcessor." + error; - } - return null; - }; - - /** - * Creates a WorkloadsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} WorkloadsConfig - */ - WorkloadsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig(); - if (object.scheduler != null) { - if (typeof object.scheduler !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.scheduler: object expected"); - message.scheduler = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.fromObject(object.scheduler); - } - if (object.webServer != null) { - if (typeof object.webServer !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.webServer: object expected"); - message.webServer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.fromObject(object.webServer); - } - if (object.worker != null) { - if (typeof object.worker !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.worker: object expected"); - message.worker = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.fromObject(object.worker); - } - if (object.triggerer != null) { - if (typeof object.triggerer !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.triggerer: object expected"); - message.triggerer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.fromObject(object.triggerer); - } - if (object.dagProcessor != null) { - if (typeof object.dagProcessor !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.dagProcessor: object expected"); - message.dagProcessor = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.fromObject(object.dagProcessor); - } - return message; - }; - - /** - * Creates a plain object from a WorkloadsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig} message WorkloadsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkloadsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.scheduler = null; - object.webServer = null; - object.worker = null; - object.triggerer = null; - object.dagProcessor = null; - } - if (message.scheduler != null && message.hasOwnProperty("scheduler")) - object.scheduler = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.toObject(message.scheduler, options); - if (message.webServer != null && message.hasOwnProperty("webServer")) - object.webServer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.toObject(message.webServer, options); - if (message.worker != null && message.hasOwnProperty("worker")) - object.worker = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.toObject(message.worker, options); - if (message.triggerer != null && message.hasOwnProperty("triggerer")) - object.triggerer = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.toObject(message.triggerer, options); - if (message.dagProcessor != null && message.hasOwnProperty("dagProcessor")) - object.dagProcessor = $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.toObject(message.dagProcessor, options); - return object; - }; - - /** - * Converts this WorkloadsConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @instance - * @returns {Object.} JSON object - */ - WorkloadsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkloadsConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkloadsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig"; - }; - - WorkloadsConfig.SchedulerResource = (function() { - - /** - * Properties of a SchedulerResource. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @interface ISchedulerResource - * @property {number|null} [cpu] SchedulerResource cpu - * @property {number|null} [memoryGb] SchedulerResource memoryGb - * @property {number|null} [storageGb] SchedulerResource storageGb - * @property {number|null} [count] SchedulerResource count - */ - - /** - * Constructs a new SchedulerResource. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @classdesc Represents a SchedulerResource. - * @implements ISchedulerResource - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource=} [properties] Properties to set - */ - function SchedulerResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SchedulerResource cpu. - * @member {number} cpu - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource - * @instance - */ - SchedulerResource.prototype.cpu = 0; - - /** - * SchedulerResource memoryGb. - * @member {number} memoryGb - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource - * @instance - */ - SchedulerResource.prototype.memoryGb = 0; - - /** - * SchedulerResource storageGb. - * @member {number} storageGb - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource - * @instance - */ - SchedulerResource.prototype.storageGb = 0; - - /** - * SchedulerResource count. - * @member {number} count - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource - * @instance - */ - SchedulerResource.prototype.count = 0; - - /** - * Creates a new SchedulerResource instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} SchedulerResource instance - */ - SchedulerResource.create = function create(properties) { - return new SchedulerResource(properties); - }; - - /** - * Encodes the specified SchedulerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource} message SchedulerResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchedulerResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); - if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); - if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.count); - return writer; - }; - - /** - * Encodes the specified SchedulerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ISchedulerResource} message SchedulerResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SchedulerResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SchedulerResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} SchedulerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchedulerResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cpu = reader.float(); - break; - } - case 2: { - message.memoryGb = reader.float(); - break; - } - case 3: { - message.storageGb = reader.float(); - break; - } - case 4: { - message.count = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SchedulerResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} SchedulerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SchedulerResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SchedulerResource message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SchedulerResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cpu != null && message.hasOwnProperty("cpu")) - if (typeof message.cpu !== "number") - return "cpu: number expected"; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - if (typeof message.memoryGb !== "number") - return "memoryGb: number expected"; - if (message.storageGb != null && message.hasOwnProperty("storageGb")) - if (typeof message.storageGb !== "number") - return "storageGb: number expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count)) - return "count: integer expected"; - return null; - }; - - /** - * Creates a SchedulerResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} SchedulerResource - */ - SchedulerResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource(); - if (object.cpu != null) - message.cpu = Number(object.cpu); - if (object.memoryGb != null) - message.memoryGb = Number(object.memoryGb); - if (object.storageGb != null) - message.storageGb = Number(object.storageGb); - if (object.count != null) - message.count = object.count | 0; - return message; - }; - - /** - * Creates a plain object from a SchedulerResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource} message SchedulerResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SchedulerResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cpu = 0; - object.memoryGb = 0; - object.storageGb = 0; - object.count = 0; - } - if (message.cpu != null && message.hasOwnProperty("cpu")) - object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; - if (message.storageGb != null && message.hasOwnProperty("storageGb")) - object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; - if (message.count != null && message.hasOwnProperty("count")) - object.count = message.count; - return object; - }; - - /** - * Converts this SchedulerResource to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource - * @instance - * @returns {Object.} JSON object - */ - SchedulerResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SchedulerResource - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SchedulerResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.SchedulerResource"; - }; - - return SchedulerResource; - })(); - - WorkloadsConfig.WebServerResource = (function() { - - /** - * Properties of a WebServerResource. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @interface IWebServerResource - * @property {number|null} [cpu] WebServerResource cpu - * @property {number|null} [memoryGb] WebServerResource memoryGb - * @property {number|null} [storageGb] WebServerResource storageGb - */ - - /** - * Constructs a new WebServerResource. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @classdesc Represents a WebServerResource. - * @implements IWebServerResource - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource=} [properties] Properties to set - */ - function WebServerResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WebServerResource cpu. - * @member {number} cpu - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource - * @instance - */ - WebServerResource.prototype.cpu = 0; - - /** - * WebServerResource memoryGb. - * @member {number} memoryGb - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource - * @instance - */ - WebServerResource.prototype.memoryGb = 0; - - /** - * WebServerResource storageGb. - * @member {number} storageGb - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource - * @instance - */ - WebServerResource.prototype.storageGb = 0; - - /** - * Creates a new WebServerResource instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} WebServerResource instance - */ - WebServerResource.create = function create(properties) { - return new WebServerResource(properties); - }; - - /** - * Encodes the specified WebServerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource} message WebServerResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebServerResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); - if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); - if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); - return writer; - }; - - /** - * Encodes the specified WebServerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWebServerResource} message WebServerResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WebServerResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WebServerResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} WebServerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebServerResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cpu = reader.float(); - break; - } - case 2: { - message.memoryGb = reader.float(); - break; - } - case 3: { - message.storageGb = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WebServerResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} WebServerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WebServerResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WebServerResource message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WebServerResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cpu != null && message.hasOwnProperty("cpu")) - if (typeof message.cpu !== "number") - return "cpu: number expected"; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - if (typeof message.memoryGb !== "number") - return "memoryGb: number expected"; - if (message.storageGb != null && message.hasOwnProperty("storageGb")) - if (typeof message.storageGb !== "number") - return "storageGb: number expected"; - return null; - }; - - /** - * Creates a WebServerResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} WebServerResource - */ - WebServerResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource(); - if (object.cpu != null) - message.cpu = Number(object.cpu); - if (object.memoryGb != null) - message.memoryGb = Number(object.memoryGb); - if (object.storageGb != null) - message.storageGb = Number(object.storageGb); - return message; - }; - - /** - * Creates a plain object from a WebServerResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource} message WebServerResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WebServerResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cpu = 0; - object.memoryGb = 0; - object.storageGb = 0; - } - if (message.cpu != null && message.hasOwnProperty("cpu")) - object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; - if (message.storageGb != null && message.hasOwnProperty("storageGb")) - object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; - return object; - }; - - /** - * Converts this WebServerResource to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource - * @instance - * @returns {Object.} JSON object - */ - WebServerResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WebServerResource - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WebServerResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WebServerResource"; - }; - - return WebServerResource; - })(); - - WorkloadsConfig.WorkerResource = (function() { - - /** - * Properties of a WorkerResource. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @interface IWorkerResource - * @property {number|null} [cpu] WorkerResource cpu - * @property {number|null} [memoryGb] WorkerResource memoryGb - * @property {number|null} [storageGb] WorkerResource storageGb - * @property {number|null} [minCount] WorkerResource minCount - * @property {number|null} [maxCount] WorkerResource maxCount - */ - - /** - * Constructs a new WorkerResource. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @classdesc Represents a WorkerResource. - * @implements IWorkerResource - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource=} [properties] Properties to set - */ - function WorkerResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * WorkerResource cpu. - * @member {number} cpu - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource - * @instance - */ - WorkerResource.prototype.cpu = 0; - - /** - * WorkerResource memoryGb. - * @member {number} memoryGb - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource - * @instance - */ - WorkerResource.prototype.memoryGb = 0; - - /** - * WorkerResource storageGb. - * @member {number} storageGb - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource - * @instance - */ - WorkerResource.prototype.storageGb = 0; - - /** - * WorkerResource minCount. - * @member {number} minCount - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource - * @instance - */ - WorkerResource.prototype.minCount = 0; - - /** - * WorkerResource maxCount. - * @member {number} maxCount - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource - * @instance - */ - WorkerResource.prototype.maxCount = 0; - - /** - * Creates a new WorkerResource instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} WorkerResource instance - */ - WorkerResource.create = function create(properties) { - return new WorkerResource(properties); - }; - - /** - * Encodes the specified WorkerResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource} message WorkerResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkerResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); - if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); - if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); - if (message.minCount != null && Object.hasOwnProperty.call(message, "minCount")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minCount); - if (message.maxCount != null && Object.hasOwnProperty.call(message, "maxCount")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maxCount); - return writer; - }; - - /** - * Encodes the specified WorkerResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IWorkerResource} message WorkerResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - WorkerResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a WorkerResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} WorkerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkerResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cpu = reader.float(); - break; - } - case 2: { - message.memoryGb = reader.float(); - break; - } - case 3: { - message.storageGb = reader.float(); - break; - } - case 4: { - message.minCount = reader.int32(); - break; - } - case 5: { - message.maxCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a WorkerResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} WorkerResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - WorkerResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a WorkerResource message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - WorkerResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cpu != null && message.hasOwnProperty("cpu")) - if (typeof message.cpu !== "number") - return "cpu: number expected"; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - if (typeof message.memoryGb !== "number") - return "memoryGb: number expected"; - if (message.storageGb != null && message.hasOwnProperty("storageGb")) - if (typeof message.storageGb !== "number") - return "storageGb: number expected"; - if (message.minCount != null && message.hasOwnProperty("minCount")) - if (!$util.isInteger(message.minCount)) - return "minCount: integer expected"; - if (message.maxCount != null && message.hasOwnProperty("maxCount")) - if (!$util.isInteger(message.maxCount)) - return "maxCount: integer expected"; - return null; - }; - - /** - * Creates a WorkerResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} WorkerResource - */ - WorkerResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource(); - if (object.cpu != null) - message.cpu = Number(object.cpu); - if (object.memoryGb != null) - message.memoryGb = Number(object.memoryGb); - if (object.storageGb != null) - message.storageGb = Number(object.storageGb); - if (object.minCount != null) - message.minCount = object.minCount | 0; - if (object.maxCount != null) - message.maxCount = object.maxCount | 0; - return message; - }; - - /** - * Creates a plain object from a WorkerResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource} message WorkerResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - WorkerResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cpu = 0; - object.memoryGb = 0; - object.storageGb = 0; - object.minCount = 0; - object.maxCount = 0; - } - if (message.cpu != null && message.hasOwnProperty("cpu")) - object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; - if (message.storageGb != null && message.hasOwnProperty("storageGb")) - object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; - if (message.minCount != null && message.hasOwnProperty("minCount")) - object.minCount = message.minCount; - if (message.maxCount != null && message.hasOwnProperty("maxCount")) - object.maxCount = message.maxCount; - return object; - }; - - /** - * Converts this WorkerResource to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource - * @instance - * @returns {Object.} JSON object - */ - WorkerResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for WorkerResource - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - WorkerResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.WorkerResource"; - }; - - return WorkerResource; - })(); - - WorkloadsConfig.TriggererResource = (function() { - - /** - * Properties of a TriggererResource. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @interface ITriggererResource - * @property {number|null} [count] TriggererResource count - * @property {number|null} [cpu] TriggererResource cpu - * @property {number|null} [memoryGb] TriggererResource memoryGb - */ - - /** - * Constructs a new TriggererResource. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @classdesc Represents a TriggererResource. - * @implements ITriggererResource - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource=} [properties] Properties to set - */ - function TriggererResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TriggererResource count. - * @member {number} count - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource - * @instance - */ - TriggererResource.prototype.count = 0; - - /** - * TriggererResource cpu. - * @member {number} cpu - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource - * @instance - */ - TriggererResource.prototype.cpu = 0; - - /** - * TriggererResource memoryGb. - * @member {number} memoryGb - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource - * @instance - */ - TriggererResource.prototype.memoryGb = 0; - - /** - * Creates a new TriggererResource instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource} TriggererResource instance - */ - TriggererResource.create = function create(properties) { - return new TriggererResource(properties); - }; - - /** - * Encodes the specified TriggererResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource} message TriggererResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TriggererResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.count); - if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.cpu); - if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.memoryGb); - return writer; - }; - - /** - * Encodes the specified TriggererResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.ITriggererResource} message TriggererResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TriggererResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TriggererResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource} TriggererResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TriggererResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.count = reader.int32(); - break; - } - case 2: { - message.cpu = reader.float(); - break; - } - case 3: { - message.memoryGb = reader.float(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TriggererResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource} TriggererResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TriggererResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TriggererResource message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TriggererResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count)) - return "count: integer expected"; - if (message.cpu != null && message.hasOwnProperty("cpu")) - if (typeof message.cpu !== "number") - return "cpu: number expected"; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - if (typeof message.memoryGb !== "number") - return "memoryGb: number expected"; - return null; - }; - - /** - * Creates a TriggererResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource} TriggererResource - */ - TriggererResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource(); - if (object.count != null) - message.count = object.count | 0; - if (object.cpu != null) - message.cpu = Number(object.cpu); - if (object.memoryGb != null) - message.memoryGb = Number(object.memoryGb); - return message; - }; - - /** - * Creates a plain object from a TriggererResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource} message TriggererResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TriggererResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.count = 0; - object.cpu = 0; - object.memoryGb = 0; - } - if (message.count != null && message.hasOwnProperty("count")) - object.count = message.count; - if (message.cpu != null && message.hasOwnProperty("cpu")) - object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; - return object; - }; - - /** - * Converts this TriggererResource to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource - * @instance - * @returns {Object.} JSON object - */ - TriggererResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TriggererResource - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TriggererResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.TriggererResource"; - }; - - return TriggererResource; - })(); - - WorkloadsConfig.DagProcessorResource = (function() { - - /** - * Properties of a DagProcessorResource. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @interface IDagProcessorResource - * @property {number|null} [cpu] DagProcessorResource cpu - * @property {number|null} [memoryGb] DagProcessorResource memoryGb - * @property {number|null} [storageGb] DagProcessorResource storageGb - * @property {number|null} [count] DagProcessorResource count - */ - - /** - * Constructs a new DagProcessorResource. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig - * @classdesc Represents a DagProcessorResource. - * @implements IDagProcessorResource - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource=} [properties] Properties to set - */ - function DagProcessorResource(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DagProcessorResource cpu. - * @member {number} cpu - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource - * @instance - */ - DagProcessorResource.prototype.cpu = 0; - - /** - * DagProcessorResource memoryGb. - * @member {number} memoryGb - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource - * @instance - */ - DagProcessorResource.prototype.memoryGb = 0; - - /** - * DagProcessorResource storageGb. - * @member {number} storageGb - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource - * @instance - */ - DagProcessorResource.prototype.storageGb = 0; - - /** - * DagProcessorResource count. - * @member {number} count - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource - * @instance - */ - DagProcessorResource.prototype.count = 0; - - /** - * Creates a new DagProcessorResource instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource} DagProcessorResource instance - */ - DagProcessorResource.create = function create(properties) { - return new DagProcessorResource(properties); - }; - - /** - * Encodes the specified DagProcessorResource message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource} message DagProcessorResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DagProcessorResource.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.cpu != null && Object.hasOwnProperty.call(message, "cpu")) - writer.uint32(/* id 1, wireType 5 =*/13).float(message.cpu); - if (message.memoryGb != null && Object.hasOwnProperty.call(message, "memoryGb")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.memoryGb); - if (message.storageGb != null && Object.hasOwnProperty.call(message, "storageGb")) - writer.uint32(/* id 3, wireType 5 =*/29).float(message.storageGb); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.count); - return writer; - }; - - /** - * Encodes the specified DagProcessorResource message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.IDagProcessorResource} message DagProcessorResource message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DagProcessorResource.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DagProcessorResource message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource} DagProcessorResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DagProcessorResource.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.cpu = reader.float(); - break; - } - case 2: { - message.memoryGb = reader.float(); - break; - } - case 3: { - message.storageGb = reader.float(); - break; - } - case 4: { - message.count = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DagProcessorResource message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource} DagProcessorResource - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DagProcessorResource.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DagProcessorResource message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DagProcessorResource.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.cpu != null && message.hasOwnProperty("cpu")) - if (typeof message.cpu !== "number") - return "cpu: number expected"; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - if (typeof message.memoryGb !== "number") - return "memoryGb: number expected"; - if (message.storageGb != null && message.hasOwnProperty("storageGb")) - if (typeof message.storageGb !== "number") - return "storageGb: number expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count)) - return "count: integer expected"; - return null; - }; - - /** - * Creates a DagProcessorResource message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource} DagProcessorResource - */ - DagProcessorResource.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource(); - if (object.cpu != null) - message.cpu = Number(object.cpu); - if (object.memoryGb != null) - message.memoryGb = Number(object.memoryGb); - if (object.storageGb != null) - message.storageGb = Number(object.storageGb); - if (object.count != null) - message.count = object.count | 0; - return message; - }; - - /** - * Creates a plain object from a DagProcessorResource message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource} message DagProcessorResource - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DagProcessorResource.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.cpu = 0; - object.memoryGb = 0; - object.storageGb = 0; - object.count = 0; - } - if (message.cpu != null && message.hasOwnProperty("cpu")) - object.cpu = options.json && !isFinite(message.cpu) ? String(message.cpu) : message.cpu; - if (message.memoryGb != null && message.hasOwnProperty("memoryGb")) - object.memoryGb = options.json && !isFinite(message.memoryGb) ? String(message.memoryGb) : message.memoryGb; - if (message.storageGb != null && message.hasOwnProperty("storageGb")) - object.storageGb = options.json && !isFinite(message.storageGb) ? String(message.storageGb) : message.storageGb; - if (message.count != null && message.hasOwnProperty("count")) - object.count = message.count; - return object; - }; - - /** - * Converts this DagProcessorResource to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource - * @instance - * @returns {Object.} JSON object - */ - DagProcessorResource.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DagProcessorResource - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DagProcessorResource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.WorkloadsConfig.DagProcessorResource"; - }; - - return DagProcessorResource; - })(); - - return WorkloadsConfig; - })(); - - v1beta1.DataRetentionConfig = (function() { - - /** - * Properties of a DataRetentionConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IDataRetentionConfig - * @property {number|null} [airflowDatabaseRetentionDays] DataRetentionConfig airflowDatabaseRetentionDays - * @property {google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig|null} [taskLogsRetentionConfig] DataRetentionConfig taskLogsRetentionConfig - * @property {google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig|null} [airflowMetadataRetentionConfig] DataRetentionConfig airflowMetadataRetentionConfig - */ - - /** - * Constructs a new DataRetentionConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a DataRetentionConfig. - * @implements IDataRetentionConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig=} [properties] Properties to set - */ - function DataRetentionConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * DataRetentionConfig airflowDatabaseRetentionDays. - * @member {number} airflowDatabaseRetentionDays - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig - * @instance - */ - DataRetentionConfig.prototype.airflowDatabaseRetentionDays = 0; - - /** - * DataRetentionConfig taskLogsRetentionConfig. - * @member {google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig|null|undefined} taskLogsRetentionConfig - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig - * @instance - */ - DataRetentionConfig.prototype.taskLogsRetentionConfig = null; - - /** - * DataRetentionConfig airflowMetadataRetentionConfig. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig|null|undefined} airflowMetadataRetentionConfig - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig - * @instance - */ - DataRetentionConfig.prototype.airflowMetadataRetentionConfig = null; - - /** - * Creates a new DataRetentionConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig} DataRetentionConfig instance - */ - DataRetentionConfig.create = function create(properties) { - return new DataRetentionConfig(properties); - }; - - /** - * Encodes the specified DataRetentionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig} message DataRetentionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataRetentionConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.airflowDatabaseRetentionDays != null && Object.hasOwnProperty.call(message, "airflowDatabaseRetentionDays")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.airflowDatabaseRetentionDays); - if (message.taskLogsRetentionConfig != null && Object.hasOwnProperty.call(message, "taskLogsRetentionConfig")) - $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.encode(message.taskLogsRetentionConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.airflowMetadataRetentionConfig != null && Object.hasOwnProperty.call(message, "airflowMetadataRetentionConfig")) - $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.encode(message.airflowMetadataRetentionConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified DataRetentionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IDataRetentionConfig} message DataRetentionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DataRetentionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DataRetentionConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig} DataRetentionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataRetentionConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.airflowDatabaseRetentionDays = reader.int32(); - break; - } - case 4: { - message.taskLogsRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.decode(reader, reader.uint32()); - break; - } - case 5: { - message.airflowMetadataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DataRetentionConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig} DataRetentionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DataRetentionConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DataRetentionConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DataRetentionConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.airflowDatabaseRetentionDays != null && message.hasOwnProperty("airflowDatabaseRetentionDays")) - if (!$util.isInteger(message.airflowDatabaseRetentionDays)) - return "airflowDatabaseRetentionDays: integer expected"; - if (message.taskLogsRetentionConfig != null && message.hasOwnProperty("taskLogsRetentionConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.verify(message.taskLogsRetentionConfig); - if (error) - return "taskLogsRetentionConfig." + error; - } - if (message.airflowMetadataRetentionConfig != null && message.hasOwnProperty("airflowMetadataRetentionConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.verify(message.airflowMetadataRetentionConfig); - if (error) - return "airflowMetadataRetentionConfig." + error; - } - return null; - }; - - /** - * Creates a DataRetentionConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig} DataRetentionConfig - */ - DataRetentionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig(); - if (object.airflowDatabaseRetentionDays != null) - message.airflowDatabaseRetentionDays = object.airflowDatabaseRetentionDays | 0; - if (object.taskLogsRetentionConfig != null) { - if (typeof object.taskLogsRetentionConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.taskLogsRetentionConfig: object expected"); - message.taskLogsRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.fromObject(object.taskLogsRetentionConfig); - } - if (object.airflowMetadataRetentionConfig != null) { - if (typeof object.airflowMetadataRetentionConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig.airflowMetadataRetentionConfig: object expected"); - message.airflowMetadataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.fromObject(object.airflowMetadataRetentionConfig); - } - return message; - }; - - /** - * Creates a plain object from a DataRetentionConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig} message DataRetentionConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DataRetentionConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.airflowDatabaseRetentionDays = 0; - object.taskLogsRetentionConfig = null; - object.airflowMetadataRetentionConfig = null; - } - if (message.airflowDatabaseRetentionDays != null && message.hasOwnProperty("airflowDatabaseRetentionDays")) - object.airflowDatabaseRetentionDays = message.airflowDatabaseRetentionDays; - if (message.taskLogsRetentionConfig != null && message.hasOwnProperty("taskLogsRetentionConfig")) - object.taskLogsRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.toObject(message.taskLogsRetentionConfig, options); - if (message.airflowMetadataRetentionConfig != null && message.hasOwnProperty("airflowMetadataRetentionConfig")) - object.airflowMetadataRetentionConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.toObject(message.airflowMetadataRetentionConfig, options); - return object; - }; - - /** - * Converts this DataRetentionConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig - * @instance - * @returns {Object.} JSON object - */ - DataRetentionConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DataRetentionConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DataRetentionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.DataRetentionConfig"; - }; - - return DataRetentionConfig; - })(); - - v1beta1.TaskLogsRetentionConfig = (function() { - - /** - * Properties of a TaskLogsRetentionConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface ITaskLogsRetentionConfig - * @property {google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode|null} [storageMode] TaskLogsRetentionConfig storageMode - */ - - /** - * Constructs a new TaskLogsRetentionConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a TaskLogsRetentionConfig. - * @implements ITaskLogsRetentionConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig=} [properties] Properties to set - */ - function TaskLogsRetentionConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TaskLogsRetentionConfig storageMode. - * @member {google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode} storageMode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig - * @instance - */ - TaskLogsRetentionConfig.prototype.storageMode = 0; - - /** - * Creates a new TaskLogsRetentionConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig} TaskLogsRetentionConfig instance - */ - TaskLogsRetentionConfig.create = function create(properties) { - return new TaskLogsRetentionConfig(properties); - }; - - /** - * Encodes the specified TaskLogsRetentionConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig} message TaskLogsRetentionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TaskLogsRetentionConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.storageMode != null && Object.hasOwnProperty.call(message, "storageMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.storageMode); - return writer; - }; - - /** - * Encodes the specified TaskLogsRetentionConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ITaskLogsRetentionConfig} message TaskLogsRetentionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TaskLogsRetentionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TaskLogsRetentionConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig} TaskLogsRetentionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TaskLogsRetentionConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 2: { - message.storageMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TaskLogsRetentionConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig} TaskLogsRetentionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TaskLogsRetentionConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TaskLogsRetentionConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TaskLogsRetentionConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.storageMode != null && message.hasOwnProperty("storageMode")) - switch (message.storageMode) { - default: - return "storageMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a TaskLogsRetentionConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig} TaskLogsRetentionConfig - */ - TaskLogsRetentionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig(); - switch (object.storageMode) { - default: - if (typeof object.storageMode === "number") { - message.storageMode = object.storageMode; - break; - } - break; - case "TASK_LOGS_STORAGE_MODE_UNSPECIFIED": - case 0: - message.storageMode = 0; - break; - case "CLOUD_LOGGING_AND_CLOUD_STORAGE": - case 1: - message.storageMode = 1; - break; - case "CLOUD_LOGGING_ONLY": - case 2: - message.storageMode = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a TaskLogsRetentionConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig} message TaskLogsRetentionConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TaskLogsRetentionConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.storageMode = options.enums === String ? "TASK_LOGS_STORAGE_MODE_UNSPECIFIED" : 0; - if (message.storageMode != null && message.hasOwnProperty("storageMode")) - object.storageMode = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode[message.storageMode] === undefined ? message.storageMode : $root.google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode[message.storageMode] : message.storageMode; - return object; - }; - - /** - * Converts this TaskLogsRetentionConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig - * @instance - * @returns {Object.} JSON object - */ - TaskLogsRetentionConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TaskLogsRetentionConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TaskLogsRetentionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig"; - }; - - /** - * TaskLogsStorageMode enum. - * @name google.cloud.orchestration.airflow.service.v1beta1.TaskLogsRetentionConfig.TaskLogsStorageMode - * @enum {number} - * @property {number} TASK_LOGS_STORAGE_MODE_UNSPECIFIED=0 TASK_LOGS_STORAGE_MODE_UNSPECIFIED value - * @property {number} CLOUD_LOGGING_AND_CLOUD_STORAGE=1 CLOUD_LOGGING_AND_CLOUD_STORAGE value - * @property {number} CLOUD_LOGGING_ONLY=2 CLOUD_LOGGING_ONLY value - */ - TaskLogsRetentionConfig.TaskLogsStorageMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TASK_LOGS_STORAGE_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD_LOGGING_AND_CLOUD_STORAGE"] = 1; - values[valuesById[2] = "CLOUD_LOGGING_ONLY"] = 2; - return values; - })(); - - return TaskLogsRetentionConfig; - })(); - - v1beta1.AirflowMetadataRetentionPolicyConfig = (function() { - - /** - * Properties of an AirflowMetadataRetentionPolicyConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IAirflowMetadataRetentionPolicyConfig - * @property {google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode|null} [retentionMode] AirflowMetadataRetentionPolicyConfig retentionMode - * @property {number|null} [retentionDays] AirflowMetadataRetentionPolicyConfig retentionDays - */ - - /** - * Constructs a new AirflowMetadataRetentionPolicyConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents an AirflowMetadataRetentionPolicyConfig. - * @implements IAirflowMetadataRetentionPolicyConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig=} [properties] Properties to set - */ - function AirflowMetadataRetentionPolicyConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * AirflowMetadataRetentionPolicyConfig retentionMode. - * @member {google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode} retentionMode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig - * @instance - */ - AirflowMetadataRetentionPolicyConfig.prototype.retentionMode = 0; - - /** - * AirflowMetadataRetentionPolicyConfig retentionDays. - * @member {number} retentionDays - * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig - * @instance - */ - AirflowMetadataRetentionPolicyConfig.prototype.retentionDays = 0; - - /** - * Creates a new AirflowMetadataRetentionPolicyConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig} AirflowMetadataRetentionPolicyConfig instance - */ - AirflowMetadataRetentionPolicyConfig.create = function create(properties) { - return new AirflowMetadataRetentionPolicyConfig(properties); - }; - - /** - * Encodes the specified AirflowMetadataRetentionPolicyConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig} message AirflowMetadataRetentionPolicyConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AirflowMetadataRetentionPolicyConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.retentionMode != null && Object.hasOwnProperty.call(message, "retentionMode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.retentionMode); - if (message.retentionDays != null && Object.hasOwnProperty.call(message, "retentionDays")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.retentionDays); - return writer; - }; - - /** - * Encodes the specified AirflowMetadataRetentionPolicyConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IAirflowMetadataRetentionPolicyConfig} message AirflowMetadataRetentionPolicyConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AirflowMetadataRetentionPolicyConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AirflowMetadataRetentionPolicyConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig} AirflowMetadataRetentionPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AirflowMetadataRetentionPolicyConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.retentionMode = reader.int32(); - break; - } - case 2: { - message.retentionDays = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AirflowMetadataRetentionPolicyConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig} AirflowMetadataRetentionPolicyConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AirflowMetadataRetentionPolicyConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AirflowMetadataRetentionPolicyConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AirflowMetadataRetentionPolicyConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.retentionMode != null && message.hasOwnProperty("retentionMode")) - switch (message.retentionMode) { - default: - return "retentionMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) - if (!$util.isInteger(message.retentionDays)) - return "retentionDays: integer expected"; - return null; - }; - - /** - * Creates an AirflowMetadataRetentionPolicyConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig} AirflowMetadataRetentionPolicyConfig - */ - AirflowMetadataRetentionPolicyConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig(); - switch (object.retentionMode) { - default: - if (typeof object.retentionMode === "number") { - message.retentionMode = object.retentionMode; - break; - } - break; - case "RETENTION_MODE_UNSPECIFIED": - case 0: - message.retentionMode = 0; - break; - case "RETENTION_MODE_ENABLED": - case 1: - message.retentionMode = 1; - break; - case "RETENTION_MODE_DISABLED": - case 2: - message.retentionMode = 2; - break; - } - if (object.retentionDays != null) - message.retentionDays = object.retentionDays | 0; - return message; - }; - - /** - * Creates a plain object from an AirflowMetadataRetentionPolicyConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig} message AirflowMetadataRetentionPolicyConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AirflowMetadataRetentionPolicyConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.retentionMode = options.enums === String ? "RETENTION_MODE_UNSPECIFIED" : 0; - object.retentionDays = 0; - } - if (message.retentionMode != null && message.hasOwnProperty("retentionMode")) - object.retentionMode = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode[message.retentionMode] === undefined ? message.retentionMode : $root.google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode[message.retentionMode] : message.retentionMode; - if (message.retentionDays != null && message.hasOwnProperty("retentionDays")) - object.retentionDays = message.retentionDays; - return object; - }; - - /** - * Converts this AirflowMetadataRetentionPolicyConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig - * @instance - * @returns {Object.} JSON object - */ - AirflowMetadataRetentionPolicyConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AirflowMetadataRetentionPolicyConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AirflowMetadataRetentionPolicyConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig"; - }; - - /** - * RetentionMode enum. - * @name google.cloud.orchestration.airflow.service.v1beta1.AirflowMetadataRetentionPolicyConfig.RetentionMode - * @enum {number} - * @property {number} RETENTION_MODE_UNSPECIFIED=0 RETENTION_MODE_UNSPECIFIED value - * @property {number} RETENTION_MODE_ENABLED=1 RETENTION_MODE_ENABLED value - * @property {number} RETENTION_MODE_DISABLED=2 RETENTION_MODE_DISABLED value - */ - AirflowMetadataRetentionPolicyConfig.RetentionMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "RETENTION_MODE_ENABLED"] = 1; - values[valuesById[2] = "RETENTION_MODE_DISABLED"] = 2; - return values; - })(); - - return AirflowMetadataRetentionPolicyConfig; - })(); - - v1beta1.StorageConfig = (function() { - - /** - * Properties of a StorageConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IStorageConfig - * @property {string|null} [bucket] StorageConfig bucket - */ - - /** - * Constructs a new StorageConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a StorageConfig. - * @implements IStorageConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig=} [properties] Properties to set - */ - function StorageConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * StorageConfig bucket. - * @member {string} bucket - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig - * @instance - */ - StorageConfig.prototype.bucket = ""; - - /** - * Creates a new StorageConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.StorageConfig} StorageConfig instance - */ - StorageConfig.create = function create(properties) { - return new StorageConfig(properties); - }; - - /** - * Encodes the specified StorageConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig} message StorageConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bucket != null && Object.hasOwnProperty.call(message, "bucket")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucket); - return writer; - }; - - /** - * Encodes the specified StorageConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig} message StorageConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StorageConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StorageConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.StorageConfig} StorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.bucket = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StorageConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.StorageConfig} StorageConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StorageConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StorageConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StorageConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bucket != null && message.hasOwnProperty("bucket")) - if (!$util.isString(message.bucket)) - return "bucket: string expected"; - return null; - }; - - /** - * Creates a StorageConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.StorageConfig} StorageConfig - */ - StorageConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig(); - if (object.bucket != null) - message.bucket = String(object.bucket); - return message; - }; - - /** - * Creates a plain object from a StorageConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.StorageConfig} message StorageConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StorageConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.bucket = ""; - if (message.bucket != null && message.hasOwnProperty("bucket")) - object.bucket = message.bucket; - return object; - }; - - /** - * Converts this StorageConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig - * @instance - * @returns {Object.} JSON object - */ - StorageConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StorageConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.StorageConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StorageConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.StorageConfig"; - }; - - return StorageConfig; - })(); - - v1beta1.RecoveryConfig = (function() { - - /** - * Properties of a RecoveryConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IRecoveryConfig - * @property {google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig|null} [scheduledSnapshotsConfig] RecoveryConfig scheduledSnapshotsConfig - */ - - /** - * Constructs a new RecoveryConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a RecoveryConfig. - * @implements IRecoveryConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig=} [properties] Properties to set - */ - function RecoveryConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * RecoveryConfig scheduledSnapshotsConfig. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig|null|undefined} scheduledSnapshotsConfig - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig - * @instance - */ - RecoveryConfig.prototype.scheduledSnapshotsConfig = null; - - /** - * Creates a new RecoveryConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig} RecoveryConfig instance - */ - RecoveryConfig.create = function create(properties) { - return new RecoveryConfig(properties); - }; - - /** - * Encodes the specified RecoveryConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig} message RecoveryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecoveryConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.scheduledSnapshotsConfig != null && Object.hasOwnProperty.call(message, "scheduledSnapshotsConfig")) - $root.google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.encode(message.scheduledSnapshotsConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RecoveryConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IRecoveryConfig} message RecoveryConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RecoveryConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RecoveryConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig} RecoveryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecoveryConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.scheduledSnapshotsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RecoveryConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig} RecoveryConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RecoveryConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RecoveryConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RecoveryConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.scheduledSnapshotsConfig != null && message.hasOwnProperty("scheduledSnapshotsConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.verify(message.scheduledSnapshotsConfig); - if (error) - return "scheduledSnapshotsConfig." + error; - } - return null; - }; - - /** - * Creates a RecoveryConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig} RecoveryConfig - */ - RecoveryConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig(); - if (object.scheduledSnapshotsConfig != null) { - if (typeof object.scheduledSnapshotsConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig.scheduledSnapshotsConfig: object expected"); - message.scheduledSnapshotsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.fromObject(object.scheduledSnapshotsConfig); - } - return message; - }; - - /** - * Creates a plain object from a RecoveryConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig} message RecoveryConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RecoveryConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.scheduledSnapshotsConfig = null; - if (message.scheduledSnapshotsConfig != null && message.hasOwnProperty("scheduledSnapshotsConfig")) - object.scheduledSnapshotsConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.toObject(message.scheduledSnapshotsConfig, options); - return object; - }; - - /** - * Converts this RecoveryConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig - * @instance - * @returns {Object.} JSON object - */ - RecoveryConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RecoveryConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RecoveryConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.RecoveryConfig"; - }; - - return RecoveryConfig; - })(); - - v1beta1.ScheduledSnapshotsConfig = (function() { - - /** - * Properties of a ScheduledSnapshotsConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IScheduledSnapshotsConfig - * @property {boolean|null} [enabled] ScheduledSnapshotsConfig enabled - * @property {string|null} [snapshotLocation] ScheduledSnapshotsConfig snapshotLocation - * @property {string|null} [snapshotCreationSchedule] ScheduledSnapshotsConfig snapshotCreationSchedule - * @property {string|null} [timeZone] ScheduledSnapshotsConfig timeZone - */ - - /** - * Constructs a new ScheduledSnapshotsConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a ScheduledSnapshotsConfig. - * @implements IScheduledSnapshotsConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig=} [properties] Properties to set - */ - function ScheduledSnapshotsConfig(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ScheduledSnapshotsConfig enabled. - * @member {boolean} enabled - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig - * @instance - */ - ScheduledSnapshotsConfig.prototype.enabled = false; - - /** - * ScheduledSnapshotsConfig snapshotLocation. - * @member {string} snapshotLocation - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig - * @instance - */ - ScheduledSnapshotsConfig.prototype.snapshotLocation = ""; - - /** - * ScheduledSnapshotsConfig snapshotCreationSchedule. - * @member {string} snapshotCreationSchedule - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig - * @instance - */ - ScheduledSnapshotsConfig.prototype.snapshotCreationSchedule = ""; - - /** - * ScheduledSnapshotsConfig timeZone. - * @member {string} timeZone - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig - * @instance - */ - ScheduledSnapshotsConfig.prototype.timeZone = ""; - - /** - * Creates a new ScheduledSnapshotsConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig} ScheduledSnapshotsConfig instance - */ - ScheduledSnapshotsConfig.create = function create(properties) { - return new ScheduledSnapshotsConfig(properties); - }; - - /** - * Encodes the specified ScheduledSnapshotsConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig} message ScheduledSnapshotsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScheduledSnapshotsConfig.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.snapshotCreationSchedule != null && Object.hasOwnProperty.call(message, "snapshotCreationSchedule")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.snapshotCreationSchedule); - if (message.timeZone != null && Object.hasOwnProperty.call(message, "timeZone")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.timeZone); - if (message.snapshotLocation != null && Object.hasOwnProperty.call(message, "snapshotLocation")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.snapshotLocation); - return writer; - }; - - /** - * Encodes the specified ScheduledSnapshotsConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IScheduledSnapshotsConfig} message ScheduledSnapshotsConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ScheduledSnapshotsConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ScheduledSnapshotsConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig} ScheduledSnapshotsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScheduledSnapshotsConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 6: { - message.snapshotLocation = reader.string(); - break; - } - case 3: { - message.snapshotCreationSchedule = reader.string(); - break; - } - case 5: { - message.timeZone = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ScheduledSnapshotsConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig} ScheduledSnapshotsConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ScheduledSnapshotsConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ScheduledSnapshotsConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ScheduledSnapshotsConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.snapshotLocation != null && message.hasOwnProperty("snapshotLocation")) - if (!$util.isString(message.snapshotLocation)) - return "snapshotLocation: string expected"; - if (message.snapshotCreationSchedule != null && message.hasOwnProperty("snapshotCreationSchedule")) - if (!$util.isString(message.snapshotCreationSchedule)) - return "snapshotCreationSchedule: string expected"; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - if (!$util.isString(message.timeZone)) - return "timeZone: string expected"; - return null; - }; - - /** - * Creates a ScheduledSnapshotsConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig} ScheduledSnapshotsConfig - */ - ScheduledSnapshotsConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.snapshotLocation != null) - message.snapshotLocation = String(object.snapshotLocation); - if (object.snapshotCreationSchedule != null) - message.snapshotCreationSchedule = String(object.snapshotCreationSchedule); - if (object.timeZone != null) - message.timeZone = String(object.timeZone); - return message; - }; - - /** - * Creates a plain object from a ScheduledSnapshotsConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig} message ScheduledSnapshotsConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ScheduledSnapshotsConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.enabled = false; - object.snapshotCreationSchedule = ""; - object.timeZone = ""; - object.snapshotLocation = ""; - } - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.snapshotCreationSchedule != null && message.hasOwnProperty("snapshotCreationSchedule")) - object.snapshotCreationSchedule = message.snapshotCreationSchedule; - if (message.timeZone != null && message.hasOwnProperty("timeZone")) - object.timeZone = message.timeZone; - if (message.snapshotLocation != null && message.hasOwnProperty("snapshotLocation")) - object.snapshotLocation = message.snapshotLocation; - return object; - }; - - /** - * Converts this ScheduledSnapshotsConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig - * @instance - * @returns {Object.} JSON object - */ - ScheduledSnapshotsConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ScheduledSnapshotsConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ScheduledSnapshotsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ScheduledSnapshotsConfig"; - }; - - return ScheduledSnapshotsConfig; - })(); - - v1beta1.MasterAuthorizedNetworksConfig = (function() { - - /** - * Properties of a MasterAuthorizedNetworksConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IMasterAuthorizedNetworksConfig - * @property {boolean|null} [enabled] MasterAuthorizedNetworksConfig enabled - * @property {Array.|null} [cidrBlocks] MasterAuthorizedNetworksConfig cidrBlocks - */ - - /** - * Constructs a new MasterAuthorizedNetworksConfig. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a MasterAuthorizedNetworksConfig. - * @implements IMasterAuthorizedNetworksConfig - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig=} [properties] Properties to set - */ - function MasterAuthorizedNetworksConfig(properties) { - this.cidrBlocks = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MasterAuthorizedNetworksConfig enabled. - * @member {boolean} enabled - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig - * @instance - */ - MasterAuthorizedNetworksConfig.prototype.enabled = false; - - /** - * MasterAuthorizedNetworksConfig cidrBlocks. - * @member {Array.} cidrBlocks - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig - * @instance - */ - MasterAuthorizedNetworksConfig.prototype.cidrBlocks = $util.emptyArray; - - /** - * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig instance - */ - MasterAuthorizedNetworksConfig.create = function create(properties) { - return new MasterAuthorizedNetworksConfig(properties); - }; - - /** - * Encodes the specified MasterAuthorizedNetworksConfig message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterAuthorizedNetworksConfig.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.cidrBlocks != null && message.cidrBlocks.length) - for (var i = 0; i < message.cidrBlocks.length; ++i) - $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.encode(message.cidrBlocks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MasterAuthorizedNetworksConfig message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IMasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MasterAuthorizedNetworksConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterAuthorizedNetworksConfig.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - case 2: { - if (!(message.cidrBlocks && message.cidrBlocks.length)) - message.cidrBlocks = []; - message.cidrBlocks.push($root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MasterAuthorizedNetworksConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MasterAuthorizedNetworksConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MasterAuthorizedNetworksConfig message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MasterAuthorizedNetworksConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - if (message.cidrBlocks != null && message.hasOwnProperty("cidrBlocks")) { - if (!Array.isArray(message.cidrBlocks)) - return "cidrBlocks: array expected"; - for (var i = 0; i < message.cidrBlocks.length; ++i) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify(message.cidrBlocks[i]); - if (error) - return "cidrBlocks." + error; - } - } - return null; - }; - - /** - * Creates a MasterAuthorizedNetworksConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig} MasterAuthorizedNetworksConfig - */ - MasterAuthorizedNetworksConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - if (object.cidrBlocks) { - if (!Array.isArray(object.cidrBlocks)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.cidrBlocks: array expected"); - message.cidrBlocks = []; - for (var i = 0; i < object.cidrBlocks.length; ++i) { - if (typeof object.cidrBlocks[i] !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.cidrBlocks: object expected"); - message.cidrBlocks[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.fromObject(object.cidrBlocks[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MasterAuthorizedNetworksConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig} message MasterAuthorizedNetworksConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MasterAuthorizedNetworksConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.cidrBlocks = []; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - if (message.cidrBlocks && message.cidrBlocks.length) { - object.cidrBlocks = []; - for (var j = 0; j < message.cidrBlocks.length; ++j) - object.cidrBlocks[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.toObject(message.cidrBlocks[j], options); - } - return object; - }; - - /** - * Converts this MasterAuthorizedNetworksConfig to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig - * @instance - * @returns {Object.} JSON object - */ - MasterAuthorizedNetworksConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MasterAuthorizedNetworksConfig - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MasterAuthorizedNetworksConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig"; - }; - - MasterAuthorizedNetworksConfig.CidrBlock = (function() { - - /** - * Properties of a CidrBlock. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig - * @interface ICidrBlock - * @property {string|null} [displayName] CidrBlock displayName - * @property {string|null} [cidrBlock] CidrBlock cidrBlock - */ - - /** - * Constructs a new CidrBlock. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig - * @classdesc Represents a CidrBlock. - * @implements ICidrBlock - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock=} [properties] Properties to set - */ - function CidrBlock(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CidrBlock displayName. - * @member {string} displayName - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @instance - */ - CidrBlock.prototype.displayName = ""; - - /** - * CidrBlock cidrBlock. - * @member {string} cidrBlock - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @instance - */ - CidrBlock.prototype.cidrBlock = ""; - - /** - * Creates a new CidrBlock instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock instance - */ - CidrBlock.create = function create(properties) { - return new CidrBlock(properties); - }; - - /** - * Encodes the specified CidrBlock message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock} message CidrBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CidrBlock.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.displayName); - if (message.cidrBlock != null && Object.hasOwnProperty.call(message, "cidrBlock")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.cidrBlock); - return writer; - }; - - /** - * Encodes the specified CidrBlock message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.ICidrBlock} message CidrBlock message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CidrBlock.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CidrBlock message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CidrBlock.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.displayName = reader.string(); - break; - } - case 2: { - message.cidrBlock = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CidrBlock message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CidrBlock.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CidrBlock message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CidrBlock.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.cidrBlock != null && message.hasOwnProperty("cidrBlock")) - if (!$util.isString(message.cidrBlock)) - return "cidrBlock: string expected"; - return null; - }; - - /** - * Creates a CidrBlock message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} CidrBlock - */ - CidrBlock.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock(); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.cidrBlock != null) - message.cidrBlock = String(object.cidrBlock); - return message; - }; - - /** - * Creates a plain object from a CidrBlock message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock} message CidrBlock - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CidrBlock.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.displayName = ""; - object.cidrBlock = ""; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.cidrBlock != null && message.hasOwnProperty("cidrBlock")) - object.cidrBlock = message.cidrBlock; - return object; - }; - - /** - * Converts this CidrBlock to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @instance - * @returns {Object.} JSON object - */ - CidrBlock.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CidrBlock - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CidrBlock.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.MasterAuthorizedNetworksConfig.CidrBlock"; - }; - - return CidrBlock; - })(); - - return MasterAuthorizedNetworksConfig; - })(); - - v1beta1.CloudDataLineageIntegration = (function() { - - /** - * Properties of a CloudDataLineageIntegration. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface ICloudDataLineageIntegration - * @property {boolean|null} [enabled] CloudDataLineageIntegration enabled - */ - - /** - * Constructs a new CloudDataLineageIntegration. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a CloudDataLineageIntegration. - * @implements ICloudDataLineageIntegration - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration=} [properties] Properties to set - */ - function CloudDataLineageIntegration(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CloudDataLineageIntegration enabled. - * @member {boolean} enabled - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration - * @instance - */ - CloudDataLineageIntegration.prototype.enabled = false; - - /** - * Creates a new CloudDataLineageIntegration instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration} CloudDataLineageIntegration instance - */ - CloudDataLineageIntegration.create = function create(properties) { - return new CloudDataLineageIntegration(properties); - }; - - /** - * Encodes the specified CloudDataLineageIntegration message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration} message CloudDataLineageIntegration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudDataLineageIntegration.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); - return writer; - }; - - /** - * Encodes the specified CloudDataLineageIntegration message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICloudDataLineageIntegration} message CloudDataLineageIntegration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CloudDataLineageIntegration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CloudDataLineageIntegration message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration} CloudDataLineageIntegration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudDataLineageIntegration.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.enabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CloudDataLineageIntegration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration} CloudDataLineageIntegration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CloudDataLineageIntegration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CloudDataLineageIntegration message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CloudDataLineageIntegration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; - return null; - }; - - /** - * Creates a CloudDataLineageIntegration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration} CloudDataLineageIntegration - */ - CloudDataLineageIntegration.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); - return message; - }; - - /** - * Creates a plain object from a CloudDataLineageIntegration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration} message CloudDataLineageIntegration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CloudDataLineageIntegration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; - return object; - }; - - /** - * Converts this CloudDataLineageIntegration to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration - * @instance - * @returns {Object.} JSON object - */ - CloudDataLineageIntegration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CloudDataLineageIntegration - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CloudDataLineageIntegration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.CloudDataLineageIntegration"; - }; - - return CloudDataLineageIntegration; - })(); - - v1beta1.Environment = (function() { - - /** - * Properties of an Environment. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IEnvironment - * @property {string|null} [name] Environment name - * @property {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig|null} [config] Environment config - * @property {string|null} [uuid] Environment uuid - * @property {google.cloud.orchestration.airflow.service.v1beta1.Environment.State|null} [state] Environment state - * @property {google.protobuf.ITimestamp|null} [createTime] Environment createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime - * @property {Object.|null} [labels] Environment labels - * @property {boolean|null} [satisfiesPzs] Environment satisfiesPzs - * @property {boolean|null} [satisfiesPzi] Environment satisfiesPzi - * @property {google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig|null} [storageConfig] Environment storageConfig - */ - - /** - * Constructs a new Environment. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents an Environment. - * @implements IEnvironment - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment=} [properties] Properties to set - */ - function Environment(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]]; - } - - /** - * Environment name. - * @member {string} name - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @instance - */ - Environment.prototype.name = ""; - - /** - * Environment config. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IEnvironmentConfig|null|undefined} config - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @instance - */ - Environment.prototype.config = null; - - /** - * Environment uuid. - * @member {string} uuid - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @instance - */ - Environment.prototype.uuid = ""; - - /** - * Environment state. - * @member {google.cloud.orchestration.airflow.service.v1beta1.Environment.State} state - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @instance - */ - Environment.prototype.state = 0; - - /** - * Environment createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @instance - */ - Environment.prototype.createTime = null; - - /** - * Environment updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @instance - */ - Environment.prototype.updateTime = null; - - /** - * Environment labels. - * @member {Object.} labels - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @instance - */ - Environment.prototype.labels = $util.emptyObject; - - /** - * Environment satisfiesPzs. - * @member {boolean} satisfiesPzs - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @instance - */ - Environment.prototype.satisfiesPzs = false; - - /** - * Environment satisfiesPzi. - * @member {boolean} satisfiesPzi - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @instance - */ - Environment.prototype.satisfiesPzi = false; - - /** - * Environment storageConfig. - * @member {google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig|null|undefined} storageConfig - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @instance - */ - Environment.prototype.storageConfig = null; - - /** - * Creates a new Environment instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.Environment} Environment instance - */ - Environment.create = function create(properties) { - return new Environment(properties); - }; - - /** - * Encodes the specified Environment message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.Environment.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment} message Environment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Environment.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.config != null && Object.hasOwnProperty.call(message, "config")) - $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.encode(message.config, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.uuid != null && Object.hasOwnProperty.call(message, "uuid")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.uuid); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.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.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) - writer.uint32(/* id 8, wireType 0 =*/64).bool(message.satisfiesPzs); - if (message.storageConfig != null && Object.hasOwnProperty.call(message, "storageConfig")) - $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.encode(message.storageConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.satisfiesPzi); - return writer; - }; - - /** - * Encodes the specified Environment message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.Environment.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IEnvironment} message Environment message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Environment.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Environment message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.Environment} Environment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Environment.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.Environment(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.config = $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.decode(reader, reader.uint32()); - break; - } - case 3: { - message.uuid = reader.string(); - break; - } - case 4: { - message.state = reader.int32(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.updateTime = $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; - } - case 8: { - message.satisfiesPzs = reader.bool(); - break; - } - case 10: { - message.satisfiesPzi = reader.bool(); - break; - } - case 9: { - message.storageConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Environment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.Environment} Environment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Environment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Environment message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Environment.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.config != null && message.hasOwnProperty("config")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.verify(message.config); - if (error) - return "config." + error; - } - if (message.uuid != null && message.hasOwnProperty("uuid")) - if (!$util.isString(message.uuid)) - return "uuid: 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.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - if (message.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.storageConfig != null && message.hasOwnProperty("storageConfig")) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.verify(message.storageConfig); - if (error) - return "storageConfig." + error; - } - return null; - }; - - /** - * Creates an Environment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.Environment} Environment - */ - Environment.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.Environment) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.Environment(); - if (object.name != null) - message.name = String(object.name); - if (object.config != null) { - if (typeof object.config !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.Environment.config: object expected"); - message.config = $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.fromObject(object.config); - } - if (object.uuid != null) - message.uuid = String(object.uuid); - 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 "RUNNING": - case 2: - message.state = 2; - break; - case "UPDATING": - case 3: - message.state = 3; - break; - case "DELETING": - case 4: - message.state = 4; - break; - case "ERROR": - case 5: - message.state = 5; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.Environment.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.Environment.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.Environment.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.satisfiesPzs != null) - message.satisfiesPzs = Boolean(object.satisfiesPzs); - if (object.satisfiesPzi != null) - message.satisfiesPzi = Boolean(object.satisfiesPzi); - if (object.storageConfig != null) { - if (typeof object.storageConfig !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.Environment.storageConfig: object expected"); - message.storageConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.fromObject(object.storageConfig); - } - return message; - }; - - /** - * Creates a plain object from an Environment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environment} message Environment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Environment.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) { - object.name = ""; - object.config = null; - object.uuid = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.createTime = null; - object.updateTime = null; - object.satisfiesPzs = false; - object.storageConfig = null; - object.satisfiesPzi = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.config != null && message.hasOwnProperty("config")) - object.config = $root.google.cloud.orchestration.airflow.service.v1beta1.EnvironmentConfig.toObject(message.config, options); - if (message.uuid != null && message.hasOwnProperty("uuid")) - object.uuid = message.uuid; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.State[message.state] === undefined ? message.state : $root.google.cloud.orchestration.airflow.service.v1beta1.Environment.State[message.state] : message.state; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - 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.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) - object.satisfiesPzs = message.satisfiesPzs; - if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) - object.storageConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.toObject(message.storageConfig, options); - if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) - object.satisfiesPzi = message.satisfiesPzi; - return object; - }; - - /** - * Converts this Environment to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @instance - * @returns {Object.} JSON object - */ - Environment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Environment - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Environment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.Environment"; - }; - - /** - * State enum. - * @name google.cloud.orchestration.airflow.service.v1beta1.Environment.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} CREATING=1 CREATING value - * @property {number} RUNNING=2 RUNNING value - * @property {number} UPDATING=3 UPDATING value - * @property {number} DELETING=4 DELETING value - * @property {number} ERROR=5 ERROR value - */ - Environment.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATING"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "UPDATING"] = 3; - values[valuesById[4] = "DELETING"] = 4; - values[valuesById[5] = "ERROR"] = 5; - return values; - })(); - - return Environment; - })(); - - v1beta1.CheckUpgradeRequest = (function() { - - /** - * Properties of a CheckUpgradeRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface ICheckUpgradeRequest - * @property {string|null} [environment] CheckUpgradeRequest environment - * @property {string|null} [imageVersion] CheckUpgradeRequest imageVersion - */ - - /** - * Constructs a new CheckUpgradeRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a CheckUpgradeRequest. - * @implements ICheckUpgradeRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest=} [properties] Properties to set - */ - function CheckUpgradeRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CheckUpgradeRequest environment. - * @member {string} environment - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest - * @instance - */ - CheckUpgradeRequest.prototype.environment = ""; - - /** - * CheckUpgradeRequest imageVersion. - * @member {string} imageVersion - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest - * @instance - */ - CheckUpgradeRequest.prototype.imageVersion = ""; - - /** - * Creates a new CheckUpgradeRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} CheckUpgradeRequest instance - */ - CheckUpgradeRequest.create = function create(properties) { - return new CheckUpgradeRequest(properties); - }; - - /** - * Encodes the specified CheckUpgradeRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest} message CheckUpgradeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckUpgradeRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.environment != null && Object.hasOwnProperty.call(message, "environment")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.environment); - if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageVersion); - return writer; - }; - - /** - * Encodes the specified CheckUpgradeRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest} message CheckUpgradeRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckUpgradeRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CheckUpgradeRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} CheckUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckUpgradeRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.environment = reader.string(); - break; - } - case 2: { - message.imageVersion = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CheckUpgradeRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} CheckUpgradeRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckUpgradeRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CheckUpgradeRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CheckUpgradeRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.environment != null && message.hasOwnProperty("environment")) - if (!$util.isString(message.environment)) - return "environment: string expected"; - if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) - if (!$util.isString(message.imageVersion)) - return "imageVersion: string expected"; - return null; - }; - - /** - * Creates a CheckUpgradeRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} CheckUpgradeRequest - */ - CheckUpgradeRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest(); - if (object.environment != null) - message.environment = String(object.environment); - if (object.imageVersion != null) - message.imageVersion = String(object.imageVersion); - return message; - }; - - /** - * Creates a plain object from a CheckUpgradeRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest} message CheckUpgradeRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CheckUpgradeRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.environment = ""; - object.imageVersion = ""; - } - if (message.environment != null && message.hasOwnProperty("environment")) - object.environment = message.environment; - if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) - object.imageVersion = message.imageVersion; - return object; - }; - - /** - * Converts this CheckUpgradeRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest - * @instance - * @returns {Object.} JSON object - */ - CheckUpgradeRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CheckUpgradeRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CheckUpgradeRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest"; - }; - - return CheckUpgradeRequest; - })(); - - v1beta1.CheckUpgradeResponse = (function() { - - /** - * Properties of a CheckUpgradeResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface ICheckUpgradeResponse - * @property {string|null} [buildLogUri] CheckUpgradeResponse buildLogUri - * @property {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult|null} [containsPypiModulesConflict] CheckUpgradeResponse containsPypiModulesConflict - * @property {string|null} [pypiConflictBuildLogExtract] CheckUpgradeResponse pypiConflictBuildLogExtract - * @property {string|null} [imageVersion] CheckUpgradeResponse imageVersion - * @property {Object.|null} [pypiDependencies] CheckUpgradeResponse pypiDependencies - */ - - /** - * Constructs a new CheckUpgradeResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a CheckUpgradeResponse. - * @implements ICheckUpgradeResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse=} [properties] Properties to set - */ - function CheckUpgradeResponse(properties) { - this.pypiDependencies = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * CheckUpgradeResponse buildLogUri. - * @member {string} buildLogUri - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse - * @instance - */ - CheckUpgradeResponse.prototype.buildLogUri = ""; - - /** - * CheckUpgradeResponse containsPypiModulesConflict. - * @member {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult} containsPypiModulesConflict - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse - * @instance - */ - CheckUpgradeResponse.prototype.containsPypiModulesConflict = 0; - - /** - * CheckUpgradeResponse pypiConflictBuildLogExtract. - * @member {string} pypiConflictBuildLogExtract - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse - * @instance - */ - CheckUpgradeResponse.prototype.pypiConflictBuildLogExtract = ""; - - /** - * CheckUpgradeResponse imageVersion. - * @member {string} imageVersion - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse - * @instance - */ - CheckUpgradeResponse.prototype.imageVersion = ""; - - /** - * CheckUpgradeResponse pypiDependencies. - * @member {Object.} pypiDependencies - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse - * @instance - */ - CheckUpgradeResponse.prototype.pypiDependencies = $util.emptyObject; - - /** - * Creates a new CheckUpgradeResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} CheckUpgradeResponse instance - */ - CheckUpgradeResponse.create = function create(properties) { - return new CheckUpgradeResponse(properties); - }; - - /** - * Encodes the specified CheckUpgradeResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse} message CheckUpgradeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckUpgradeResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.buildLogUri != null && Object.hasOwnProperty.call(message, "buildLogUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.buildLogUri); - if (message.pypiConflictBuildLogExtract != null && Object.hasOwnProperty.call(message, "pypiConflictBuildLogExtract")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pypiConflictBuildLogExtract); - if (message.containsPypiModulesConflict != null && Object.hasOwnProperty.call(message, "containsPypiModulesConflict")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.containsPypiModulesConflict); - if (message.imageVersion != null && Object.hasOwnProperty.call(message, "imageVersion")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.imageVersion); - if (message.pypiDependencies != null && Object.hasOwnProperty.call(message, "pypiDependencies")) - for (var keys = Object.keys(message.pypiDependencies), i = 0; i < keys.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.pypiDependencies[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified CheckUpgradeResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeResponse} message CheckUpgradeResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CheckUpgradeResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CheckUpgradeResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} CheckUpgradeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckUpgradeResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.buildLogUri = reader.string(); - break; - } - case 4: { - message.containsPypiModulesConflict = reader.int32(); - break; - } - case 3: { - message.pypiConflictBuildLogExtract = reader.string(); - break; - } - case 5: { - message.imageVersion = reader.string(); - break; - } - case 6: { - if (message.pypiDependencies === $util.emptyObject) - message.pypiDependencies = {}; - 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.pypiDependencies[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CheckUpgradeResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} CheckUpgradeResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CheckUpgradeResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CheckUpgradeResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CheckUpgradeResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.buildLogUri != null && message.hasOwnProperty("buildLogUri")) - if (!$util.isString(message.buildLogUri)) - return "buildLogUri: string expected"; - if (message.containsPypiModulesConflict != null && message.hasOwnProperty("containsPypiModulesConflict")) - switch (message.containsPypiModulesConflict) { - default: - return "containsPypiModulesConflict: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.pypiConflictBuildLogExtract != null && message.hasOwnProperty("pypiConflictBuildLogExtract")) - if (!$util.isString(message.pypiConflictBuildLogExtract)) - return "pypiConflictBuildLogExtract: string expected"; - if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) - if (!$util.isString(message.imageVersion)) - return "imageVersion: string expected"; - if (message.pypiDependencies != null && message.hasOwnProperty("pypiDependencies")) { - if (!$util.isObject(message.pypiDependencies)) - return "pypiDependencies: object expected"; - var key = Object.keys(message.pypiDependencies); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.pypiDependencies[key[i]])) - return "pypiDependencies: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a CheckUpgradeResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} CheckUpgradeResponse - */ - CheckUpgradeResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse(); - if (object.buildLogUri != null) - message.buildLogUri = String(object.buildLogUri); - switch (object.containsPypiModulesConflict) { - default: - if (typeof object.containsPypiModulesConflict === "number") { - message.containsPypiModulesConflict = object.containsPypiModulesConflict; - break; - } - break; - case "CONFLICT_RESULT_UNSPECIFIED": - case 0: - message.containsPypiModulesConflict = 0; - break; - case "CONFLICT": - case 1: - message.containsPypiModulesConflict = 1; - break; - case "NO_CONFLICT": - case 2: - message.containsPypiModulesConflict = 2; - break; - } - if (object.pypiConflictBuildLogExtract != null) - message.pypiConflictBuildLogExtract = String(object.pypiConflictBuildLogExtract); - if (object.imageVersion != null) - message.imageVersion = String(object.imageVersion); - if (object.pypiDependencies) { - if (typeof object.pypiDependencies !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.pypiDependencies: object expected"); - message.pypiDependencies = {}; - for (var keys = Object.keys(object.pypiDependencies), i = 0; i < keys.length; ++i) - message.pypiDependencies[keys[i]] = String(object.pypiDependencies[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a CheckUpgradeResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse} message CheckUpgradeResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CheckUpgradeResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.pypiDependencies = {}; - if (options.defaults) { - object.buildLogUri = ""; - object.pypiConflictBuildLogExtract = ""; - object.containsPypiModulesConflict = options.enums === String ? "CONFLICT_RESULT_UNSPECIFIED" : 0; - object.imageVersion = ""; - } - if (message.buildLogUri != null && message.hasOwnProperty("buildLogUri")) - object.buildLogUri = message.buildLogUri; - if (message.pypiConflictBuildLogExtract != null && message.hasOwnProperty("pypiConflictBuildLogExtract")) - object.pypiConflictBuildLogExtract = message.pypiConflictBuildLogExtract; - if (message.containsPypiModulesConflict != null && message.hasOwnProperty("containsPypiModulesConflict")) - object.containsPypiModulesConflict = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult[message.containsPypiModulesConflict] === undefined ? message.containsPypiModulesConflict : $root.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult[message.containsPypiModulesConflict] : message.containsPypiModulesConflict; - if (message.imageVersion != null && message.hasOwnProperty("imageVersion")) - object.imageVersion = message.imageVersion; - var keys2; - if (message.pypiDependencies && (keys2 = Object.keys(message.pypiDependencies)).length) { - object.pypiDependencies = {}; - for (var j = 0; j < keys2.length; ++j) - object.pypiDependencies[keys2[j]] = message.pypiDependencies[keys2[j]]; - } - return object; - }; - - /** - * Converts this CheckUpgradeResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse - * @instance - * @returns {Object.} JSON object - */ - CheckUpgradeResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CheckUpgradeResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CheckUpgradeResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse"; - }; - - /** - * ConflictResult enum. - * @name google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse.ConflictResult - * @enum {number} - * @property {number} CONFLICT_RESULT_UNSPECIFIED=0 CONFLICT_RESULT_UNSPECIFIED value - * @property {number} CONFLICT=1 CONFLICT value - * @property {number} NO_CONFLICT=2 NO_CONFLICT value - */ - CheckUpgradeResponse.ConflictResult = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CONFLICT_RESULT_UNSPECIFIED"] = 0; - values[valuesById[1] = "CONFLICT"] = 1; - values[valuesById[2] = "NO_CONFLICT"] = 2; - return values; - })(); - - return CheckUpgradeResponse; - })(); - - v1beta1.OperationMetadata = (function() { - - /** - * Properties of an OperationMetadata. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IOperationMetadata - * @property {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State|null} [state] OperationMetadata state - * @property {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type|null} [operationType] OperationMetadata operationType - * @property {string|null} [resource] OperationMetadata resource - * @property {string|null} [resourceUuid] OperationMetadata resourceUuid - * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime - * @property {google.protobuf.ITimestamp|null} [endTime] OperationMetadata endTime - */ - - /** - * Constructs a new OperationMetadata. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents an OperationMetadata. - * @implements IOperationMetadata - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.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 state. - * @member {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State} state - * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.state = 0; - - /** - * OperationMetadata operationType. - * @member {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type} operationType - * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.operationType = 0; - - /** - * OperationMetadata resource. - * @member {string} resource - * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.resource = ""; - - /** - * OperationMetadata resourceUuid. - * @member {string} resourceUuid - * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.resourceUuid = ""; - - /** - * OperationMetadata createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.createTime = null; - - /** - * OperationMetadata endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata - * @instance - */ - OperationMetadata.prototype.endTime = null; - - /** - * Creates a new OperationMetadata instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IOperationMetadata=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata} OperationMetadata instance - */ - OperationMetadata.create = function create(properties) { - return new OperationMetadata(properties); - }; - - /** - * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.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.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state); - if (message.operationType != null && Object.hasOwnProperty.call(message, "operationType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.operationType); - if (message.resource != null && Object.hasOwnProperty.call(message, "resource")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.resource); - if (message.resourceUuid != null && Object.hasOwnProperty.call(message, "resourceUuid")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.resourceUuid); - 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.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.state = reader.int32(); - break; - } - case 2: { - message.operationType = reader.int32(); - break; - } - case 3: { - message.resource = reader.string(); - break; - } - case 4: { - message.resourceUuid = reader.string(); - break; - } - case 5: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 6: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - 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.orchestration.airflow.service.v1beta1.OperationMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.operationType != null && message.hasOwnProperty("operationType")) - switch (message.operationType) { - default: - return "operationType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.resource != null && message.hasOwnProperty("resource")) - if (!$util.isString(message.resource)) - return "resource: string expected"; - if (message.resourceUuid != null && message.hasOwnProperty("resourceUuid")) - if (!$util.isString(message.resourceUuid)) - return "resourceUuid: 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.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; - } - return null; - }; - - /** - * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata} OperationMetadata - */ - OperationMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata(); - 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 "PENDING": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "SUCCESSFUL": - case 3: - message.state = 3; - break; - case "FAILED": - case 4: - message.state = 4; - break; - } - switch (object.operationType) { - default: - if (typeof object.operationType === "number") { - message.operationType = object.operationType; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.operationType = 0; - break; - case "CREATE": - case 1: - message.operationType = 1; - break; - case "DELETE": - case 2: - message.operationType = 2; - break; - case "UPDATE": - case 3: - message.operationType = 3; - break; - case "CHECK": - case 4: - message.operationType = 4; - break; - case "SAVE_SNAPSHOT": - case 5: - message.operationType = 5; - break; - case "LOAD_SNAPSHOT": - case 6: - message.operationType = 6; - break; - case "DATABASE_FAILOVER": - case 7: - message.operationType = 7; - break; - } - if (object.resource != null) - message.resource = String(object.resource); - if (object.resourceUuid != null) - message.resourceUuid = String(object.resourceUuid); - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.OperationMetadata.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - return message; - }; - - /** - * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.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.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.operationType = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.resource = ""; - object.resourceUuid = ""; - object.createTime = null; - object.endTime = null; - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State[message.state] : message.state; - if (message.operationType != null && message.hasOwnProperty("operationType")) - object.operationType = options.enums === String ? $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type[message.operationType] === undefined ? message.operationType : $root.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type[message.operationType] : message.operationType; - if (message.resource != null && message.hasOwnProperty("resource")) - object.resource = message.resource; - if (message.resourceUuid != null && message.hasOwnProperty("resourceUuid")) - object.resourceUuid = message.resourceUuid; - 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); - return object; - }; - - /** - * Converts this OperationMetadata to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.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.orchestration.airflow.service.v1beta1.OperationMetadata"; - }; - - /** - * State enum. - * @name google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} RUNNING=2 RUNNING value - * @property {number} SUCCESSFUL=3 SUCCESSFUL value - * @property {number} FAILED=4 FAILED value - */ - OperationMetadata.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "SUCCESSFUL"] = 3; - values[valuesById[4] = "FAILED"] = 4; - return values; - })(); - - /** - * Type enum. - * @name google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} CREATE=1 CREATE value - * @property {number} DELETE=2 DELETE value - * @property {number} UPDATE=3 UPDATE value - * @property {number} CHECK=4 CHECK value - * @property {number} SAVE_SNAPSHOT=5 SAVE_SNAPSHOT value - * @property {number} LOAD_SNAPSHOT=6 LOAD_SNAPSHOT value - * @property {number} DATABASE_FAILOVER=7 DATABASE_FAILOVER value - */ - OperationMetadata.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "CREATE"] = 1; - values[valuesById[2] = "DELETE"] = 2; - values[valuesById[3] = "UPDATE"] = 3; - values[valuesById[4] = "CHECK"] = 4; - values[valuesById[5] = "SAVE_SNAPSHOT"] = 5; - values[valuesById[6] = "LOAD_SNAPSHOT"] = 6; - values[valuesById[7] = "DATABASE_FAILOVER"] = 7; - return values; - })(); - - return OperationMetadata; - })(); - - v1beta1.ImageVersions = (function() { - - /** - * Constructs a new ImageVersions service. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents an ImageVersions - * @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 ImageVersions(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (ImageVersions.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ImageVersions; - - /** - * Creates new ImageVersions service using the specified rpc implementation. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersions - * @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 {ImageVersions} RPC service. Useful where requests and/or responses are streamed. - */ - ImageVersions.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersions|listImageVersions}. - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersions - * @typedef ListImageVersionsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} [response] ListImageVersionsResponse - */ - - /** - * Calls ListImageVersions. - * @function listImageVersions - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersions - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest} request ListImageVersionsRequest message or plain object - * @param {google.cloud.orchestration.airflow.service.v1beta1.ImageVersions.ListImageVersionsCallback} callback Node-style callback called with the error, if any, and ListImageVersionsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ImageVersions.prototype.listImageVersions = function listImageVersions(request, callback) { - return this.rpcCall(listImageVersions, $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest, $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse, request, callback); - }, "name", { value: "ListImageVersions" }); - - /** - * Calls ListImageVersions. - * @function listImageVersions - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersions - * @instance - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest} request ListImageVersionsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ImageVersions; - })(); - - v1beta1.ListImageVersionsRequest = (function() { - - /** - * Properties of a ListImageVersionsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IListImageVersionsRequest - * @property {string|null} [parent] ListImageVersionsRequest parent - * @property {number|null} [pageSize] ListImageVersionsRequest pageSize - * @property {string|null} [pageToken] ListImageVersionsRequest pageToken - * @property {boolean|null} [includePastReleases] ListImageVersionsRequest includePastReleases - */ - - /** - * Constructs a new ListImageVersionsRequest. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a ListImageVersionsRequest. - * @implements IListImageVersionsRequest - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest=} [properties] Properties to set - */ - function ListImageVersionsRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListImageVersionsRequest parent. - * @member {string} parent - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest - * @instance - */ - ListImageVersionsRequest.prototype.parent = ""; - - /** - * ListImageVersionsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest - * @instance - */ - ListImageVersionsRequest.prototype.pageSize = 0; - - /** - * ListImageVersionsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest - * @instance - */ - ListImageVersionsRequest.prototype.pageToken = ""; - - /** - * ListImageVersionsRequest includePastReleases. - * @member {boolean} includePastReleases - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest - * @instance - */ - ListImageVersionsRequest.prototype.includePastReleases = false; - - /** - * Creates a new ListImageVersionsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} ListImageVersionsRequest instance - */ - ListImageVersionsRequest.create = function create(properties) { - return new ListImageVersionsRequest(properties); - }; - - /** - * Encodes the specified ListImageVersionsRequest message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest} message ListImageVersionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListImageVersionsRequest.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.includePastReleases != null && Object.hasOwnProperty.call(message, "includePastReleases")) - writer.uint32(/* id 4, wireType 0 =*/32).bool(message.includePastReleases); - return writer; - }; - - /** - * Encodes the specified ListImageVersionsRequest message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest} message ListImageVersionsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListImageVersionsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListImageVersionsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} ListImageVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListImageVersionsRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - 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.includePastReleases = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListImageVersionsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} ListImageVersionsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListImageVersionsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListImageVersionsRequest message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListImageVersionsRequest.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.includePastReleases != null && message.hasOwnProperty("includePastReleases")) - if (typeof message.includePastReleases !== "boolean") - return "includePastReleases: boolean expected"; - return null; - }; - - /** - * Creates a ListImageVersionsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} ListImageVersionsRequest - */ - ListImageVersionsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest(); - 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.includePastReleases != null) - message.includePastReleases = Boolean(object.includePastReleases); - return message; - }; - - /** - * Creates a plain object from a ListImageVersionsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest} message ListImageVersionsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListImageVersionsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.includePastReleases = false; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.includePastReleases != null && message.hasOwnProperty("includePastReleases")) - object.includePastReleases = message.includePastReleases; - return object; - }; - - /** - * Converts this ListImageVersionsRequest to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest - * @instance - * @returns {Object.} JSON object - */ - ListImageVersionsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListImageVersionsRequest - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListImageVersionsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest"; - }; - - return ListImageVersionsRequest; - })(); - - v1beta1.ListImageVersionsResponse = (function() { - - /** - * Properties of a ListImageVersionsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IListImageVersionsResponse - * @property {Array.|null} [imageVersions] ListImageVersionsResponse imageVersions - * @property {string|null} [nextPageToken] ListImageVersionsResponse nextPageToken - */ - - /** - * Constructs a new ListImageVersionsResponse. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents a ListImageVersionsResponse. - * @implements IListImageVersionsResponse - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse=} [properties] Properties to set - */ - function ListImageVersionsResponse(properties) { - this.imageVersions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListImageVersionsResponse imageVersions. - * @member {Array.} imageVersions - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse - * @instance - */ - ListImageVersionsResponse.prototype.imageVersions = $util.emptyArray; - - /** - * ListImageVersionsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse - * @instance - */ - ListImageVersionsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListImageVersionsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} ListImageVersionsResponse instance - */ - ListImageVersionsResponse.create = function create(properties) { - return new ListImageVersionsResponse(properties); - }; - - /** - * Encodes the specified ListImageVersionsResponse message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse} message ListImageVersionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListImageVersionsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.imageVersions != null && message.imageVersions.length) - for (var i = 0; i < message.imageVersions.length; ++i) - $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.encode(message.imageVersions[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 ListImageVersionsResponse message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse} message ListImageVersionsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListImageVersionsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListImageVersionsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} ListImageVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListImageVersionsResponse.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.imageVersions && message.imageVersions.length)) - message.imageVersions = []; - message.imageVersions.push($root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListImageVersionsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} ListImageVersionsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListImageVersionsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListImageVersionsResponse message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListImageVersionsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.imageVersions != null && message.hasOwnProperty("imageVersions")) { - if (!Array.isArray(message.imageVersions)) - return "imageVersions: array expected"; - for (var i = 0; i < message.imageVersions.length; ++i) { - var error = $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.verify(message.imageVersions[i]); - if (error) - return "imageVersions." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListImageVersionsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} ListImageVersionsResponse - */ - ListImageVersionsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse(); - if (object.imageVersions) { - if (!Array.isArray(object.imageVersions)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.imageVersions: array expected"); - message.imageVersions = []; - for (var i = 0; i < object.imageVersions.length; ++i) { - if (typeof object.imageVersions[i] !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse.imageVersions: object expected"); - message.imageVersions[i] = $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.fromObject(object.imageVersions[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListImageVersionsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse} message ListImageVersionsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListImageVersionsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.imageVersions = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.imageVersions && message.imageVersions.length) { - object.imageVersions = []; - for (var j = 0; j < message.imageVersions.length; ++j) - object.imageVersions[j] = $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.toObject(message.imageVersions[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListImageVersionsResponse to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse - * @instance - * @returns {Object.} JSON object - */ - ListImageVersionsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListImageVersionsResponse - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListImageVersionsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse"; - }; - - return ListImageVersionsResponse; - })(); - - v1beta1.ImageVersion = (function() { - - /** - * Properties of an ImageVersion. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @interface IImageVersion - * @property {string|null} [imageVersionId] ImageVersion imageVersionId - * @property {boolean|null} [isDefault] ImageVersion isDefault - * @property {Array.|null} [supportedPythonVersions] ImageVersion supportedPythonVersions - * @property {google.type.IDate|null} [releaseDate] ImageVersion releaseDate - * @property {boolean|null} [creationDisabled] ImageVersion creationDisabled - * @property {boolean|null} [upgradeDisabled] ImageVersion upgradeDisabled - */ - - /** - * Constructs a new ImageVersion. - * @memberof google.cloud.orchestration.airflow.service.v1beta1 - * @classdesc Represents an ImageVersion. - * @implements IImageVersion - * @constructor - * @param {google.cloud.orchestration.airflow.service.v1beta1.IImageVersion=} [properties] Properties to set - */ - function ImageVersion(properties) { - this.supportedPythonVersions = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ImageVersion imageVersionId. - * @member {string} imageVersionId - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion - * @instance - */ - ImageVersion.prototype.imageVersionId = ""; - - /** - * ImageVersion isDefault. - * @member {boolean} isDefault - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion - * @instance - */ - ImageVersion.prototype.isDefault = false; - - /** - * ImageVersion supportedPythonVersions. - * @member {Array.} supportedPythonVersions - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion - * @instance - */ - ImageVersion.prototype.supportedPythonVersions = $util.emptyArray; - - /** - * ImageVersion releaseDate. - * @member {google.type.IDate|null|undefined} releaseDate - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion - * @instance - */ - ImageVersion.prototype.releaseDate = null; - - /** - * ImageVersion creationDisabled. - * @member {boolean} creationDisabled - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion - * @instance - */ - ImageVersion.prototype.creationDisabled = false; - - /** - * ImageVersion upgradeDisabled. - * @member {boolean} upgradeDisabled - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion - * @instance - */ - ImageVersion.prototype.upgradeDisabled = false; - - /** - * Creates a new ImageVersion instance using the specified properties. - * @function create - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IImageVersion=} [properties] Properties to set - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} ImageVersion instance - */ - ImageVersion.create = function create(properties) { - return new ImageVersion(properties); - }; - - /** - * Encodes the specified ImageVersion message. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.verify|verify} messages. - * @function encode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IImageVersion} message ImageVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImageVersion.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.imageVersionId != null && Object.hasOwnProperty.call(message, "imageVersionId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.imageVersionId); - if (message.isDefault != null && Object.hasOwnProperty.call(message, "isDefault")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isDefault); - if (message.supportedPythonVersions != null && message.supportedPythonVersions.length) - for (var i = 0; i < message.supportedPythonVersions.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.supportedPythonVersions[i]); - if (message.releaseDate != null && Object.hasOwnProperty.call(message, "releaseDate")) - $root.google.type.Date.encode(message.releaseDate, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.creationDisabled != null && Object.hasOwnProperty.call(message, "creationDisabled")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.creationDisabled); - if (message.upgradeDisabled != null && Object.hasOwnProperty.call(message, "upgradeDisabled")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.upgradeDisabled); - return writer; - }; - - /** - * Encodes the specified ImageVersion message, length delimited. Does not implicitly {@link google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.IImageVersion} message ImageVersion message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ImageVersion.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ImageVersion message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} ImageVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImageVersion.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.imageVersionId = reader.string(); - break; - } - case 2: { - message.isDefault = reader.bool(); - break; - } - case 3: { - if (!(message.supportedPythonVersions && message.supportedPythonVersions.length)) - message.supportedPythonVersions = []; - message.supportedPythonVersions.push(reader.string()); - break; - } - case 4: { - message.releaseDate = $root.google.type.Date.decode(reader, reader.uint32()); - break; - } - case 5: { - message.creationDisabled = reader.bool(); - break; - } - case 6: { - message.upgradeDisabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ImageVersion message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} ImageVersion - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ImageVersion.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ImageVersion message. - * @function verify - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ImageVersion.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.imageVersionId != null && message.hasOwnProperty("imageVersionId")) - if (!$util.isString(message.imageVersionId)) - return "imageVersionId: string expected"; - if (message.isDefault != null && message.hasOwnProperty("isDefault")) - if (typeof message.isDefault !== "boolean") - return "isDefault: boolean expected"; - if (message.supportedPythonVersions != null && message.hasOwnProperty("supportedPythonVersions")) { - if (!Array.isArray(message.supportedPythonVersions)) - return "supportedPythonVersions: array expected"; - for (var i = 0; i < message.supportedPythonVersions.length; ++i) - if (!$util.isString(message.supportedPythonVersions[i])) - return "supportedPythonVersions: string[] expected"; - } - if (message.releaseDate != null && message.hasOwnProperty("releaseDate")) { - var error = $root.google.type.Date.verify(message.releaseDate); - if (error) - return "releaseDate." + error; - } - if (message.creationDisabled != null && message.hasOwnProperty("creationDisabled")) - if (typeof message.creationDisabled !== "boolean") - return "creationDisabled: boolean expected"; - if (message.upgradeDisabled != null && message.hasOwnProperty("upgradeDisabled")) - if (typeof message.upgradeDisabled !== "boolean") - return "upgradeDisabled: boolean expected"; - return null; - }; - - /** - * Creates an ImageVersion message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} ImageVersion - */ - ImageVersion.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion) - return object; - var message = new $root.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion(); - if (object.imageVersionId != null) - message.imageVersionId = String(object.imageVersionId); - if (object.isDefault != null) - message.isDefault = Boolean(object.isDefault); - if (object.supportedPythonVersions) { - if (!Array.isArray(object.supportedPythonVersions)) - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.supportedPythonVersions: array expected"); - message.supportedPythonVersions = []; - for (var i = 0; i < object.supportedPythonVersions.length; ++i) - message.supportedPythonVersions[i] = String(object.supportedPythonVersions[i]); - } - if (object.releaseDate != null) { - if (typeof object.releaseDate !== "object") - throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.ImageVersion.releaseDate: object expected"); - message.releaseDate = $root.google.type.Date.fromObject(object.releaseDate); - } - if (object.creationDisabled != null) - message.creationDisabled = Boolean(object.creationDisabled); - if (object.upgradeDisabled != null) - message.upgradeDisabled = Boolean(object.upgradeDisabled); - return message; - }; - - /** - * Creates a plain object from an ImageVersion message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion - * @static - * @param {google.cloud.orchestration.airflow.service.v1beta1.ImageVersion} message ImageVersion - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ImageVersion.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.supportedPythonVersions = []; - if (options.defaults) { - object.imageVersionId = ""; - object.isDefault = false; - object.releaseDate = null; - object.creationDisabled = false; - object.upgradeDisabled = false; - } - if (message.imageVersionId != null && message.hasOwnProperty("imageVersionId")) - object.imageVersionId = message.imageVersionId; - if (message.isDefault != null && message.hasOwnProperty("isDefault")) - object.isDefault = message.isDefault; - if (message.supportedPythonVersions && message.supportedPythonVersions.length) { - object.supportedPythonVersions = []; - for (var j = 0; j < message.supportedPythonVersions.length; ++j) - object.supportedPythonVersions[j] = message.supportedPythonVersions[j]; - } - if (message.releaseDate != null && message.hasOwnProperty("releaseDate")) - object.releaseDate = $root.google.type.Date.toObject(message.releaseDate, options); - if (message.creationDisabled != null && message.hasOwnProperty("creationDisabled")) - object.creationDisabled = message.creationDisabled; - if (message.upgradeDisabled != null && message.hasOwnProperty("upgradeDisabled")) - object.upgradeDisabled = message.upgradeDisabled; - return object; - }; - - /** - * Converts this ImageVersion to JSON. - * @function toJSON - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion - * @instance - * @returns {Object.} JSON object - */ - ImageVersion.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ImageVersion - * @function getTypeUrl - * @memberof google.cloud.orchestration.airflow.service.v1beta1.ImageVersion - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ImageVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.orchestration.airflow.service.v1beta1.ImageVersion"; - }; - - return ImageVersion; - })(); - - return v1beta1; - })(); - - return service; - })(); - - return airflow; - })(); - - return orchestration; - })(); - - return cloud; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @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) { - 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(); - 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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; - })(); - - /** - * 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) { - 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(); - 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) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.childType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a 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; - })(); - - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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 - */ - - /** - * 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; - - /** - * 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(); - 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) { - 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(); - 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; - } - 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; - } - 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"]); - } - 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; - } - 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); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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.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) { - 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(); - 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.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) { - 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(); - 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.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) { - 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(); - 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) { - 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(); - 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; - })(); - - 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) { - 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(); - 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; - })(); - - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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) { - 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(); - 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; - })(); - - google.type = (function() { - - /** - * Namespace type. - * @memberof google - * @namespace - */ - var type = {}; - - type.Date = (function() { - - /** - * Properties of a Date. - * @memberof google.type - * @interface IDate - * @property {number|null} [year] Date year - * @property {number|null} [month] Date month - * @property {number|null} [day] Date day - */ - - /** - * Constructs a new Date. - * @memberof google.type - * @classdesc Represents a Date. - * @implements IDate - * @constructor - * @param {google.type.IDate=} [properties] Properties to set - */ - function Date(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Date year. - * @member {number} year - * @memberof google.type.Date - * @instance - */ - Date.prototype.year = 0; - - /** - * Date month. - * @member {number} month - * @memberof google.type.Date - * @instance - */ - Date.prototype.month = 0; - - /** - * Date day. - * @member {number} day - * @memberof google.type.Date - * @instance - */ - Date.prototype.day = 0; - - /** - * Creates a new Date instance using the specified properties. - * @function create - * @memberof google.type.Date - * @static - * @param {google.type.IDate=} [properties] Properties to set - * @returns {google.type.Date} Date instance - */ - Date.create = function create(properties) { - return new Date(properties); - }; - - /** - * Encodes the specified Date message. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @function encode - * @memberof google.type.Date - * @static - * @param {google.type.IDate} message Date message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Date.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.year != null && Object.hasOwnProperty.call(message, "year")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.year); - if (message.month != null && Object.hasOwnProperty.call(message, "month")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.month); - if (message.day != null && Object.hasOwnProperty.call(message, "day")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.day); - return writer; - }; - - /** - * Encodes the specified Date message, length delimited. Does not implicitly {@link google.type.Date.verify|verify} messages. - * @function encodeDelimited - * @memberof google.type.Date - * @static - * @param {google.type.IDate} message Date message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Date.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Date message from the specified reader or buffer. - * @function decode - * @memberof google.type.Date - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.type.Date} Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Date.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Date(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.year = reader.int32(); - break; - } - case 2: { - message.month = reader.int32(); - break; - } - case 3: { - message.day = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Date message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.type.Date - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.type.Date} Date - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Date.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Date message. - * @function verify - * @memberof google.type.Date - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Date.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.year != null && message.hasOwnProperty("year")) - if (!$util.isInteger(message.year)) - return "year: integer expected"; - if (message.month != null && message.hasOwnProperty("month")) - if (!$util.isInteger(message.month)) - return "month: integer expected"; - if (message.day != null && message.hasOwnProperty("day")) - if (!$util.isInteger(message.day)) - return "day: integer expected"; - return null; - }; - - /** - * Creates a Date message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.type.Date - * @static - * @param {Object.} object Plain object - * @returns {google.type.Date} Date - */ - Date.fromObject = function fromObject(object) { - if (object instanceof $root.google.type.Date) - return object; - var message = new $root.google.type.Date(); - if (object.year != null) - message.year = object.year | 0; - if (object.month != null) - message.month = object.month | 0; - if (object.day != null) - message.day = object.day | 0; - return message; - }; - - /** - * Creates a plain object from a Date message. Also converts values to other types if specified. - * @function toObject - * @memberof google.type.Date - * @static - * @param {google.type.Date} message Date - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Date.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.year = 0; - object.month = 0; - object.day = 0; - } - if (message.year != null && message.hasOwnProperty("year")) - object.year = message.year; - if (message.month != null && message.hasOwnProperty("month")) - object.month = message.month; - if (message.day != null && message.hasOwnProperty("day")) - object.day = message.day; - return object; - }; - - /** - * Converts this Date to JSON. - * @function toJSON - * @memberof google.type.Date - * @instance - * @returns {Object.} JSON object - */ - Date.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Date - * @function getTypeUrl - * @memberof google.type.Date - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Date.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.type.Date"; - }; - - return Date; - })(); - - return type; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.json deleted file mode 100644 index 0a670d6725a..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/protos/protos.json +++ /dev/null @@ -1,4529 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "orchestration": { - "nested": { - "airflow": { - "nested": { - "service": { - "nested": { - "v1beta1": { - "options": { - "go_package": "cloud.google.com/go/orchestration/airflow/service/apiv1beta1/servicepb;servicepb", - "java_multiple_files": true, - "java_package": "com.google.cloud.orchestration.airflow.service.v1beta1", - "java_outer_classname": "OperationsProto" - }, - "nested": { - "Environments": { - "options": { - "(google.api.default_host)": "composer.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateEnvironment": { - "requestType": "CreateEnvironmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*}/environments", - "(google.api.http).body": "environment", - "(google.api.method_signature)": "parent,environment", - "(google.longrunning.operation_info).response_type": "Environment", - "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*}/environments", - "body": "environment" - } - }, - { - "(google.api.method_signature)": "parent,environment" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Environment", - "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - } - } - ] - }, - "GetEnvironment": { - "requestType": "GetEnvironmentRequest", - "responseType": "Environment", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/environments/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*/environments/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListEnvironments": { - "requestType": "ListEnvironmentsRequest", - "responseType": "ListEnvironmentsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/environments", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*}/environments" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "UpdateEnvironment": { - "requestType": "UpdateEnvironmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1beta1/{name=projects/*/locations/*/environments/*}", - "(google.api.http).body": "environment", - "(google.api.method_signature)": "name,environment,update_mask", - "(google.longrunning.operation_info).response_type": "Environment", - "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "patch": "/v1beta1/{name=projects/*/locations/*/environments/*}", - "body": "environment" - } - }, - { - "(google.api.method_signature)": "name,environment,update_mask" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Environment", - "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - } - } - ] - }, - "DeleteEnvironment": { - "requestType": "DeleteEnvironmentRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/environments/*}", - "(google.api.method_signature)": "name", - "(google.longrunning.operation_info).response_type": "google.protobuf.Empty", - "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/*/environments/*}" - } - }, - { - "(google.api.method_signature)": "name" - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.protobuf.Empty", - "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - } - } - ] - }, - "RestartWebServer": { - "requestType": "RestartWebServerRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{name=projects/*/locations/*/environments/*}:restartWebServer", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "Environment", - "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{name=projects/*/locations/*/environments/*}:restartWebServer", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "Environment", - "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - } - } - ] - }, - "CheckUpgrade": { - "requestType": "CheckUpgradeRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:checkUpgrade", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse", - "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:checkUpgrade", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse", - "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - } - } - ] - }, - "ExecuteAirflowCommand": { - "requestType": "ExecuteAirflowCommandRequest", - "responseType": "ExecuteAirflowCommandResponse", - "options": { - "(google.api.http).post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:executeAirflowCommand", - "body": "*" - } - } - ] - }, - "StopAirflowCommand": { - "requestType": "StopAirflowCommandRequest", - "responseType": "StopAirflowCommandResponse", - "options": { - "(google.api.http).post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:stopAirflowCommand", - "body": "*" - } - } - ] - }, - "PollAirflowCommand": { - "requestType": "PollAirflowCommandRequest", - "responseType": "PollAirflowCommandResponse", - "options": { - "(google.api.http).post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand", - "(google.api.http).body": "*" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:pollAirflowCommand", - "body": "*" - } - } - ] - }, - "ListWorkloads": { - "requestType": "ListWorkloadsRequest", - "responseType": "ListWorkloadsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/environments/*}/workloads", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*/environments/*}/workloads" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "CreateUserWorkloadsSecret": { - "requestType": "CreateUserWorkloadsSecretRequest", - "responseType": "UserWorkloadsSecret", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets", - "(google.api.http).body": "user_workloads_secret", - "(google.api.method_signature)": "parent,user_workloads_secret" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets", - "body": "user_workloads_secret" - } - }, - { - "(google.api.method_signature)": "parent,user_workloads_secret" - } - ] - }, - "GetUserWorkloadsSecret": { - "requestType": "GetUserWorkloadsSecretRequest", - "responseType": "UserWorkloadsSecret", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListUserWorkloadsSecrets": { - "requestType": "ListUserWorkloadsSecretsRequest", - "responseType": "ListUserWorkloadsSecretsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsSecrets" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "UpdateUserWorkloadsSecret": { - "requestType": "UpdateUserWorkloadsSecretRequest", - "responseType": "UserWorkloadsSecret", - "options": { - "(google.api.http).put": "/v1beta1/{user_workloads_secret.name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}", - "(google.api.http).body": "user_workloads_secret", - "(google.api.method_signature)": "user_workloads_secret" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "put": "/v1beta1/{user_workloads_secret.name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}", - "body": "user_workloads_secret" - } - }, - { - "(google.api.method_signature)": "user_workloads_secret" - } - ] - }, - "DeleteUserWorkloadsSecret": { - "requestType": "DeleteUserWorkloadsSecretRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsSecrets/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "CreateUserWorkloadsConfigMap": { - "requestType": "CreateUserWorkloadsConfigMapRequest", - "responseType": "UserWorkloadsConfigMap", - "options": { - "(google.api.http).post": "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps", - "(google.api.http).body": "user_workloads_config_map", - "(google.api.method_signature)": "parent,user_workloads_config_map" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps", - "body": "user_workloads_config_map" - } - }, - { - "(google.api.method_signature)": "parent,user_workloads_config_map" - } - ] - }, - "GetUserWorkloadsConfigMap": { - "requestType": "GetUserWorkloadsConfigMapRequest", - "responseType": "UserWorkloadsConfigMap", - "options": { - "(google.api.http).get": "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListUserWorkloadsConfigMaps": { - "requestType": "ListUserWorkloadsConfigMapsRequest", - "responseType": "ListUserWorkloadsConfigMapsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*/environments/*}/userWorkloadsConfigMaps" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "UpdateUserWorkloadsConfigMap": { - "requestType": "UpdateUserWorkloadsConfigMapRequest", - "responseType": "UserWorkloadsConfigMap", - "options": { - "(google.api.http).put": "/v1beta1/{user_workloads_config_map.name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}", - "(google.api.http).body": "user_workloads_config_map", - "(google.api.method_signature)": "user_workloads_config_map" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "put": "/v1beta1/{user_workloads_config_map.name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}", - "body": "user_workloads_config_map" - } - }, - { - "(google.api.method_signature)": "user_workloads_config_map" - } - ] - }, - "DeleteUserWorkloadsConfigMap": { - "requestType": "DeleteUserWorkloadsConfigMapRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v1beta1/{name=projects/*/locations/*/environments/*/userWorkloadsConfigMaps/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "SaveSnapshot": { - "requestType": "SaveSnapshotRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:saveSnapshot", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse", - "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:saveSnapshot", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse", - "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - } - } - ] - }, - "LoadSnapshot": { - "requestType": "LoadSnapshotRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:loadSnapshot", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse", - "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:loadSnapshot", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse", - "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - } - } - ] - }, - "DatabaseFailover": { - "requestType": "DatabaseFailoverRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:databaseFailover", - "(google.api.http).body": "*", - "(google.longrunning.operation_info).response_type": "google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse", - "(google.longrunning.operation_info).metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v1beta1/{environment=projects/*/locations/*/environments/*}:databaseFailover", - "body": "*" - } - }, - { - "(google.longrunning.operation_info)": { - "response_type": "google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse", - "metadata_type": "google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata" - } - } - ] - }, - "FetchDatabaseProperties": { - "requestType": "FetchDatabasePropertiesRequest", - "responseType": "FetchDatabasePropertiesResponse", - "options": { - "(google.api.http).get": "/v1beta1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{environment=projects/*/locations/*/environments/*}:fetchDatabaseProperties" - } - } - ] - } - } - }, - "CreateEnvironmentRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "environment": { - "type": "Environment", - "id": 2 - } - } - }, - "GetEnvironmentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "ListEnvironmentsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListEnvironmentsResponse": { - "fields": { - "environments": { - "rule": "repeated", - "type": "Environment", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "DeleteEnvironmentRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "UpdateEnvironmentRequest": { - "fields": { - "name": { - "type": "string", - "id": 2 - }, - "environment": { - "type": "Environment", - "id": 1 - }, - "updateMask": { - "type": "google.protobuf.FieldMask", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "RestartWebServerRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "ExecuteAirflowCommandRequest": { - "fields": { - "environment": { - "type": "string", - "id": 1 - }, - "command": { - "type": "string", - "id": 2 - }, - "subcommand": { - "type": "string", - "id": 3 - }, - "parameters": { - "rule": "repeated", - "type": "string", - "id": 4 - } - } - }, - "ExecuteAirflowCommandResponse": { - "fields": { - "executionId": { - "type": "string", - "id": 1 - }, - "pod": { - "type": "string", - "id": 2 - }, - "podNamespace": { - "type": "string", - "id": 3 - }, - "error": { - "type": "string", - "id": 4 - } - } - }, - "StopAirflowCommandRequest": { - "fields": { - "environment": { - "type": "string", - "id": 1 - }, - "executionId": { - "type": "string", - "id": 2 - }, - "pod": { - "type": "string", - "id": 3 - }, - "podNamespace": { - "type": "string", - "id": 4 - }, - "force": { - "type": "bool", - "id": 5 - } - } - }, - "StopAirflowCommandResponse": { - "fields": { - "isDone": { - "type": "bool", - "id": 1 - }, - "output": { - "rule": "repeated", - "type": "string", - "id": 2 - } - } - }, - "PollAirflowCommandRequest": { - "fields": { - "environment": { - "type": "string", - "id": 1 - }, - "executionId": { - "type": "string", - "id": 2 - }, - "pod": { - "type": "string", - "id": 3 - }, - "podNamespace": { - "type": "string", - "id": 4 - }, - "nextLineNumber": { - "type": "int32", - "id": 5 - } - } - }, - "PollAirflowCommandResponse": { - "fields": { - "output": { - "rule": "repeated", - "type": "Line", - "id": 1 - }, - "outputEnd": { - "type": "bool", - "id": 2 - }, - "exitInfo": { - "type": "ExitInfo", - "id": 3 - } - }, - "nested": { - "Line": { - "fields": { - "lineNumber": { - "type": "int32", - "id": 1 - }, - "content": { - "type": "string", - "id": 2 - } - } - }, - "ExitInfo": { - "fields": { - "exitCode": { - "type": "int32", - "id": 1 - }, - "error": { - "type": "string", - "id": 2 - } - } - } - } - }, - "CreateUserWorkloadsSecretRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/Environment" - } - }, - "userWorkloadsSecret": { - "type": "UserWorkloadsSecret", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GetUserWorkloadsSecretRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/UserWorkloadsSecret" - } - } - } - }, - "ListUserWorkloadsSecretsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/Environment" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateUserWorkloadsSecretRequest": { - "fields": { - "userWorkloadsSecret": { - "type": "UserWorkloadsSecret", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteUserWorkloadsSecretRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/UserWorkloadsSecret" - } - } - } - }, - "CreateUserWorkloadsConfigMapRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/Environment" - } - }, - "userWorkloadsConfigMap": { - "type": "UserWorkloadsConfigMap", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GetUserWorkloadsConfigMapRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/UserWorkloadsConfigMap" - } - } - } - }, - "ListUserWorkloadsConfigMapsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/Environment" - } - }, - "pageSize": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "UpdateUserWorkloadsConfigMapRequest": { - "fields": { - "userWorkloadsConfigMap": { - "type": "UserWorkloadsConfigMap", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DeleteUserWorkloadsConfigMapRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/UserWorkloadsConfigMap" - } - } - } - }, - "UserWorkloadsSecret": { - "options": { - "(google.api.resource).type": "composer.googleapis.com/UserWorkloadsSecret", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}", - "(google.api.resource).plural": "userWorkloadsSecrets", - "(google.api.resource).singular": "userWorkloadsSecret" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "data": { - "keyType": "string", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListUserWorkloadsSecretsResponse": { - "fields": { - "userWorkloadsSecrets": { - "rule": "repeated", - "type": "UserWorkloadsSecret", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "UserWorkloadsConfigMap": { - "options": { - "(google.api.resource).type": "composer.googleapis.com/UserWorkloadsConfigMap", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}", - "(google.api.resource).plural": "userWorkloadsConfigMaps", - "(google.api.resource).singular": "userWorkloadsConfigMap" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "data": { - "keyType": "string", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListUserWorkloadsConfigMapsResponse": { - "fields": { - "userWorkloadsConfigMaps": { - "rule": "repeated", - "type": "UserWorkloadsConfigMap", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "ListWorkloadsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/Environment" - } - }, - "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" - } - } - } - }, - "ListWorkloadsResponse": { - "fields": { - "workloads": { - "rule": "repeated", - "type": "ComposerWorkload", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - }, - "nested": { - "ComposerWorkload": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "type": { - "type": "ComposerWorkloadType", - "id": 2 - }, - "status": { - "type": "ComposerWorkloadStatus", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ComposerWorkloadType": { - "values": { - "COMPOSER_WORKLOAD_TYPE_UNSPECIFIED": 0, - "CELERY_WORKER": 1, - "KUBERNETES_WORKER": 2, - "KUBERNETES_OPERATOR_POD": 3, - "SCHEDULER": 4, - "DAG_PROCESSOR": 5, - "TRIGGERER": 6, - "WEB_SERVER": 7, - "REDIS": 8 - } - }, - "ComposerWorkloadStatus": { - "fields": { - "state": { - "type": "ComposerWorkloadState", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "statusMessage": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "detailedStatusMessage": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "ComposerWorkloadState": { - "values": { - "COMPOSER_WORKLOAD_STATE_UNSPECIFIED": 0, - "PENDING": 1, - "OK": 2, - "WARNING": 3, - "ERROR": 4, - "SUCCEEDED": 5, - "FAILED": 6 - } - } - } - }, - "SaveSnapshotRequest": { - "fields": { - "environment": { - "type": "string", - "id": 1 - }, - "snapshotLocation": { - "type": "string", - "id": 2 - } - } - }, - "SaveSnapshotResponse": { - "fields": { - "snapshotPath": { - "type": "string", - "id": 1 - } - } - }, - "LoadSnapshotRequest": { - "fields": { - "environment": { - "type": "string", - "id": 1 - }, - "snapshotPath": { - "type": "string", - "id": 2 - }, - "skipPypiPackagesInstallation": { - "type": "bool", - "id": 3 - }, - "skipEnvironmentVariablesSetting": { - "type": "bool", - "id": 4 - }, - "skipAirflowOverridesSetting": { - "type": "bool", - "id": 5 - }, - "skipGcsDataCopying": { - "type": "bool", - "id": 6 - } - } - }, - "LoadSnapshotResponse": { - "fields": {} - }, - "DatabaseFailoverRequest": { - "fields": { - "environment": { - "type": "string", - "id": 1 - } - } - }, - "DatabaseFailoverResponse": { - "fields": {} - }, - "FetchDatabasePropertiesRequest": { - "fields": { - "environment": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "composer.googleapis.com/Environment" - } - } - } - }, - "FetchDatabasePropertiesResponse": { - "fields": { - "primaryGceZone": { - "type": "string", - "id": 1 - }, - "secondaryGceZone": { - "type": "string", - "id": 2 - }, - "isFailoverReplicaAvailable": { - "type": "bool", - "id": 3 - } - } - }, - "EnvironmentConfig": { - "fields": { - "gkeCluster": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "dagGcsPrefix": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "nodeCount": { - "type": "int32", - "id": 3 - }, - "softwareConfig": { - "type": "SoftwareConfig", - "id": 4 - }, - "nodeConfig": { - "type": "NodeConfig", - "id": 5 - }, - "privateEnvironmentConfig": { - "type": "PrivateEnvironmentConfig", - "id": 7 - }, - "webServerNetworkAccessControl": { - "type": "WebServerNetworkAccessControl", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "databaseConfig": { - "type": "DatabaseConfig", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "webServerConfig": { - "type": "WebServerConfig", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "airflowUri": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "airflowByoidUri": { - "type": "string", - "id": 21, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "encryptionConfig": { - "type": "EncryptionConfig", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "maintenanceWindow": { - "type": "MaintenanceWindow", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "workloadsConfig": { - "type": "WorkloadsConfig", - "id": 15, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "environmentSize": { - "type": "EnvironmentSize", - "id": 16, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "masterAuthorizedNetworksConfig": { - "type": "MasterAuthorizedNetworksConfig", - "id": 17, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "recoveryConfig": { - "type": "RecoveryConfig", - "id": 18, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dataRetentionConfig": { - "type": "DataRetentionConfig", - "id": 19, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "resilienceMode": { - "type": "ResilienceMode", - "id": 20, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "EnvironmentSize": { - "values": { - "ENVIRONMENT_SIZE_UNSPECIFIED": 0, - "ENVIRONMENT_SIZE_SMALL": 1, - "ENVIRONMENT_SIZE_MEDIUM": 2, - "ENVIRONMENT_SIZE_LARGE": 3 - } - }, - "ResilienceMode": { - "values": { - "RESILIENCE_MODE_UNSPECIFIED": 0, - "HIGH_RESILIENCE": 1 - } - } - } - }, - "WebServerNetworkAccessControl": { - "fields": { - "allowedIpRanges": { - "rule": "repeated", - "type": "AllowedIpRange", - "id": 1 - } - }, - "nested": { - "AllowedIpRange": { - "fields": { - "value": { - "type": "string", - "id": 1 - }, - "description": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "SoftwareConfig": { - "fields": { - "imageVersion": { - "type": "string", - "id": 1 - }, - "airflowConfigOverrides": { - "keyType": "string", - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pypiPackages": { - "keyType": "string", - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "envVariables": { - "keyType": "string", - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pythonVersion": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "schedulerCount": { - "type": "int32", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cloudDataLineageIntegration": { - "type": "CloudDataLineageIntegration", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "webServerPluginsMode": { - "type": "WebServerPluginsMode", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "WebServerPluginsMode": { - "values": { - "WEB_SERVER_PLUGINS_MODE_UNSPECIFIED": 0, - "PLUGINS_DISABLED": 1, - "PLUGINS_ENABLED": 2 - } - } - } - }, - "IPAllocationPolicy": { - "fields": { - "useIpAliases": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "clusterSecondaryRangeName": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "servicesSecondaryRangeName": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "clusterIpv4CidrBlock": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "servicesIpv4CidrBlock": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "NodeConfig": { - "fields": { - "location": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "machineType": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "network": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "subnetwork": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "diskSizeGb": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "oauthScopes": { - "rule": "repeated", - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "serviceAccount": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "tags": { - "rule": "repeated", - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "ipAllocationPolicy": { - "type": "IPAllocationPolicy", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "maxPodsPerNode": { - "type": "int32", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "enableIpMasqAgent": { - "type": "bool", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "composerNetworkAttachment": { - "type": "string", - "id": 12, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "composerInternalIpv4CidrBlock": { - "type": "string", - "id": 13, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "PrivateClusterConfig": { - "fields": { - "enablePrivateEndpoint": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "masterIpv4CidrBlock": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "masterIpv4ReservedRange": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - } - }, - "NetworkingConfig": { - "fields": { - "connectionType": { - "type": "ConnectionType", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "ConnectionType": { - "values": { - "CONNECTION_TYPE_UNSPECIFIED": 0, - "VPC_PEERING": 1, - "PRIVATE_SERVICE_CONNECT": 2 - } - } - } - }, - "PrivateEnvironmentConfig": { - "fields": { - "enablePrivateEnvironment": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "enablePrivateBuildsOnly": { - "type": "bool", - "id": 11, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "privateClusterConfig": { - "type": "PrivateClusterConfig", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "webServerIpv4CidrBlock": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cloudSqlIpv4CidrBlock": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "webServerIpv4ReservedRange": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "cloudComposerNetworkIpv4CidrBlock": { - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cloudComposerNetworkIpv4ReservedRange": { - "type": "string", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "enablePrivatelyUsedPublicIps": { - "type": "bool", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cloudComposerConnectionSubnetwork": { - "type": "string", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "networkingConfig": { - "type": "NetworkingConfig", - "id": 10, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DatabaseConfig": { - "fields": { - "machineType": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "zone": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "WebServerConfig": { - "fields": { - "machineType": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "EncryptionConfig": { - "fields": { - "kmsKeyName": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "MaintenanceWindow": { - "fields": { - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "recurrence": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "WorkloadsConfig": { - "fields": { - "scheduler": { - "type": "SchedulerResource", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "webServer": { - "type": "WebServerResource", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "worker": { - "type": "WorkerResource", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "triggerer": { - "type": "TriggererResource", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dagProcessor": { - "type": "DagProcessorResource", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "SchedulerResource": { - "fields": { - "cpu": { - "type": "float", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "memoryGb": { - "type": "float", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "storageGb": { - "type": "float", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "count": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "WebServerResource": { - "fields": { - "cpu": { - "type": "float", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "memoryGb": { - "type": "float", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "storageGb": { - "type": "float", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "WorkerResource": { - "fields": { - "cpu": { - "type": "float", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "memoryGb": { - "type": "float", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "storageGb": { - "type": "float", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "minCount": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "maxCount": { - "type": "int32", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "TriggererResource": { - "fields": { - "count": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "cpu": { - "type": "float", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "memoryGb": { - "type": "float", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "DagProcessorResource": { - "fields": { - "cpu": { - "type": "float", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "memoryGb": { - "type": "float", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "storageGb": { - "type": "float", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "count": { - "type": "int32", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - } - } - }, - "DataRetentionConfig": { - "fields": { - "airflowDatabaseRetentionDays": { - "type": "int32", - "id": 1, - "options": { - "deprecated": true, - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "taskLogsRetentionConfig": { - "type": "TaskLogsRetentionConfig", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "airflowMetadataRetentionConfig": { - "type": "AirflowMetadataRetentionPolicyConfig", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "TaskLogsRetentionConfig": { - "fields": { - "storageMode": { - "type": "TaskLogsStorageMode", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "TaskLogsStorageMode": { - "values": { - "TASK_LOGS_STORAGE_MODE_UNSPECIFIED": 0, - "CLOUD_LOGGING_AND_CLOUD_STORAGE": 1, - "CLOUD_LOGGING_ONLY": 2 - } - } - } - }, - "AirflowMetadataRetentionPolicyConfig": { - "fields": { - "retentionMode": { - "type": "RetentionMode", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "retentionDays": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "RetentionMode": { - "values": { - "RETENTION_MODE_UNSPECIFIED": 0, - "RETENTION_MODE_ENABLED": 1, - "RETENTION_MODE_DISABLED": 2 - } - } - } - }, - "StorageConfig": { - "fields": { - "bucket": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "RecoveryConfig": { - "fields": { - "scheduledSnapshotsConfig": { - "type": "ScheduledSnapshotsConfig", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ScheduledSnapshotsConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "snapshotLocation": { - "type": "string", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "snapshotCreationSchedule": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "timeZone": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "MasterAuthorizedNetworksConfig": { - "fields": { - "enabled": { - "type": "bool", - "id": 1 - }, - "cidrBlocks": { - "rule": "repeated", - "type": "CidrBlock", - "id": 2 - } - }, - "nested": { - "CidrBlock": { - "fields": { - "displayName": { - "type": "string", - "id": 1 - }, - "cidrBlock": { - "type": "string", - "id": 2 - } - } - } - } - }, - "CloudDataLineageIntegration": { - "fields": { - "enabled": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "Environment": { - "options": { - "(google.api.resource).type": "composer.googleapis.com/Environment", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/environments/{environment}" - }, - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "config": { - "type": "EnvironmentConfig", - "id": 2 - }, - "uuid": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "state": { - "type": "State", - "id": 4 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "updateTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 7, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "satisfiesPzs": { - "type": "bool", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "satisfiesPzi": { - "type": "bool", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "storageConfig": { - "type": "StorageConfig", - "id": 9, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "RUNNING": 2, - "UPDATING": 3, - "DELETING": 4, - "ERROR": 5 - } - } - } - }, - "CheckUpgradeRequest": { - "fields": { - "environment": { - "type": "string", - "id": 1 - }, - "imageVersion": { - "type": "string", - "id": 2 - } - } - }, - "CheckUpgradeResponse": { - "fields": { - "buildLogUri": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "containsPypiModulesConflict": { - "type": "ConflictResult", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "pypiConflictBuildLogExtract": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "imageVersion": { - "type": "string", - "id": 5 - }, - "pypiDependencies": { - "keyType": "string", - "type": "string", - "id": 6 - } - }, - "nested": { - "ConflictResult": { - "values": { - "CONFLICT_RESULT_UNSPECIFIED": 0, - "CONFLICT": 1, - "NO_CONFLICT": 2 - } - } - } - }, - "OperationMetadata": { - "fields": { - "state": { - "type": "State", - "id": 1 - }, - "operationType": { - "type": "Type", - "id": 2 - }, - "resource": { - "type": "string", - "id": 3 - }, - "resourceUuid": { - "type": "string", - "id": 4 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "PENDING": 1, - "RUNNING": 2, - "SUCCESSFUL": 3, - "FAILED": 4 - } - }, - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "CREATE": 1, - "DELETE": 2, - "UPDATE": 3, - "CHECK": 4, - "SAVE_SNAPSHOT": 5, - "LOAD_SNAPSHOT": 6, - "DATABASE_FAILOVER": 7 - } - } - } - }, - "ImageVersions": { - "options": { - "(google.api.default_host)": "composer.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "ListImageVersions": { - "requestType": "ListImageVersionsRequest", - "responseType": "ListImageVersionsResponse", - "options": { - "(google.api.http).get": "/v1beta1/{parent=projects/*/locations/*}/imageVersions", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v1beta1/{parent=projects/*/locations/*}/imageVersions" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - } - } - }, - "ListImageVersionsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "includePastReleases": { - "type": "bool", - "id": 4 - } - } - }, - "ListImageVersionsResponse": { - "fields": { - "imageVersions": { - "rule": "repeated", - "type": "ImageVersion", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "ImageVersion": { - "fields": { - "imageVersionId": { - "type": "string", - "id": 1 - }, - "isDefault": { - "type": "bool", - "id": 2 - }, - "supportedPythonVersions": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "releaseDate": { - "type": "google.type.Date", - "id": 4 - }, - "creationDisabled": { - "type": "bool", - "id": 5 - }, - "upgradeDisabled": { - "type": "bool", - "id": 6 - } - } - } - } - } - } - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "ResourceProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "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 - } - }, - "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 - } - } - } - } - }, - "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": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "Edition": { - "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": { - "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, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "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": { - "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": { - "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": { - "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": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "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": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "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": { - "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": { - "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": { - "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, - "options": { - "packed": false - } - }, - "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": { - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "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": { - "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": { - "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": { - "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": { - "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": { - "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": { - "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": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2 - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1 - }, - "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 - } - } - } - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - } - } - }, - "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 - } - } - } - } - }, - "type": { - "options": { - "cc_enable_arenas": true, - "go_package": "google.golang.org/genproto/googleapis/type/date;date", - "java_multiple_files": true, - "java_outer_classname": "DateProto", - "java_package": "com.google.type", - "objc_class_prefix": "GTP" - }, - "nested": { - "Date": { - "fields": { - "year": { - "type": "int32", - "id": 1 - }, - "month": { - "type": "int32", - "id": 2 - }, - "day": { - "type": "int32", - "id": 3 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.check_upgrade.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.check_upgrade.js deleted file mode 100644 index afb1cce4f87..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.check_upgrade.js +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1beta1_generated_Environments_CheckUpgrade_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. - */ - /** - * The resource name of the environment to check upgrade for, in the - * form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const environment = 'abc123' - /** - * The version of the software running in the environment. - * This encapsulates both the version of Cloud Composer functionality and the - * version of Apache Airflow. It must match the regular expression - * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. - * When used as input, the server also checks if the provided version is - * supported and denies the request for an unsupported version. - * The Cloud Composer portion of the image version is a full - * semantic version (https://semver.org), or an alias in the form of major - * version number or `latest`. When an alias is provided, the server replaces - * it with the current Cloud Composer version that satisfies the alias. - * The Apache Airflow portion of the image version is a full semantic version - * that points to one of the supported Apache Airflow versions, or an alias in - * the form of only major or major.minor versions specified. When an alias is - * provided, the server replaces it with the latest Apache Airflow version - * that satisfies the alias and is supported in the given Cloud Composer - * version. - * In all cases, the resolved image version is stored in the same field. - * See also version - * list (/composer/docs/concepts/versioning/composer-versions) and versioning - * overview (/composer/docs/concepts/versioning/composer-versioning-overview). - */ - // const imageVersion = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callCheckUpgrade() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await serviceClient.checkUpgrade(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCheckUpgrade(); - // [END composer_v1beta1_generated_Environments_CheckUpgrade_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_environment.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_environment.js deleted file mode 100644 index dc854c42371..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_environment.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1beta1_generated_Environments_CreateEnvironment_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. - */ - /** - * The parent must be of the form - * "projects/{projectId}/locations/{locationId}". - */ - // const parent = 'abc123' - /** - * The environment to create. - */ - // const environment = {} - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callCreateEnvironment() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await serviceClient.createEnvironment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callCreateEnvironment(); - // [END composer_v1beta1_generated_Environments_CreateEnvironment_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_user_workloads_config_map.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_user_workloads_config_map.js deleted file mode 100644 index b2475252bcc..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_user_workloads_config_map.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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, userWorkloadsConfigMap) { - // [START composer_v1beta1_generated_Environments_CreateUserWorkloadsConfigMap_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 environment name to create a ConfigMap for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const parent = 'abc123' - /** - * Required. User workloads ConfigMap to create. - */ - // const userWorkloadsConfigMap = {} - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callCreateUserWorkloadsConfigMap() { - // Construct request - const request = { - parent, - userWorkloadsConfigMap, - }; - - // Run request - const response = await serviceClient.createUserWorkloadsConfigMap(request); - console.log(response); - } - - callCreateUserWorkloadsConfigMap(); - // [END composer_v1beta1_generated_Environments_CreateUserWorkloadsConfigMap_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_user_workloads_secret.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_user_workloads_secret.js deleted file mode 100644 index 6ad9272ff55..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.create_user_workloads_secret.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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, userWorkloadsSecret) { - // [START composer_v1beta1_generated_Environments_CreateUserWorkloadsSecret_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 environment name to create a Secret for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const parent = 'abc123' - /** - * Required. User workloads Secret to create. - */ - // const userWorkloadsSecret = {} - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callCreateUserWorkloadsSecret() { - // Construct request - const request = { - parent, - userWorkloadsSecret, - }; - - // Run request - const response = await serviceClient.createUserWorkloadsSecret(request); - console.log(response); - } - - callCreateUserWorkloadsSecret(); - // [END composer_v1beta1_generated_Environments_CreateUserWorkloadsSecret_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.database_failover.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.database_failover.js deleted file mode 100644 index 3ee61e21343..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.database_failover.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1beta1_generated_Environments_DatabaseFailover_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. - */ - /** - * Target environment: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const environment = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callDatabaseFailover() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await serviceClient.databaseFailover(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDatabaseFailover(); - // [END composer_v1beta1_generated_Environments_DatabaseFailover_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_environment.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_environment.js deleted file mode 100644 index a94574ab5f5..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_environment.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1beta1_generated_Environments_DeleteEnvironment_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. - */ - /** - * The environment to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const name = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callDeleteEnvironment() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await serviceClient.deleteEnvironment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callDeleteEnvironment(); - // [END composer_v1beta1_generated_Environments_DeleteEnvironment_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_user_workloads_config_map.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_user_workloads_config_map.js deleted file mode 100644 index 947aeb36d32..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_user_workloads_config_map.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 composer_v1beta1_generated_Environments_DeleteUserWorkloadsConfigMap_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 ConfigMap to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - */ - // const name = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callDeleteUserWorkloadsConfigMap() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await serviceClient.deleteUserWorkloadsConfigMap(request); - console.log(response); - } - - callDeleteUserWorkloadsConfigMap(); - // [END composer_v1beta1_generated_Environments_DeleteUserWorkloadsConfigMap_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_user_workloads_secret.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_user_workloads_secret.js deleted file mode 100644 index fa74d4dc74d..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.delete_user_workloads_secret.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 composer_v1beta1_generated_Environments_DeleteUserWorkloadsSecret_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 Secret to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - */ - // const name = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callDeleteUserWorkloadsSecret() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await serviceClient.deleteUserWorkloadsSecret(request); - console.log(response); - } - - callDeleteUserWorkloadsSecret(); - // [END composer_v1beta1_generated_Environments_DeleteUserWorkloadsSecret_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.execute_airflow_command.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.execute_airflow_command.js deleted file mode 100644 index ee4434e045c..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.execute_airflow_command.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1beta1_generated_Environments_ExecuteAirflowCommand_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. - */ - /** - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - */ - // const environment = 'abc123' - /** - * Airflow command. - */ - // const command = 'abc123' - /** - * Airflow subcommand. - */ - // const subcommand = 'abc123' - /** - * Parameters for the Airflow command/subcommand as an array of arguments. - * It may contain positional arguments like `["my-dag-id"]`, key-value - * parameters like `["--foo=bar"]` or `["--foo","bar"]`, - * or other flags like `["-f"]`. - */ - // const parameters = ['abc','def'] - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callExecuteAirflowCommand() { - // Construct request - const request = { - }; - - // Run request - const response = await serviceClient.executeAirflowCommand(request); - console.log(response); - } - - callExecuteAirflowCommand(); - // [END composer_v1beta1_generated_Environments_ExecuteAirflowCommand_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.fetch_database_properties.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.fetch_database_properties.js deleted file mode 100644 index 08245bfb343..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.fetch_database_properties.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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(environment) { - // [START composer_v1beta1_generated_Environments_FetchDatabaseProperties_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 environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const environment = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callFetchDatabaseProperties() { - // Construct request - const request = { - environment, - }; - - // Run request - const response = await serviceClient.fetchDatabaseProperties(request); - console.log(response); - } - - callFetchDatabaseProperties(); - // [END composer_v1beta1_generated_Environments_FetchDatabaseProperties_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_environment.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_environment.js deleted file mode 100644 index cfc665a1c66..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_environment.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1beta1_generated_Environments_GetEnvironment_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. - */ - /** - * The resource name of the environment to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const name = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callGetEnvironment() { - // Construct request - const request = { - }; - - // Run request - const response = await serviceClient.getEnvironment(request); - console.log(response); - } - - callGetEnvironment(); - // [END composer_v1beta1_generated_Environments_GetEnvironment_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_user_workloads_config_map.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_user_workloads_config_map.js deleted file mode 100644 index 45fe12cea1a..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_user_workloads_config_map.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 composer_v1beta1_generated_Environments_GetUserWorkloadsConfigMap_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 ConfigMap to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - */ - // const name = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callGetUserWorkloadsConfigMap() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await serviceClient.getUserWorkloadsConfigMap(request); - console.log(response); - } - - callGetUserWorkloadsConfigMap(); - // [END composer_v1beta1_generated_Environments_GetUserWorkloadsConfigMap_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_user_workloads_secret.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_user_workloads_secret.js deleted file mode 100644 index 8fb5b46d6db..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.get_user_workloads_secret.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 composer_v1beta1_generated_Environments_GetUserWorkloadsSecret_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 Secret to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - */ - // const name = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callGetUserWorkloadsSecret() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await serviceClient.getUserWorkloadsSecret(request); - console.log(response); - } - - callGetUserWorkloadsSecret(); - // [END composer_v1beta1_generated_Environments_GetUserWorkloadsSecret_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_environments.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_environments.js deleted file mode 100644 index 86654938f4d..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_environments.js +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1beta1_generated_Environments_ListEnvironments_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. - */ - /** - * List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - */ - // const parent = 'abc123' - /** - * The maximum number of environments to return. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous List request, if any. - */ - // const pageToken = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callListEnvironments() { - // Construct request - const request = { - }; - - // Run request - const iterable = serviceClient.listEnvironmentsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListEnvironments(); - // [END composer_v1beta1_generated_Environments_ListEnvironments_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_user_workloads_config_maps.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_user_workloads_config_maps.js deleted file mode 100644 index 82d1c180107..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_user_workloads_config_maps.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 composer_v1beta1_generated_Environments_ListUserWorkloadsConfigMaps_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. List ConfigMaps in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of ConfigMaps to return. - */ - // const pageSize = 1234 - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - */ - // const pageToken = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callListUserWorkloadsConfigMaps() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = serviceClient.listUserWorkloadsConfigMapsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListUserWorkloadsConfigMaps(); - // [END composer_v1beta1_generated_Environments_ListUserWorkloadsConfigMaps_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_user_workloads_secrets.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_user_workloads_secrets.js deleted file mode 100644 index f29069976e5..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_user_workloads_secrets.js +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 composer_v1beta1_generated_Environments_ListUserWorkloadsSecrets_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. List Secrets in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of Secrets to return. - */ - // const pageSize = 1234 - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - */ - // const pageToken = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callListUserWorkloadsSecrets() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = serviceClient.listUserWorkloadsSecretsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListUserWorkloadsSecrets(); - // [END composer_v1beta1_generated_Environments_ListUserWorkloadsSecrets_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_workloads.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_workloads.js deleted file mode 100644 index d6c5f0f91f9..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.list_workloads.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 composer_v1beta1_generated_Environments_ListWorkloads_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 environment name to get workloads for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const parent = 'abc123' - /** - * Optional. The maximum number of environments to return. - */ - // const pageSize = 1234 - /** - * Optional. The next_page_token value returned from a previous List request, - * if any. - */ - // const pageToken = 'abc123' - /** - * Optional. The list filter. - * Currently only supports equality on the type field. The value of a field - * specified in the filter expression must be one ComposerWorkloadType enum - * option. It's possible to get multiple types using "OR" operator, e.g.: - * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are - * returned. - */ - // const filter = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callListWorkloads() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = serviceClient.listWorkloadsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListWorkloads(); - // [END composer_v1beta1_generated_Environments_ListWorkloads_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.load_snapshot.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.load_snapshot.js deleted file mode 100644 index d1dab64d11b..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.load_snapshot.js +++ /dev/null @@ -1,87 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1beta1_generated_Environments_LoadSnapshot_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. - */ - /** - * The resource name of the target environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const environment = 'abc123' - /** - * A Cloud Storage path to a snapshot to load, e.g.: - * "gs://my-bucket/snapshots/project_location_environment_timestamp". - */ - // const snapshotPath = 'abc123' - /** - * Whether or not to skip installing Pypi packages when loading the - * environment's state. - */ - // const skipPypiPackagesInstallation = true - /** - * Whether or not to skip setting environment variables when loading the - * environment's state. - */ - // const skipEnvironmentVariablesSetting = true - /** - * Whether or not to skip setting Airflow overrides when loading the - * environment's state. - */ - // const skipAirflowOverridesSetting = true - /** - * Whether or not to skip copying Cloud Storage data when loading the - * environment's state. - */ - // const skipGcsDataCopying = true - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callLoadSnapshot() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await serviceClient.loadSnapshot(request); - const [response] = await operation.promise(); - console.log(response); - } - - callLoadSnapshot(); - // [END composer_v1beta1_generated_Environments_LoadSnapshot_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.poll_airflow_command.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.poll_airflow_command.js deleted file mode 100644 index d6cc0cfb3d7..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.poll_airflow_command.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1beta1_generated_Environments_PollAirflowCommand_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. - */ - /** - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const environment = 'abc123' - /** - * The unique ID of the command execution. - */ - // const executionId = 'abc123' - /** - * The name of the pod where the command is executed. - */ - // const pod = 'abc123' - /** - * The namespace of the pod where the command is executed. - */ - // const podNamespace = 'abc123' - /** - * Line number from which new logs should be fetched. - */ - // const nextLineNumber = 1234 - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callPollAirflowCommand() { - // Construct request - const request = { - }; - - // Run request - const response = await serviceClient.pollAirflowCommand(request); - console.log(response); - } - - callPollAirflowCommand(); - // [END composer_v1beta1_generated_Environments_PollAirflowCommand_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.restart_web_server.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.restart_web_server.js deleted file mode 100644 index e1b2a0b6262..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.restart_web_server.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1beta1_generated_Environments_RestartWebServer_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. - */ - /** - * The resource name of the environment to restart the web server for, in the - * form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const name = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callRestartWebServer() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await serviceClient.restartWebServer(request); - const [response] = await operation.promise(); - console.log(response); - } - - callRestartWebServer(); - // [END composer_v1beta1_generated_Environments_RestartWebServer_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.save_snapshot.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.save_snapshot.js deleted file mode 100644 index a02b7fcda21..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.save_snapshot.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1beta1_generated_Environments_SaveSnapshot_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. - */ - /** - * The resource name of the source environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const environment = 'abc123' - /** - * Location in a Cloud Storage where the snapshot is going to be stored, e.g.: - * "gs://my-bucket/snapshots". - */ - // const snapshotLocation = 'abc123' - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callSaveSnapshot() { - // Construct request - const request = { - }; - - // Run request - const [operation] = await serviceClient.saveSnapshot(request); - const [response] = await operation.promise(); - console.log(response); - } - - callSaveSnapshot(); - // [END composer_v1beta1_generated_Environments_SaveSnapshot_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.stop_airflow_command.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.stop_airflow_command.js deleted file mode 100644 index 2829a3e2950..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.stop_airflow_command.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1beta1_generated_Environments_StopAirflowCommand_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. - */ - /** - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - */ - // const environment = 'abc123' - /** - * The unique ID of the command execution. - */ - // const executionId = 'abc123' - /** - * The name of the pod where the command is executed. - */ - // const pod = 'abc123' - /** - * The namespace of the pod where the command is executed. - */ - // const podNamespace = 'abc123' - /** - * If true, the execution is terminated forcefully (SIGKILL). If false, the - * execution is stopped gracefully, giving it time for cleanup. - */ - // const force = true - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callStopAirflowCommand() { - // Construct request - const request = { - }; - - // Run request - const response = await serviceClient.stopAirflowCommand(request); - console.log(response); - } - - callStopAirflowCommand(); - // [END composer_v1beta1_generated_Environments_StopAirflowCommand_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_environment.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_environment.js deleted file mode 100644 index cdac55e6be4..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_environment.js +++ /dev/null @@ -1,206 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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) { - // [START composer_v1beta1_generated_Environments_UpdateEnvironment_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. - */ - /** - * The relative resource name of the environment to update, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - */ - // const name = 'abc123' - /** - * A patch environment. Fields specified by the `updateMask` will be copied - * from the patch environment into the environment under update. - */ - // const environment = {} - /** - * Required. A comma-separated list of paths, relative to `Environment`, of - * fields to update. - * For example, to set the version of scikit-learn to install in the - * environment to 0.19.0 and to remove an existing installation of - * argparse, the `updateMask` parameter would include the following two - * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and - * "config.softwareConfig.pypiPackages.argparse". The included patch - * environment would specify the scikit-learn version as follows: - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "scikit-learn":"==0.19.0" - * } - * } - * } - * } - * Note that in the above example, any existing PyPI packages - * other than scikit-learn and argparse will be unaffected. - * Only one update type may be included in a single request's `updateMask`. - * For example, one cannot update both the PyPI packages and - * labels in the same request. However, it is possible to update multiple - * members of a map field simultaneously in the same request. For example, - * to set the labels "label1" and "label2" while clearing "label3" (assuming - * it already exists), one can - * provide the paths "labels.label1", "labels.label2", and "labels.label3" - * and populate the patch environment as follows: - * { - * "labels":{ - * "label1":"new-label1-value" - * "label2":"new-label2-value" - * } - * } - * Note that in the above example, any existing labels that are not - * included in the `updateMask` will be unaffected. - * It is also possible to replace an entire map field by providing the - * map field's path in the `updateMask`. The new value of the field will - * be that which is provided in the patch environment. For example, to - * delete all pre-existing user-specified PyPI packages and - * install botocore at version 1.7.14, the `updateMask` would contain - * the path "config.softwareConfig.pypiPackages", and - * the patch environment would be the following: - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "botocore":"==1.7.14" - * } - * } - * } - * } - * **Note:** Only the following fields can be updated: - * * `config.softwareConfig.pypiPackages` - * * Replace all custom custom PyPI packages. If a replacement - * package map is not included in `environment`, all custom - * PyPI packages are cleared. It is an error to provide both - * this mask and a mask specifying an individual package. - * * `config.softwareConfig.pypiPackages.`packagename - * * Update the custom PyPI package *packagename*, - * preserving other packages. To delete the package, include it in - * `updateMask`, and omit the mapping for it in - * `environment.config.softwareConfig.pypiPackages`. It is an error - * to provide both a mask of this form and the - * `config.softwareConfig.pypiPackages` mask. - * * `labels` - * * Replace all environment labels. If a replacement labels map is not - * included in `environment`, all labels are cleared. It is an error to - * provide both this mask and a mask specifying one or more individual - * labels. - * * `labels.`labelName - * * Set the label named *labelName*, while preserving other - * labels. To delete the label, include it in `updateMask` and omit its - * mapping in `environment.labels`. It is an error to provide both a - * mask of this form and the `labels` mask. - * * `config.nodeCount` - * * Horizontally scale the number of nodes in the environment. An integer - * greater than or equal to 3 must be provided in the `config.nodeCount` - * field. Supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * * `config.webServerNetworkAccessControl` - * * Replace the environment's current WebServerNetworkAccessControl. - * * `config.softwareConfig.airflowConfigOverrides` - * * Replace all Apache Airflow config overrides. If a replacement config - * overrides map is not included in `environment`, all config overrides - * are cleared. - * It is an error to provide both this mask and a mask specifying one or - * more individual config overrides. - * * `config.softwareConfig.airflowConfigOverrides.`section-name - * * Override the Apache Airflow config property *name* in the - * section named *section*, preserving other properties. To - * delete the property override, include it in `updateMask` and omit its - * mapping in - * `environment.config.softwareConfig.airflowConfigOverrides`. - * It is an error to provide both a mask of this form and the - * `config.softwareConfig.airflowConfigOverrides` mask. - * * `config.softwareConfig.envVariables` - * * Replace all environment variables. If a replacement environment - * variable map is not included in `environment`, all custom environment - * variables are cleared. - * * `config.softwareConfig.imageVersion` - * * Upgrade the version of the environment in-place. Refer to - * `SoftwareConfig.image_version` for information on how to format the - * new image version. Additionally, the new image version cannot effect - * a version downgrade, and must match the current image version's - * Composer and Airflow major versions. Consult the Cloud Composer - * version list (/composer/docs/concepts/versioning/composer-versions) - * for valid values. - * * `config.softwareConfig.schedulerCount` - * * Horizontally scale the number of schedulers in Airflow. A positive - * integer not greater than the number of nodes must be provided in the - * `config.softwareConfig.schedulerCount` field. Supported for Cloud - * Composer environments in versions composer-1.*.*-airflow-2.*.*. - * * `config.softwareConfig.cloudDataLineageIntegration` - * * Configuration for Cloud Data Lineage integration. - * * `config.databaseConfig.machineType` - * * Cloud SQL machine type used by Airflow database. - * It has to be one of: db-n1-standard-2, db-n1-standard-4, - * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer - * environments in versions composer-1.*.*-airflow-*.*.*. - * * `config.webServerConfig.machineType` - * * Machine type on which Airflow web server is running. - * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 - * or composer-n1-webserver-8. Supported for Cloud Composer environments - * in versions composer-1.*.*-airflow-*.*.*. - * * `config.maintenanceWindow` - * * Maintenance window during which Cloud Composer components may be - * under maintenance. - * * `config.workloadsConfig` - * * The workloads configuration settings for the GKE cluster associated - * with the Cloud Composer environment. Supported for Cloud Composer - * environments in versions composer-2.*.*-airflow-*.*.* and newer. - * * `config.environmentSize` - * * The size of the Cloud Composer environment. Supported for Cloud - * Composer environments in versions composer-2.*.*-airflow-*.*.* and - * newer. - */ - // const updateMask = {} - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callUpdateEnvironment() { - // Construct request - const request = { - updateMask, - }; - - // Run request - const [operation] = await serviceClient.updateEnvironment(request); - const [response] = await operation.promise(); - console.log(response); - } - - callUpdateEnvironment(); - // [END composer_v1beta1_generated_Environments_UpdateEnvironment_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_user_workloads_config_map.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_user_workloads_config_map.js deleted file mode 100644 index b5968329a05..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_user_workloads_config_map.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1beta1_generated_Environments_UpdateUserWorkloadsConfigMap_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. User workloads ConfigMap to override. - */ - // const userWorkloadsConfigMap = {} - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callUpdateUserWorkloadsConfigMap() { - // Construct request - const request = { - }; - - // Run request - const response = await serviceClient.updateUserWorkloadsConfigMap(request); - console.log(response); - } - - callUpdateUserWorkloadsConfigMap(); - // [END composer_v1beta1_generated_Environments_UpdateUserWorkloadsConfigMap_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_user_workloads_secret.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_user_workloads_secret.js deleted file mode 100644 index f63bdabba13..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/environments.update_user_workloads_secret.js +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1beta1_generated_Environments_UpdateUserWorkloadsSecret_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. User workloads Secret to override. - */ - // const userWorkloadsSecret = {} - - // Imports the Service library - const {EnvironmentsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new EnvironmentsClient(); - - async function callUpdateUserWorkloadsSecret() { - // Construct request - const request = { - }; - - // Run request - const response = await serviceClient.updateUserWorkloadsSecret(request); - console.log(response); - } - - callUpdateUserWorkloadsSecret(); - // [END composer_v1beta1_generated_Environments_UpdateUserWorkloadsSecret_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/image_versions.list_image_versions.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/image_versions.list_image_versions.js deleted file mode 100644 index 8a9d5aa745a..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/image_versions.list_image_versions.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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() { - // [START composer_v1beta1_generated_ImageVersions_ListImageVersions_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. - */ - /** - * List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - */ - // const parent = 'abc123' - /** - * The maximum number of image_versions to return. - */ - // const pageSize = 1234 - /** - * The next_page_token value returned from a previous List request, if any. - */ - // const pageToken = 'abc123' - /** - * Whether or not image versions from old releases should be included. - */ - // const includePastReleases = true - - // Imports the Service library - const {ImageVersionsClient} = require('@google-cloud/orchestration-airflow').v1beta1; - - // Instantiates a client - const serviceClient = new ImageVersionsClient(); - - async function callListImageVersions() { - // Construct request - const request = { - }; - - // Run request - const iterable = serviceClient.listImageVersionsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListImageVersions(); - // [END composer_v1beta1_generated_ImageVersions_ListImageVersions_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-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json deleted file mode 100644 index d44f4eb6465..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/samples/generated/v1beta1/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json +++ /dev/null @@ -1,1195 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-service", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.orchestration.airflow.service.v1beta1", - "version": "v1beta1" - } - ] - }, - "snippets": [ - { - "regionTag": "composer_v1beta1_generated_Environments_CreateEnvironment_async", - "title": "Environments createEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Create a new environment.", - "canonical": true, - "file": "environments.create_environment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateEnvironment", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "environment", - "type": ".google.cloud.orchestration.airflow.service.v1beta1.Environment" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "CreateEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateEnvironment", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_GetEnvironment_async", - "title": "Environments getEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Get an existing environment.", - "canonical": true, - "file": "environments.get_environment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 53, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetEnvironment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.Environment", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "GetEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetEnvironment", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_ListEnvironments_async", - "title": "Environments listEnvironments Sample", - "origin": "API_DEFINITION", - "description": " List environments.", - "canonical": true, - "file": "environments.list_environments.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 63, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListEnvironments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListEnvironments", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "ListEnvironments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListEnvironments", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_UpdateEnvironment_async", - "title": "Environments updateEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Update an environment.", - "canonical": true, - "file": "environments.update_environment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 198, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateEnvironment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "environment", - "type": ".google.cloud.orchestration.airflow.service.v1beta1.Environment" - }, - { - "name": "update_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "UpdateEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateEnvironment", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_DeleteEnvironment_async", - "title": "Environments deleteEnvironment Sample", - "origin": "API_DEFINITION", - "description": " Delete an environment.", - "canonical": true, - "file": "environments.delete_environment.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteEnvironment", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "DeleteEnvironment", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteEnvironment", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_RestartWebServer_async", - "title": "Environments restartWebServer Sample", - "origin": "API_DEFINITION", - "description": " Restart Airflow web server.", - "canonical": true, - "file": "environments.restart_web_server.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 55, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "RestartWebServer", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.RestartWebServer", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "RestartWebServer", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.RestartWebServer", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_CheckUpgrade_async", - "title": "Environments checkUpgrade Sample", - "origin": "API_DEFINITION", - "description": " Check if an upgrade operation on the environment will succeed. In case of problems detailed info can be found in the returned Operation.", - "canonical": true, - "file": "environments.check_upgrade.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CheckUpgrade", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CheckUpgrade", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - }, - { - "name": "image_version", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "CheckUpgrade", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CheckUpgrade", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_ExecuteAirflowCommand_async", - "title": "Environments executeAirflowCommand Sample", - "origin": "API_DEFINITION", - "description": " Executes Airflow CLI command.", - "canonical": true, - "file": "environments.execute_airflow_command.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 68, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ExecuteAirflowCommand", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ExecuteAirflowCommand", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - }, - { - "name": "command", - "type": "TYPE_STRING" - }, - { - "name": "subcommand", - "type": "TYPE_STRING" - }, - { - "name": "parameters", - "type": "TYPE_STRING[]" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "ExecuteAirflowCommand", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ExecuteAirflowCommand", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_StopAirflowCommand_async", - "title": "Environments stopAirflowCommand Sample", - "origin": "API_DEFINITION", - "description": " Stops Airflow CLI command execution.", - "canonical": true, - "file": "environments.stop_airflow_command.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 70, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "StopAirflowCommand", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.StopAirflowCommand", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - }, - { - "name": "execution_id", - "type": "TYPE_STRING" - }, - { - "name": "pod", - "type": "TYPE_STRING" - }, - { - "name": "pod_namespace", - "type": "TYPE_STRING" - }, - { - "name": "force", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "StopAirflowCommand", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.StopAirflowCommand", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_PollAirflowCommand_async", - "title": "Environments pollAirflowCommand Sample", - "origin": "API_DEFINITION", - "description": " Polls Airflow CLI command execution and fetches logs.", - "canonical": true, - "file": "environments.poll_airflow_command.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 69, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "PollAirflowCommand", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.PollAirflowCommand", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - }, - { - "name": "execution_id", - "type": "TYPE_STRING" - }, - { - "name": "pod", - "type": "TYPE_STRING" - }, - { - "name": "pod_namespace", - "type": "TYPE_STRING" - }, - { - "name": "next_line_number", - "type": "TYPE_INT32" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "PollAirflowCommand", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.PollAirflowCommand", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_ListWorkloads_async", - "title": "Environments listWorkloads Sample", - "origin": "API_DEFINITION", - "description": " Lists workloads in a Cloud Composer environment. Workload is a unit that runs a single Composer component. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.list_workloads.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 74, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListWorkloads", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListWorkloads", - "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" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "ListWorkloads", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListWorkloads", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_CreateUserWorkloadsSecret_async", - "title": "Environments createUserWorkloadsSecret Sample", - "origin": "API_DEFINITION", - "description": " Creates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.create_user_workloads_secret.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateUserWorkloadsSecret", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateUserWorkloadsSecret", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "user_workloads_secret", - "type": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "CreateUserWorkloadsSecret", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateUserWorkloadsSecret", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_GetUserWorkloadsSecret_async", - "title": "Environments getUserWorkloadsSecret Sample", - "origin": "API_DEFINITION", - "description": " Gets an existing user workloads Secret. Values of the \"data\" field in the response are cleared. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.get_user_workloads_secret.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetUserWorkloadsSecret", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetUserWorkloadsSecret", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "GetUserWorkloadsSecret", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetUserWorkloadsSecret", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_ListUserWorkloadsSecrets_async", - "title": "Environments listUserWorkloadsSecrets Sample", - "origin": "API_DEFINITION", - "description": " Lists user workloads Secrets. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.list_user_workloads_secrets.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListUserWorkloadsSecrets", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListUserWorkloadsSecrets", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "ListUserWorkloadsSecrets", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListUserWorkloadsSecrets", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_UpdateUserWorkloadsSecret_async", - "title": "Environments updateUserWorkloadsSecret Sample", - "origin": "API_DEFINITION", - "description": " Updates a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.update_user_workloads_secret.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 52, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateUserWorkloadsSecret", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateUserWorkloadsSecret", - "async": true, - "parameters": [ - { - "name": "user_workloads_secret", - "type": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "UpdateUserWorkloadsSecret", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateUserWorkloadsSecret", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_DeleteUserWorkloadsSecret_async", - "title": "Environments deleteUserWorkloadsSecret Sample", - "origin": "API_DEFINITION", - "description": " Deletes a user workloads Secret. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.delete_user_workloads_secret.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteUserWorkloadsSecret", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteUserWorkloadsSecret", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "DeleteUserWorkloadsSecret", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteUserWorkloadsSecret", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_CreateUserWorkloadsConfigMap_async", - "title": "Environments createUserWorkloadsConfigMap Sample", - "origin": "API_DEFINITION", - "description": " Creates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.create_user_workloads_config_map.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateUserWorkloadsConfigMap", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateUserWorkloadsConfigMap", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "user_workloads_config_map", - "type": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "CreateUserWorkloadsConfigMap", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.CreateUserWorkloadsConfigMap", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_GetUserWorkloadsConfigMap_async", - "title": "Environments getUserWorkloadsConfigMap Sample", - "origin": "API_DEFINITION", - "description": " Gets an existing user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.get_user_workloads_config_map.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetUserWorkloadsConfigMap", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetUserWorkloadsConfigMap", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "GetUserWorkloadsConfigMap", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.GetUserWorkloadsConfigMap", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_ListUserWorkloadsConfigMaps_async", - "title": "Environments listUserWorkloadsConfigMaps Sample", - "origin": "API_DEFINITION", - "description": " Lists user workloads ConfigMaps. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.list_user_workloads_config_maps.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 65, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListUserWorkloadsConfigMaps", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListUserWorkloadsConfigMaps", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "ListUserWorkloadsConfigMaps", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.ListUserWorkloadsConfigMaps", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_UpdateUserWorkloadsConfigMap_async", - "title": "Environments updateUserWorkloadsConfigMap Sample", - "origin": "API_DEFINITION", - "description": " Updates a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.update_user_workloads_config_map.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 52, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "UpdateUserWorkloadsConfigMap", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateUserWorkloadsConfigMap", - "async": true, - "parameters": [ - { - "name": "user_workloads_config_map", - "type": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "UpdateUserWorkloadsConfigMap", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.UpdateUserWorkloadsConfigMap", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_DeleteUserWorkloadsConfigMap_async", - "title": "Environments deleteUserWorkloadsConfigMap Sample", - "origin": "API_DEFINITION", - "description": " Deletes a user workloads ConfigMap. This method is supported for Cloud Composer environments in versions composer-3.*.*-airflow-*.*.* and newer.", - "canonical": true, - "file": "environments.delete_user_workloads_config_map.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteUserWorkloadsConfigMap", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteUserWorkloadsConfigMap", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "DeleteUserWorkloadsConfigMap", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DeleteUserWorkloadsConfigMap", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_SaveSnapshot_async", - "title": "Environments saveSnapshot Sample", - "origin": "API_DEFINITION", - "description": " Creates a snapshots of a Cloud Composer environment. As a result of this operation, snapshot of environment's state is stored in a location specified in the SaveSnapshotRequest.", - "canonical": true, - "file": "environments.save_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "SaveSnapshot", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.SaveSnapshot", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - }, - { - "name": "snapshot_location", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "SaveSnapshot", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.SaveSnapshot", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_LoadSnapshot_async", - "title": "Environments loadSnapshot Sample", - "origin": "API_DEFINITION", - "description": " Loads a snapshot of a Cloud Composer environment. As a result of this operation, a snapshot of environment's specified in LoadSnapshotRequest is loaded into the environment.", - "canonical": true, - "file": "environments.load_snapshot.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 79, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "LoadSnapshot", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.LoadSnapshot", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - }, - { - "name": "snapshot_path", - "type": "TYPE_STRING" - }, - { - "name": "skip_pypi_packages_installation", - "type": "TYPE_BOOL" - }, - { - "name": "skip_environment_variables_setting", - "type": "TYPE_BOOL" - }, - { - "name": "skip_airflow_overrides_setting", - "type": "TYPE_BOOL" - }, - { - "name": "skip_gcs_data_copying", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "LoadSnapshot", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.LoadSnapshot", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_DatabaseFailover_async", - "title": "Environments databaseFailover Sample", - "origin": "API_DEFINITION", - "description": " Triggers database failover (only for highly resilient environments).", - "canonical": true, - "file": "environments.database_failover.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DatabaseFailover", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DatabaseFailover", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.longrunning.Operation", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "DatabaseFailover", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.DatabaseFailover", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_Environments_FetchDatabaseProperties_async", - "title": "Environments fetchDatabaseProperties Sample", - "origin": "API_DEFINITION", - "description": " Fetches database properties.", - "canonical": true, - "file": "environments.fetch_database_properties.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "FetchDatabaseProperties", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.FetchDatabaseProperties", - "async": true, - "parameters": [ - { - "name": "environment", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse", - "client": { - "shortName": "EnvironmentsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.EnvironmentsClient" - }, - "method": { - "shortName": "FetchDatabaseProperties", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments.FetchDatabaseProperties", - "service": { - "shortName": "Environments", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.Environments" - } - } - } - }, - { - "regionTag": "composer_v1beta1_generated_ImageVersions_ListImageVersions_async", - "title": "Environments listImageVersions Sample", - "origin": "API_DEFINITION", - "description": " List ImageVersions for provided location.", - "canonical": true, - "file": "image_versions.list_image_versions.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 67, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListImageVersions", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions.ListImageVersions", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "include_past_releases", - "type": "TYPE_BOOL" - } - ], - "resultType": ".google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsResponse", - "client": { - "shortName": "ImageVersionsClient", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersionsClient" - }, - "method": { - "shortName": "ListImageVersions", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions.ListImageVersions", - "service": { - "shortName": "ImageVersions", - "fullName": "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/index.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/index.ts deleted file mode 100644 index e71474fce3d..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/index.ts +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 v1beta1 from './v1beta1'; -const EnvironmentsClient = v1beta1.EnvironmentsClient; -type EnvironmentsClient = v1beta1.EnvironmentsClient; -const ImageVersionsClient = v1beta1.ImageVersionsClient; -type ImageVersionsClient = v1beta1.ImageVersionsClient; -export {v1beta1, EnvironmentsClient, ImageVersionsClient}; -export default {v1beta1, EnvironmentsClient, ImageVersionsClient}; -import * as protos from '../protos/protos'; -export {protos} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_client.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_client.ts deleted file mode 100644 index a20bde03882..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_client.ts +++ /dev/null @@ -1,3431 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); - -/** - * Client JSON configuration object, loaded from - * `src/v1beta1/environments_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './environments_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Managed Apache Airflow Environments. - * @class - * @memberof v1beta1 - */ -export class EnvironmentsClient { - 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; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - operationsClient: gax.OperationsClient; - environmentsStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of EnvironmentsClient. - * - * @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://developers.google.com/identity/protocols/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 EnvironmentsClient({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 EnvironmentsClient; - 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 = 'composer.' + 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; - } - - // 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 = { - environmentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/environments/{environment}' - ), - userWorkloadsConfigMapPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}' - ), - userWorkloadsSecretPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}' - ), - }; - - // 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 = { - listEnvironments: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'environments'), - listWorkloads: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'workloads'), - listUserWorkloadsSecrets: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'userWorkloadsSecrets'), - listUserWorkloadsConfigMaps: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'userWorkloadsConfigMaps') - }; - - const protoFilesRoot = this._gaxModule.protobuf.Root.fromJSON(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.longrunning.Operations.DeleteOperation',delete: '/v1beta1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.GetOperation',get: '/v1beta1/{name=projects/*/locations/*/operations/*}',},{selector: 'google.longrunning.Operations.ListOperations',get: '/v1beta1/{name=projects/*/locations/*}/operations',}]; - } - this.operationsClient = this._gaxModule.lro(lroOptions).operationsClient(opts); - const createEnvironmentResponse = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1beta1.Environment') as gax.protobuf.Type; - const createEnvironmentMetadata = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata') as gax.protobuf.Type; - const updateEnvironmentResponse = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1beta1.Environment') as gax.protobuf.Type; - const updateEnvironmentMetadata = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata') as gax.protobuf.Type; - const deleteEnvironmentResponse = protoFilesRoot.lookup( - '.google.protobuf.Empty') as gax.protobuf.Type; - const deleteEnvironmentMetadata = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata') as gax.protobuf.Type; - const restartWebServerResponse = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1beta1.Environment') as gax.protobuf.Type; - const restartWebServerMetadata = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata') as gax.protobuf.Type; - const checkUpgradeResponse = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeResponse') as gax.protobuf.Type; - const checkUpgradeMetadata = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata') as gax.protobuf.Type; - const saveSnapshotResponse = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotResponse') as gax.protobuf.Type; - const saveSnapshotMetadata = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata') as gax.protobuf.Type; - const loadSnapshotResponse = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotResponse') as gax.protobuf.Type; - const loadSnapshotMetadata = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata') as gax.protobuf.Type; - const databaseFailoverResponse = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverResponse') as gax.protobuf.Type; - const databaseFailoverMetadata = protoFilesRoot.lookup( - '.google.cloud.orchestration.airflow.service.v1beta1.OperationMetadata') as gax.protobuf.Type; - - this.descriptors.longrunning = { - createEnvironment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - createEnvironmentResponse.decode.bind(createEnvironmentResponse), - createEnvironmentMetadata.decode.bind(createEnvironmentMetadata)), - updateEnvironment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - updateEnvironmentResponse.decode.bind(updateEnvironmentResponse), - updateEnvironmentMetadata.decode.bind(updateEnvironmentMetadata)), - deleteEnvironment: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - deleteEnvironmentResponse.decode.bind(deleteEnvironmentResponse), - deleteEnvironmentMetadata.decode.bind(deleteEnvironmentMetadata)), - restartWebServer: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - restartWebServerResponse.decode.bind(restartWebServerResponse), - restartWebServerMetadata.decode.bind(restartWebServerMetadata)), - checkUpgrade: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - checkUpgradeResponse.decode.bind(checkUpgradeResponse), - checkUpgradeMetadata.decode.bind(checkUpgradeMetadata)), - saveSnapshot: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - saveSnapshotResponse.decode.bind(saveSnapshotResponse), - saveSnapshotMetadata.decode.bind(saveSnapshotMetadata)), - loadSnapshot: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - loadSnapshotResponse.decode.bind(loadSnapshotResponse), - loadSnapshotMetadata.decode.bind(loadSnapshotMetadata)), - databaseFailover: new this._gaxModule.LongrunningDescriptor( - this.operationsClient, - databaseFailoverResponse.decode.bind(databaseFailoverResponse), - databaseFailoverMetadata.decode.bind(databaseFailoverMetadata)) - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.orchestration.airflow.service.v1beta1.Environments', 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.environmentsStub) { - return this.environmentsStub; - } - - // Put together the "service stub" for - // google.cloud.orchestration.airflow.service.v1beta1.Environments. - this.environmentsStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.orchestration.airflow.service.v1beta1.Environments') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.orchestration.airflow.service.v1beta1.Environments, - 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 environmentsStubMethods = - ['createEnvironment', 'getEnvironment', 'listEnvironments', 'updateEnvironment', 'deleteEnvironment', 'restartWebServer', 'checkUpgrade', 'executeAirflowCommand', 'stopAirflowCommand', 'pollAirflowCommand', 'listWorkloads', 'createUserWorkloadsSecret', 'getUserWorkloadsSecret', 'listUserWorkloadsSecrets', 'updateUserWorkloadsSecret', 'deleteUserWorkloadsSecret', 'createUserWorkloadsConfigMap', 'getUserWorkloadsConfigMap', 'listUserWorkloadsConfigMaps', 'updateUserWorkloadsConfigMap', 'deleteUserWorkloadsConfigMap', 'saveSnapshot', 'loadSnapshot', 'databaseFailover', 'fetchDatabaseProperties']; - for (const methodName of environmentsStubMethods) { - const callPromise = this.environmentsStub.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.environmentsStub; - } - - /** - * 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 'composer.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 'composer.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 -- - // ------------------- -/** - * Get an existing environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource name of the environment to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @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.orchestration.airflow.service.v1beta1.Environment|Environment}. - * 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/v1beta1/environments.get_environment.js - * region_tag:composer_v1beta1_generated_Environments_GetEnvironment_async - */ - getEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest|undefined, {}|undefined - ]>; - getEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>): void; - getEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>): void; - getEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetEnvironmentRequest|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(); - return this.innerApiCalls.getEnvironment(request, options, callback); - } -/** - * Executes Airflow CLI command. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - * @param {string} request.command - * Airflow command. - * @param {string} request.subcommand - * Airflow subcommand. - * @param {string[]} request.parameters - * Parameters for the Airflow command/subcommand as an array of arguments. - * It may contain positional arguments like `["my-dag-id"]`, key-value - * parameters like `["--foo=bar"]` or `["--foo","bar"]`, - * or other flags like `["-f"]`. - * @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.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse|ExecuteAirflowCommandResponse}. - * 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/v1beta1/environments.execute_airflow_command.js - * region_tag:composer_v1beta1_generated_Environments_ExecuteAirflowCommand_async - */ - executeAirflowCommand( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest|undefined, {}|undefined - ]>; - executeAirflowCommand( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest|null|undefined, - {}|null|undefined>): void; - executeAirflowCommand( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest|null|undefined, - {}|null|undefined>): void; - executeAirflowCommand( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandRequest|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({ - 'environment': request.environment ?? '', - }); - this.initialize(); - return this.innerApiCalls.executeAirflowCommand(request, options, callback); - } -/** - * Stops Airflow CLI command execution. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}". - * @param {string} request.executionId - * The unique ID of the command execution. - * @param {string} request.pod - * The name of the pod where the command is executed. - * @param {string} request.podNamespace - * The namespace of the pod where the command is executed. - * @param {boolean} request.force - * If true, the execution is terminated forcefully (SIGKILL). If false, the - * execution is stopped gracefully, giving it time for cleanup. - * @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.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse|StopAirflowCommandResponse}. - * 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/v1beta1/environments.stop_airflow_command.js - * region_tag:composer_v1beta1_generated_Environments_StopAirflowCommand_async - */ - stopAirflowCommand( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest|undefined, {}|undefined - ]>; - stopAirflowCommand( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest|null|undefined, - {}|null|undefined>): void; - stopAirflowCommand( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest|null|undefined, - {}|null|undefined>): void; - stopAirflowCommand( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandRequest|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({ - 'environment': request.environment ?? '', - }); - this.initialize(); - return this.innerApiCalls.stopAirflowCommand(request, options, callback); - } -/** - * Polls Airflow CLI command execution and fetches logs. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * The resource name of the environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {string} request.executionId - * The unique ID of the command execution. - * @param {string} request.pod - * The name of the pod where the command is executed. - * @param {string} request.podNamespace - * The namespace of the pod where the command is executed. - * @param {number} request.nextLineNumber - * Line number from which new logs should be fetched. - * @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.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse|PollAirflowCommandResponse}. - * 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/v1beta1/environments.poll_airflow_command.js - * region_tag:composer_v1beta1_generated_Environments_PollAirflowCommand_async - */ - pollAirflowCommand( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest|undefined, {}|undefined - ]>; - pollAirflowCommand( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest|null|undefined, - {}|null|undefined>): void; - pollAirflowCommand( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest|null|undefined, - {}|null|undefined>): void; - pollAirflowCommand( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandRequest|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({ - 'environment': request.environment ?? '', - }); - this.initialize(); - return this.innerApiCalls.pollAirflowCommand(request, options, callback); - } -/** - * Creates a user workloads Secret. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The environment name to create a Secret for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} request.userWorkloadsSecret - * Required. User workloads Secret to create. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret|UserWorkloadsSecret}. - * 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/v1beta1/environments.create_user_workloads_secret.js - * region_tag:composer_v1beta1_generated_Environments_CreateUserWorkloadsSecret_async - */ - createUserWorkloadsSecret( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest|undefined, {}|undefined - ]>; - createUserWorkloadsSecret( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): void; - createUserWorkloadsSecret( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): void; - createUserWorkloadsSecret( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsSecretRequest|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(); - return this.innerApiCalls.createUserWorkloadsSecret(request, options, callback); - } -/** - * Gets an existing user workloads Secret. - * Values of the "data" field in the response are cleared. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the Secret to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * @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.orchestration.airflow.service.v1beta1.UserWorkloadsSecret|UserWorkloadsSecret}. - * 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/v1beta1/environments.get_user_workloads_secret.js - * region_tag:composer_v1beta1_generated_Environments_GetUserWorkloadsSecret_async - */ - getUserWorkloadsSecret( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest|undefined, {}|undefined - ]>; - getUserWorkloadsSecret( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): void; - getUserWorkloadsSecret( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): void; - getUserWorkloadsSecret( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsSecretRequest|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(); - return this.innerApiCalls.getUserWorkloadsSecret(request, options, callback); - } -/** - * Updates a user workloads Secret. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret} [request.userWorkloadsSecret] - * Optional. User workloads Secret to override. - * @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.orchestration.airflow.service.v1beta1.UserWorkloadsSecret|UserWorkloadsSecret}. - * 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/v1beta1/environments.update_user_workloads_secret.js - * region_tag:composer_v1beta1_generated_Environments_UpdateUserWorkloadsSecret_async - */ - updateUserWorkloadsSecret( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest|undefined, {}|undefined - ]>; - updateUserWorkloadsSecret( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): void; - updateUserWorkloadsSecret( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): void; - updateUserWorkloadsSecret( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsSecretRequest|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({ - 'user_workloads_secret.name': request.userWorkloadsSecret!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateUserWorkloadsSecret(request, options, callback); - } -/** - * Deletes a user workloads Secret. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The Secret to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsSecrets/{userWorkloadsSecretId}" - * @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.protobuf.Empty|Empty}. - * 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/v1beta1/environments.delete_user_workloads_secret.js - * region_tag:composer_v1beta1_generated_Environments_DeleteUserWorkloadsSecret_async - */ - deleteUserWorkloadsSecret( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest|undefined, {}|undefined - ]>; - deleteUserWorkloadsSecret( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): void; - deleteUserWorkloadsSecret( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): void; - deleteUserWorkloadsSecret( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsSecretRequest|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(); - return this.innerApiCalls.deleteUserWorkloadsSecret(request, options, callback); - } -/** - * Creates a user workloads ConfigMap. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The environment name to create a ConfigMap for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} request.userWorkloadsConfigMap - * Required. User workloads ConfigMap to create. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. - * 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/v1beta1/environments.create_user_workloads_config_map.js - * region_tag:composer_v1beta1_generated_Environments_CreateUserWorkloadsConfigMap_async - */ - createUserWorkloadsConfigMap( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest|undefined, {}|undefined - ]>; - createUserWorkloadsConfigMap( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): void; - createUserWorkloadsConfigMap( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): void; - createUserWorkloadsConfigMap( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateUserWorkloadsConfigMapRequest|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(); - return this.innerApiCalls.createUserWorkloadsConfigMap(request, options, callback); - } -/** - * Gets an existing user workloads ConfigMap. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The resource name of the ConfigMap to get, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * @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.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. - * 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/v1beta1/environments.get_user_workloads_config_map.js - * region_tag:composer_v1beta1_generated_Environments_GetUserWorkloadsConfigMap_async - */ - getUserWorkloadsConfigMap( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest|undefined, {}|undefined - ]>; - getUserWorkloadsConfigMap( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): void; - getUserWorkloadsConfigMap( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): void; - getUserWorkloadsConfigMap( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.IGetUserWorkloadsConfigMapRequest|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(); - return this.innerApiCalls.getUserWorkloadsConfigMap(request, options, callback); - } -/** - * Updates a user workloads ConfigMap. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap} [request.userWorkloadsConfigMap] - * Optional. User workloads ConfigMap to override. - * @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.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. - * 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/v1beta1/environments.update_user_workloads_config_map.js - * region_tag:composer_v1beta1_generated_Environments_UpdateUserWorkloadsConfigMap_async - */ - updateUserWorkloadsConfigMap( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest|undefined, {}|undefined - ]>; - updateUserWorkloadsConfigMap( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): void; - updateUserWorkloadsConfigMap( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): void; - updateUserWorkloadsConfigMap( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateUserWorkloadsConfigMapRequest|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({ - 'user_workloads_config_map.name': request.userWorkloadsConfigMap!.name ?? '', - }); - this.initialize(); - return this.innerApiCalls.updateUserWorkloadsConfigMap(request, options, callback); - } -/** - * Deletes a user workloads ConfigMap. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The ConfigMap to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}/userWorkloadsConfigMaps/{userWorkloadsConfigMapId}" - * @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.protobuf.Empty|Empty}. - * 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/v1beta1/environments.delete_user_workloads_config_map.js - * region_tag:composer_v1beta1_generated_Environments_DeleteUserWorkloadsConfigMap_async - */ - deleteUserWorkloadsConfigMap( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest, - options?: CallOptions): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest|undefined, {}|undefined - ]>; - deleteUserWorkloadsConfigMap( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): void; - deleteUserWorkloadsConfigMap( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): void; - deleteUserWorkloadsConfigMap( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.protobuf.IEmpty, - protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteUserWorkloadsConfigMapRequest|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(); - return this.innerApiCalls.deleteUserWorkloadsConfigMap(request, options, callback); - } -/** - * Fetches database properties. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * Required. The resource name of the environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @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.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse|FetchDatabasePropertiesResponse}. - * 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/v1beta1/environments.fetch_database_properties.js - * region_tag:composer_v1beta1_generated_Environments_FetchDatabaseProperties_async - */ - fetchDatabaseProperties( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest|undefined, {}|undefined - ]>; - fetchDatabaseProperties( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest|null|undefined, - {}|null|undefined>): void; - fetchDatabaseProperties( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest, - callback: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest|null|undefined, - {}|null|undefined>): void; - fetchDatabaseProperties( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest, - optionsOrCallback?: CallOptions|Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest|null|undefined, - {}|null|undefined>, - callback?: Callback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest|null|undefined, - {}|null|undefined>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse, - protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesRequest|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({ - 'environment': request.environment ?? '', - }); - this.initialize(); - return this.innerApiCalls.fetchDatabaseProperties(request, options, callback); - } - -/** - * Create a new environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * The parent must be of the form - * "projects/{projectId}/locations/{locationId}". - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environment} request.environment - * The environment to create. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing - * a long running operation. Its `promise()` method returns a promise - * you can `await` for. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } - * for more details and examples. - * @example include:samples/generated/v1beta1/environments.create_environment.js - * region_tag:composer_v1beta1_generated_Environments_CreateEnvironment_async - */ - createEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - createEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - createEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICreateEnvironmentRequest, - 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(); - return this.innerApiCalls.createEnvironment(request, options, callback); - } -/** - * Check the status of the long running operation returned by `createEnvironment()`. - * @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/v1beta1/environments.create_environment.js - * region_tag:composer_v1beta1_generated_Environments_CreateEnvironment_async - */ - async checkCreateEnvironmentProgress(name: string): Promise>{ - 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.createEnvironment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Update an environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The relative resource name of the environment to update, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {google.cloud.orchestration.airflow.service.v1beta1.Environment} request.environment - * A patch environment. Fields specified by the `updateMask` will be copied - * from the patch environment into the environment under update. - * @param {google.protobuf.FieldMask} request.updateMask - * Required. A comma-separated list of paths, relative to `Environment`, of - * fields to update. - * For example, to set the version of scikit-learn to install in the - * environment to 0.19.0 and to remove an existing installation of - * argparse, the `updateMask` parameter would include the following two - * `paths` values: "config.softwareConfig.pypiPackages.scikit-learn" and - * "config.softwareConfig.pypiPackages.argparse". The included patch - * environment would specify the scikit-learn version as follows: - * - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "scikit-learn":"==0.19.0" - * } - * } - * } - * } - * - * Note that in the above example, any existing PyPI packages - * other than scikit-learn and argparse will be unaffected. - * - * Only one update type may be included in a single request's `updateMask`. - * For example, one cannot update both the PyPI packages and - * labels in the same request. However, it is possible to update multiple - * members of a map field simultaneously in the same request. For example, - * to set the labels "label1" and "label2" while clearing "label3" (assuming - * it already exists), one can - * provide the paths "labels.label1", "labels.label2", and "labels.label3" - * and populate the patch environment as follows: - * - * { - * "labels":{ - * "label1":"new-label1-value" - * "label2":"new-label2-value" - * } - * } - * - * Note that in the above example, any existing labels that are not - * included in the `updateMask` will be unaffected. - * - * It is also possible to replace an entire map field by providing the - * map field's path in the `updateMask`. The new value of the field will - * be that which is provided in the patch environment. For example, to - * delete all pre-existing user-specified PyPI packages and - * install botocore at version 1.7.14, the `updateMask` would contain - * the path "config.softwareConfig.pypiPackages", and - * the patch environment would be the following: - * - * { - * "config":{ - * "softwareConfig":{ - * "pypiPackages":{ - * "botocore":"==1.7.14" - * } - * } - * } - * } - * - * **Note:** Only the following fields can be updated: - * - * * `config.softwareConfig.pypiPackages` - * * Replace all custom custom PyPI packages. If a replacement - * package map is not included in `environment`, all custom - * PyPI packages are cleared. It is an error to provide both - * this mask and a mask specifying an individual package. - * * `config.softwareConfig.pypiPackages.`packagename - * * Update the custom PyPI package *packagename*, - * preserving other packages. To delete the package, include it in - * `updateMask`, and omit the mapping for it in - * `environment.config.softwareConfig.pypiPackages`. It is an error - * to provide both a mask of this form and the - * `config.softwareConfig.pypiPackages` mask. - * * `labels` - * * Replace all environment labels. If a replacement labels map is not - * included in `environment`, all labels are cleared. It is an error to - * provide both this mask and a mask specifying one or more individual - * labels. - * * `labels.`labelName - * * Set the label named *labelName*, while preserving other - * labels. To delete the label, include it in `updateMask` and omit its - * mapping in `environment.labels`. It is an error to provide both a - * mask of this form and the `labels` mask. - * * `config.nodeCount` - * * Horizontally scale the number of nodes in the environment. An integer - * greater than or equal to 3 must be provided in the `config.nodeCount` - * field. Supported for Cloud Composer environments in versions - * composer-1.*.*-airflow-*.*.*. - * * `config.webServerNetworkAccessControl` - * * Replace the environment's current WebServerNetworkAccessControl. - * * `config.softwareConfig.airflowConfigOverrides` - * * Replace all Apache Airflow config overrides. If a replacement config - * overrides map is not included in `environment`, all config overrides - * are cleared. - * It is an error to provide both this mask and a mask specifying one or - * more individual config overrides. - * * `config.softwareConfig.airflowConfigOverrides.`section-name - * * Override the Apache Airflow config property *name* in the - * section named *section*, preserving other properties. To - * delete the property override, include it in `updateMask` and omit its - * mapping in - * `environment.config.softwareConfig.airflowConfigOverrides`. - * It is an error to provide both a mask of this form and the - * `config.softwareConfig.airflowConfigOverrides` mask. - * * `config.softwareConfig.envVariables` - * * Replace all environment variables. If a replacement environment - * variable map is not included in `environment`, all custom environment - * variables are cleared. - * * `config.softwareConfig.imageVersion` - * * Upgrade the version of the environment in-place. Refer to - * `SoftwareConfig.image_version` for information on how to format the - * new image version. Additionally, the new image version cannot effect - * a version downgrade, and must match the current image version's - * Composer and Airflow major versions. Consult the [Cloud Composer - * version list](/composer/docs/concepts/versioning/composer-versions) - * for valid values. - * * `config.softwareConfig.schedulerCount` - * * Horizontally scale the number of schedulers in Airflow. A positive - * integer not greater than the number of nodes must be provided in the - * `config.softwareConfig.schedulerCount` field. Supported for Cloud - * Composer environments in versions composer-1.*.*-airflow-2.*.*. - * * `config.softwareConfig.cloudDataLineageIntegration` - * * Configuration for Cloud Data Lineage integration. - * * `config.databaseConfig.machineType` - * * Cloud SQL machine type used by Airflow database. - * It has to be one of: db-n1-standard-2, db-n1-standard-4, - * db-n1-standard-8 or db-n1-standard-16. Supported for Cloud Composer - * environments in versions composer-1.*.*-airflow-*.*.*. - * * `config.webServerConfig.machineType` - * * Machine type on which Airflow web server is running. - * It has to be one of: composer-n1-webserver-2, composer-n1-webserver-4 - * or composer-n1-webserver-8. Supported for Cloud Composer environments - * in versions composer-1.*.*-airflow-*.*.*. - * * `config.maintenanceWindow` - * * Maintenance window during which Cloud Composer components may be - * under maintenance. - * * `config.workloadsConfig` - * * The workloads configuration settings for the GKE cluster associated - * with the Cloud Composer environment. Supported for Cloud Composer - * environments in versions composer-2.*.*-airflow-*.*.* and newer. - * * `config.environmentSize` - * * The size of the Cloud Composer environment. Supported for Cloud - * Composer environments in versions composer-2.*.*-airflow-*.*.* and - * newer. - * @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/v1beta1/environments.update_environment.js - * region_tag:composer_v1beta1_generated_Environments_UpdateEnvironment_async - */ - updateEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - updateEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - updateEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUpdateEnvironmentRequest, - 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(); - return this.innerApiCalls.updateEnvironment(request, options, callback); - } -/** - * Check the status of the long running operation returned by `updateEnvironment()`. - * @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/v1beta1/environments.update_environment.js - * region_tag:composer_v1beta1_generated_Environments_UpdateEnvironment_async - */ - async checkUpdateEnvironmentProgress(name: string): Promise>{ - 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.updateEnvironment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Delete an environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The environment to delete, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @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/v1beta1/environments.delete_environment.js - * region_tag:composer_v1beta1_generated_Environments_DeleteEnvironment_async - */ - deleteEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - deleteEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteEnvironment( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - deleteEnvironment( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDeleteEnvironmentRequest, - 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(); - return this.innerApiCalls.deleteEnvironment(request, options, callback); - } -/** - * Check the status of the long running operation returned by `deleteEnvironment()`. - * @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/v1beta1/environments.delete_environment.js - * region_tag:composer_v1beta1_generated_Environments_DeleteEnvironment_async - */ - async checkDeleteEnvironmentProgress(name: string): Promise>{ - 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.deleteEnvironment, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Restart Airflow web server. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * The resource name of the environment to restart the web server for, in the - * form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @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/v1beta1/environments.restart_web_server.js - * region_tag:composer_v1beta1_generated_Environments_RestartWebServer_async - */ - restartWebServer( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - restartWebServer( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - restartWebServer( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - restartWebServer( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IRestartWebServerRequest, - 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(); - return this.innerApiCalls.restartWebServer(request, options, callback); - } -/** - * Check the status of the long running operation returned by `restartWebServer()`. - * @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/v1beta1/environments.restart_web_server.js - * region_tag:composer_v1beta1_generated_Environments_RestartWebServer_async - */ - async checkRestartWebServerProgress(name: string): Promise>{ - 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.restartWebServer, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Check if an upgrade operation on the environment will succeed. - * - * In case of problems detailed info can be found in the returned Operation. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * The resource name of the environment to check upgrade for, in the - * form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {string} request.imageVersion - * The version of the software running in the environment. - * This encapsulates both the version of Cloud Composer functionality and the - * version of Apache Airflow. It must match the regular expression - * `composer-([0-9]+(\.[0-9]+\.[0-9]+(-preview\.[0-9]+)?)?|latest)-airflow-([0-9]+(\.[0-9]+(\.[0-9]+)?)?)`. - * When used as input, the server also checks if the provided version is - * supported and denies the request for an unsupported version. - * - * The Cloud Composer portion of the image version is a full - * [semantic version](https://semver.org), or an alias in the form of major - * version number or `latest`. When an alias is provided, the server replaces - * it with the current Cloud Composer version that satisfies the alias. - * - * The Apache Airflow portion of the image version is a full semantic version - * that points to one of the supported Apache Airflow versions, or an alias in - * the form of only major or major.minor versions specified. When an alias is - * provided, the server replaces it with the latest Apache Airflow version - * that satisfies the alias and is supported in the given Cloud Composer - * version. - * - * In all cases, the resolved image version is stored in the same field. - * - * See also [version - * list](/composer/docs/concepts/versioning/composer-versions) and [versioning - * overview](/composer/docs/concepts/versioning/composer-versioning-overview). - * @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/v1beta1/environments.check_upgrade.js - * region_tag:composer_v1beta1_generated_Environments_CheckUpgrade_async - */ - checkUpgrade( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - checkUpgrade( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - checkUpgrade( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - checkUpgrade( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ICheckUpgradeRequest, - 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({ - 'environment': request.environment ?? '', - }); - this.initialize(); - return this.innerApiCalls.checkUpgrade(request, options, callback); - } -/** - * Check the status of the long running operation returned by `checkUpgrade()`. - * @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/v1beta1/environments.check_upgrade.js - * region_tag:composer_v1beta1_generated_Environments_CheckUpgrade_async - */ - async checkCheckUpgradeProgress(name: string): Promise>{ - 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.checkUpgrade, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Creates a snapshots of a Cloud Composer environment. - * - * As a result of this operation, snapshot of environment's state is stored - * in a location specified in the SaveSnapshotRequest. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * The resource name of the source environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {string} request.snapshotLocation - * Location in a Cloud Storage where the snapshot is going to be stored, e.g.: - * "gs://my-bucket/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/v1beta1/environments.save_snapshot.js - * region_tag:composer_v1beta1_generated_Environments_SaveSnapshot_async - */ - saveSnapshot( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - saveSnapshot( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - saveSnapshot( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - saveSnapshot( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ISaveSnapshotRequest, - 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({ - 'environment': request.environment ?? '', - }); - this.initialize(); - return this.innerApiCalls.saveSnapshot(request, options, callback); - } -/** - * Check the status of the long running operation returned by `saveSnapshot()`. - * @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/v1beta1/environments.save_snapshot.js - * region_tag:composer_v1beta1_generated_Environments_SaveSnapshot_async - */ - async checkSaveSnapshotProgress(name: string): Promise>{ - 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.saveSnapshot, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Loads a snapshot of a Cloud Composer environment. - * - * As a result of this operation, a snapshot of environment's specified in - * LoadSnapshotRequest is loaded into the environment. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * The resource name of the target environment in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {string} request.snapshotPath - * A Cloud Storage path to a snapshot to load, e.g.: - * "gs://my-bucket/snapshots/project_location_environment_timestamp". - * @param {boolean} request.skipPypiPackagesInstallation - * Whether or not to skip installing Pypi packages when loading the - * environment's state. - * @param {boolean} request.skipEnvironmentVariablesSetting - * Whether or not to skip setting environment variables when loading the - * environment's state. - * @param {boolean} request.skipAirflowOverridesSetting - * Whether or not to skip setting Airflow overrides when loading the - * environment's state. - * @param {boolean} request.skipGcsDataCopying - * Whether or not to skip copying Cloud Storage data when loading the - * environment's state. - * @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/v1beta1/environments.load_snapshot.js - * region_tag:composer_v1beta1_generated_Environments_LoadSnapshot_async - */ - loadSnapshot( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - loadSnapshot( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - loadSnapshot( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - loadSnapshot( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.ILoadSnapshotRequest, - 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({ - 'environment': request.environment ?? '', - }); - this.initialize(); - return this.innerApiCalls.loadSnapshot(request, options, callback); - } -/** - * Check the status of the long running operation returned by `loadSnapshot()`. - * @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/v1beta1/environments.load_snapshot.js - * region_tag:composer_v1beta1_generated_Environments_LoadSnapshot_async - */ - async checkLoadSnapshotProgress(name: string): Promise>{ - 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.loadSnapshot, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } -/** - * Triggers database failover (only for highly resilient environments). - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.environment - * Target environment: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @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/v1beta1/environments.database_failover.js - * region_tag:composer_v1beta1_generated_Environments_DatabaseFailover_async - */ - databaseFailover( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest, - options?: CallOptions): - Promise<[ - LROperation, - protos.google.longrunning.IOperation|undefined, {}|undefined - ]>; - databaseFailover( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest, - options: CallOptions, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - databaseFailover( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest, - callback: Callback< - LROperation, - protos.google.longrunning.IOperation|null|undefined, - {}|null|undefined>): void; - databaseFailover( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IDatabaseFailoverRequest, - 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({ - 'environment': request.environment ?? '', - }); - this.initialize(); - return this.innerApiCalls.databaseFailover(request, options, callback); - } -/** - * Check the status of the long running operation returned by `databaseFailover()`. - * @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/v1beta1/environments.database_failover.js - * region_tag:composer_v1beta1_generated_Environments_DatabaseFailover_async - */ - async checkDatabaseFailoverProgress(name: string): Promise>{ - 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.databaseFailover, this._gaxModule.createDefaultBackoffSettings()); - return decodeOperation as LROperation; - } - /** - * List environments. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of environments to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @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.orchestration.airflow.service.v1beta1.Environment|Environment}. - * 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 `listEnvironmentsAsync()` - * 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. - */ - listEnvironments( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[], - protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse - ]>; - listEnvironments( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment>): void; - listEnvironments( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment>): void; - listEnvironments( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment>, - callback?: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[], - protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsResponse - ]>|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(); - return this.innerApiCalls.listEnvironments(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of environments to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @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.orchestration.airflow.service.v1beta1.Environment|Environment} 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 `listEnvironmentsAsync()` - * 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. - */ - listEnvironmentsStream( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, - 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['listEnvironments']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEnvironments.createStream( - this.innerApiCalls.listEnvironments as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listEnvironments`, 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 - * List environments in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of environments to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @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.orchestration.airflow.service.v1beta1.Environment|Environment}. 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/v1beta1/environments.list_environments.js - * region_tag:composer_v1beta1_generated_Environments_ListEnvironments_async - */ - listEnvironmentsAsync( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListEnvironmentsRequest, - 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['listEnvironments']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listEnvironments.asyncIterate( - this.innerApiCalls['listEnvironments'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists workloads in a Cloud Composer environment. Workload is a unit that - * runs a single Composer component. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The environment name to get workloads for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of environments to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @param {string} [request.filter] - * Optional. The list filter. - * Currently only supports equality on the type field. The value of a field - * specified in the filter expression must be one ComposerWorkloadType enum - * option. It's possible to get multiple types using "OR" operator, e.g.: - * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are - * returned. - * @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.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload|ComposerWorkload}. - * 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 `listWorkloadsAsync()` - * 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. - */ - listWorkloads( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload[], - protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse - ]>; - listWorkloads( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload>): void; - listWorkloads( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload>): void; - listWorkloads( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload>, - callback?: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload[], - protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsResponse - ]>|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(); - return this.innerApiCalls.listWorkloads(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The environment name to get workloads for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of environments to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @param {string} [request.filter] - * Optional. The list filter. - * Currently only supports equality on the type field. The value of a field - * specified in the filter expression must be one ComposerWorkloadType enum - * option. It's possible to get multiple types using "OR" operator, e.g.: - * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are - * returned. - * @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.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload|ComposerWorkload} 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 `listWorkloadsAsync()` - * 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. - */ - listWorkloadsStream( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, - 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['listWorkloads']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listWorkloads.createStream( - this.innerApiCalls.listWorkloads as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listWorkloads`, 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 environment name to get workloads for, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of environments to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @param {string} [request.filter] - * Optional. The list filter. - * Currently only supports equality on the type field. The value of a field - * specified in the filter expression must be one ComposerWorkloadType enum - * option. It's possible to get multiple types using "OR" operator, e.g.: - * "type=SCHEDULER OR type=CELERY_WORKER". If not specified, all items are - * returned. - * @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.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload|ComposerWorkload}. 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/v1beta1/environments.list_workloads.js - * region_tag:composer_v1beta1_generated_Environments_ListWorkloads_async - */ - listWorkloadsAsync( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListWorkloadsRequest, - 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['listWorkloads']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listWorkloads.asyncIterate( - this.innerApiCalls['listWorkloads'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists user workloads Secrets. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. List Secrets in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of Secrets to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @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.orchestration.airflow.service.v1beta1.UserWorkloadsSecret|UserWorkloadsSecret}. - * 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 `listUserWorkloadsSecretsAsync()` - * 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. - */ - listUserWorkloadsSecrets( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret[], - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse - ]>; - listUserWorkloadsSecrets( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret>): void; - listUserWorkloadsSecrets( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret>): void; - listUserWorkloadsSecrets( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret>, - callback?: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret[], - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsResponse - ]>|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(); - return this.innerApiCalls.listUserWorkloadsSecrets(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. List Secrets in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of Secrets to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @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.orchestration.airflow.service.v1beta1.UserWorkloadsSecret|UserWorkloadsSecret} 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 `listUserWorkloadsSecretsAsync()` - * 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. - */ - listUserWorkloadsSecretsStream( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, - 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['listUserWorkloadsSecrets']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listUserWorkloadsSecrets.createStream( - this.innerApiCalls.listUserWorkloadsSecrets as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listUserWorkloadsSecrets`, 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. List Secrets in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of Secrets to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @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.orchestration.airflow.service.v1beta1.UserWorkloadsSecret|UserWorkloadsSecret}. 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/v1beta1/environments.list_user_workloads_secrets.js - * region_tag:composer_v1beta1_generated_Environments_ListUserWorkloadsSecrets_async - */ - listUserWorkloadsSecretsAsync( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsSecretsRequest, - 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['listUserWorkloadsSecrets']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listUserWorkloadsSecrets.asyncIterate( - this.innerApiCalls['listUserWorkloadsSecrets'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - /** - * Lists user workloads ConfigMaps. - * - * This method is supported for Cloud Composer environments in versions - * composer-3.*.*-airflow-*.*.* and newer. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. List ConfigMaps in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of ConfigMaps to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @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.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. - * 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 `listUserWorkloadsConfigMapsAsync()` - * 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. - */ - listUserWorkloadsConfigMaps( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap[], - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse - ]>; - listUserWorkloadsConfigMaps( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap>): void; - listUserWorkloadsConfigMaps( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap>): void; - listUserWorkloadsConfigMaps( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap>, - callback?: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap[], - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsResponse - ]>|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(); - return this.innerApiCalls.listUserWorkloadsConfigMaps(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. List ConfigMaps in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of ConfigMaps to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @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.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap|UserWorkloadsConfigMap} 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 `listUserWorkloadsConfigMapsAsync()` - * 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. - */ - listUserWorkloadsConfigMapsStream( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, - 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['listUserWorkloadsConfigMaps']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listUserWorkloadsConfigMaps.createStream( - this.innerApiCalls.listUserWorkloadsConfigMaps as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listUserWorkloadsConfigMaps`, 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. List ConfigMaps in the given environment, in the form: - * "projects/{projectId}/locations/{locationId}/environments/{environmentId}" - * @param {number} [request.pageSize] - * Optional. The maximum number of ConfigMaps to return. - * @param {string} [request.pageToken] - * Optional. The next_page_token value returned from a previous List request, - * if any. - * @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.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap|UserWorkloadsConfigMap}. 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/v1beta1/environments.list_user_workloads_config_maps.js - * region_tag:composer_v1beta1_generated_Environments_ListUserWorkloadsConfigMaps_async - */ - listUserWorkloadsConfigMapsAsync( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListUserWorkloadsConfigMapsRequest, - 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['listUserWorkloadsConfigMaps']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate( - this.innerApiCalls['listUserWorkloadsConfigMaps'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } -/** - * 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, - options?: - | 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]> { - 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 { - 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, - options?: - | gax.CallOptions - | Callback< - protos.google.protobuf.Empty, - protos.google.longrunning.CancelOperationRequest, - {} | undefined | null - >, - callback?: Callback< - protos.google.longrunning.CancelOperationRequest, - protos.google.protobuf.Empty, - {} | undefined | null - > - ): Promise { - 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, - options?: - | 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 { - return this.operationsClient.deleteOperation(request, options, callback); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified environment resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} environment - * @returns {string} Resource name string. - */ - environmentPath(project:string,location:string,environment:string) { - return this.pathTemplates.environmentPathTemplate.render({ - project: project, - location: location, - environment: environment, - }); - } - - /** - * Parse the project from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).project; - } - - /** - * Parse the location from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).location; - } - - /** - * Parse the environment from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; - } - - /** - * Return a fully-qualified userWorkloadsConfigMap resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} environment - * @param {string} user_workloads_config_map - * @returns {string} Resource name string. - */ - userWorkloadsConfigMapPath(project:string,location:string,environment:string,userWorkloadsConfigMap:string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.render({ - project: project, - location: location, - environment: environment, - user_workloads_config_map: userWorkloadsConfigMap, - }); - } - - /** - * Parse the project from UserWorkloadsConfigMap resource. - * - * @param {string} userWorkloadsConfigMapName - * A fully-qualified path representing UserWorkloadsConfigMap resource. - * @returns {string} A string representing the project. - */ - matchProjectFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).project; - } - - /** - * Parse the location from UserWorkloadsConfigMap resource. - * - * @param {string} userWorkloadsConfigMapName - * A fully-qualified path representing UserWorkloadsConfigMap resource. - * @returns {string} A string representing the location. - */ - matchLocationFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).location; - } - - /** - * Parse the environment from UserWorkloadsConfigMap resource. - * - * @param {string} userWorkloadsConfigMapName - * A fully-qualified path representing UserWorkloadsConfigMap resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).environment; - } - - /** - * Parse the user_workloads_config_map from UserWorkloadsConfigMap resource. - * - * @param {string} userWorkloadsConfigMapName - * A fully-qualified path representing UserWorkloadsConfigMap resource. - * @returns {string} A string representing the user_workloads_config_map. - */ - matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).user_workloads_config_map; - } - - /** - * Return a fully-qualified userWorkloadsSecret resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} environment - * @param {string} user_workloads_secret - * @returns {string} Resource name string. - */ - userWorkloadsSecretPath(project:string,location:string,environment:string,userWorkloadsSecret:string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.render({ - project: project, - location: location, - environment: environment, - user_workloads_secret: userWorkloadsSecret, - }); - } - - /** - * Parse the project from UserWorkloadsSecret resource. - * - * @param {string} userWorkloadsSecretName - * A fully-qualified path representing UserWorkloadsSecret resource. - * @returns {string} A string representing the project. - */ - matchProjectFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).project; - } - - /** - * Parse the location from UserWorkloadsSecret resource. - * - * @param {string} userWorkloadsSecretName - * A fully-qualified path representing UserWorkloadsSecret resource. - * @returns {string} A string representing the location. - */ - matchLocationFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).location; - } - - /** - * Parse the environment from UserWorkloadsSecret resource. - * - * @param {string} userWorkloadsSecretName - * A fully-qualified path representing UserWorkloadsSecret resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).environment; - } - - /** - * Parse the user_workloads_secret from UserWorkloadsSecret resource. - * - * @param {string} userWorkloadsSecretName - * A fully-qualified path representing UserWorkloadsSecret resource. - * @returns {string} A string representing the user_workloads_secret. - */ - matchUserWorkloadsSecretFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).user_workloads_secret; - } - - /** - * 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.environmentsStub && !this._terminated) { - return this.environmentsStub.then(stub => { - this._terminated = true; - stub.close(); - this.operationsClient.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_client_config.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_client_config.json deleted file mode 100644 index 22c8786ee75..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_client_config.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "interfaces": { - "google.cloud.orchestration.airflow.service.v1beta1.Environments": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "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 - } - }, - "methods": { - "CreateEnvironment": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetEnvironment": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListEnvironments": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateEnvironment": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteEnvironment": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "RestartWebServer": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CheckUpgrade": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ExecuteAirflowCommand": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "StopAirflowCommand": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "PollAirflowCommand": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListWorkloads": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateUserWorkloadsSecret": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetUserWorkloadsSecret": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListUserWorkloadsSecrets": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateUserWorkloadsSecret": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteUserWorkloadsSecret": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "CreateUserWorkloadsConfigMap": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetUserWorkloadsConfigMap": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListUserWorkloadsConfigMaps": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "UpdateUserWorkloadsConfigMap": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DeleteUserWorkloadsConfigMap": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "SaveSnapshot": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "LoadSnapshot": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "DatabaseFailover": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "FetchDatabaseProperties": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_proto_list.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_proto_list.json deleted file mode 100644 index c854c306722..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/environments_proto_list.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - "../../protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto", - "../../protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto", - "../../protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto" -] diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/gapic_metadata.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/gapic_metadata.json deleted file mode 100644 index bd6361e3308..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/gapic_metadata.json +++ /dev/null @@ -1,317 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.orchestration.airflow.service.v1beta1", - "libraryPackage": "@google-cloud/orchestration-airflow", - "services": { - "Environments": { - "clients": { - "grpc": { - "libraryClient": "EnvironmentsClient", - "rpcs": { - "GetEnvironment": { - "methods": [ - "getEnvironment" - ] - }, - "ExecuteAirflowCommand": { - "methods": [ - "executeAirflowCommand" - ] - }, - "StopAirflowCommand": { - "methods": [ - "stopAirflowCommand" - ] - }, - "PollAirflowCommand": { - "methods": [ - "pollAirflowCommand" - ] - }, - "CreateUserWorkloadsSecret": { - "methods": [ - "createUserWorkloadsSecret" - ] - }, - "GetUserWorkloadsSecret": { - "methods": [ - "getUserWorkloadsSecret" - ] - }, - "UpdateUserWorkloadsSecret": { - "methods": [ - "updateUserWorkloadsSecret" - ] - }, - "DeleteUserWorkloadsSecret": { - "methods": [ - "deleteUserWorkloadsSecret" - ] - }, - "CreateUserWorkloadsConfigMap": { - "methods": [ - "createUserWorkloadsConfigMap" - ] - }, - "GetUserWorkloadsConfigMap": { - "methods": [ - "getUserWorkloadsConfigMap" - ] - }, - "UpdateUserWorkloadsConfigMap": { - "methods": [ - "updateUserWorkloadsConfigMap" - ] - }, - "DeleteUserWorkloadsConfigMap": { - "methods": [ - "deleteUserWorkloadsConfigMap" - ] - }, - "FetchDatabaseProperties": { - "methods": [ - "fetchDatabaseProperties" - ] - }, - "CreateEnvironment": { - "methods": [ - "createEnvironment" - ] - }, - "UpdateEnvironment": { - "methods": [ - "updateEnvironment" - ] - }, - "DeleteEnvironment": { - "methods": [ - "deleteEnvironment" - ] - }, - "RestartWebServer": { - "methods": [ - "restartWebServer" - ] - }, - "CheckUpgrade": { - "methods": [ - "checkUpgrade" - ] - }, - "SaveSnapshot": { - "methods": [ - "saveSnapshot" - ] - }, - "LoadSnapshot": { - "methods": [ - "loadSnapshot" - ] - }, - "DatabaseFailover": { - "methods": [ - "databaseFailover" - ] - }, - "ListEnvironments": { - "methods": [ - "listEnvironments", - "listEnvironmentsStream", - "listEnvironmentsAsync" - ] - }, - "ListWorkloads": { - "methods": [ - "listWorkloads", - "listWorkloadsStream", - "listWorkloadsAsync" - ] - }, - "ListUserWorkloadsSecrets": { - "methods": [ - "listUserWorkloadsSecrets", - "listUserWorkloadsSecretsStream", - "listUserWorkloadsSecretsAsync" - ] - }, - "ListUserWorkloadsConfigMaps": { - "methods": [ - "listUserWorkloadsConfigMaps", - "listUserWorkloadsConfigMapsStream", - "listUserWorkloadsConfigMapsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "EnvironmentsClient", - "rpcs": { - "GetEnvironment": { - "methods": [ - "getEnvironment" - ] - }, - "ExecuteAirflowCommand": { - "methods": [ - "executeAirflowCommand" - ] - }, - "StopAirflowCommand": { - "methods": [ - "stopAirflowCommand" - ] - }, - "PollAirflowCommand": { - "methods": [ - "pollAirflowCommand" - ] - }, - "CreateUserWorkloadsSecret": { - "methods": [ - "createUserWorkloadsSecret" - ] - }, - "GetUserWorkloadsSecret": { - "methods": [ - "getUserWorkloadsSecret" - ] - }, - "UpdateUserWorkloadsSecret": { - "methods": [ - "updateUserWorkloadsSecret" - ] - }, - "DeleteUserWorkloadsSecret": { - "methods": [ - "deleteUserWorkloadsSecret" - ] - }, - "CreateUserWorkloadsConfigMap": { - "methods": [ - "createUserWorkloadsConfigMap" - ] - }, - "GetUserWorkloadsConfigMap": { - "methods": [ - "getUserWorkloadsConfigMap" - ] - }, - "UpdateUserWorkloadsConfigMap": { - "methods": [ - "updateUserWorkloadsConfigMap" - ] - }, - "DeleteUserWorkloadsConfigMap": { - "methods": [ - "deleteUserWorkloadsConfigMap" - ] - }, - "FetchDatabaseProperties": { - "methods": [ - "fetchDatabaseProperties" - ] - }, - "CreateEnvironment": { - "methods": [ - "createEnvironment" - ] - }, - "UpdateEnvironment": { - "methods": [ - "updateEnvironment" - ] - }, - "DeleteEnvironment": { - "methods": [ - "deleteEnvironment" - ] - }, - "RestartWebServer": { - "methods": [ - "restartWebServer" - ] - }, - "CheckUpgrade": { - "methods": [ - "checkUpgrade" - ] - }, - "SaveSnapshot": { - "methods": [ - "saveSnapshot" - ] - }, - "LoadSnapshot": { - "methods": [ - "loadSnapshot" - ] - }, - "DatabaseFailover": { - "methods": [ - "databaseFailover" - ] - }, - "ListEnvironments": { - "methods": [ - "listEnvironments", - "listEnvironmentsStream", - "listEnvironmentsAsync" - ] - }, - "ListWorkloads": { - "methods": [ - "listWorkloads", - "listWorkloadsStream", - "listWorkloadsAsync" - ] - }, - "ListUserWorkloadsSecrets": { - "methods": [ - "listUserWorkloadsSecrets", - "listUserWorkloadsSecretsStream", - "listUserWorkloadsSecretsAsync" - ] - }, - "ListUserWorkloadsConfigMaps": { - "methods": [ - "listUserWorkloadsConfigMaps", - "listUserWorkloadsConfigMapsStream", - "listUserWorkloadsConfigMapsAsync" - ] - } - } - } - } - }, - "ImageVersions": { - "clients": { - "grpc": { - "libraryClient": "ImageVersionsClient", - "rpcs": { - "ListImageVersions": { - "methods": [ - "listImageVersions", - "listImageVersionsStream", - "listImageVersionsAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "ImageVersionsClient", - "rpcs": { - "ListImageVersions": { - "methods": [ - "listImageVersions", - "listImageVersionsStream", - "listImageVersionsAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_client.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_client.ts deleted file mode 100644 index d7c4ab67d68..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_client.ts +++ /dev/null @@ -1,714 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type {Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback, GaxCall} from 'google-gax'; -import {Transform} from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); - -/** - * Client JSON configuration object, loaded from - * `src/v1beta1/image_versions_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './image_versions_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Readonly service to query available ImageVersions. - * @class - * @memberof v1beta1 - */ -export class ImageVersionsClient { - 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; - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: {[name: string]: Function}; - pathTemplates: {[name: string]: gax.PathTemplate}; - imageVersionsStub?: Promise<{[name: string]: Function}>; - - /** - * Construct an instance of ImageVersionsClient. - * - * @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://developers.google.com/identity/protocols/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 ImageVersionsClient({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 ImageVersionsClient; - 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 = 'composer.' + 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; - } - - // 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 = { - environmentPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/environments/{environment}' - ), - userWorkloadsConfigMapPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsConfigMaps/{user_workloads_config_map}' - ), - userWorkloadsSecretPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/environments/{environment}/userWorkloadsSecrets/{user_workloads_secret}' - ), - }; - - // 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 = { - listImageVersions: - new this._gaxModule.PageDescriptor('pageToken', 'nextPageToken', 'imageVersions') - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.orchestration.airflow.service.v1beta1.ImageVersions', 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.imageVersionsStub) { - return this.imageVersionsStub; - } - - // Put together the "service stub" for - // google.cloud.orchestration.airflow.service.v1beta1.ImageVersions. - this.imageVersionsStub = this._gaxGrpc.createStub( - this._opts.fallback ? - (this._protos as protobuf.Root).lookupService('google.cloud.orchestration.airflow.service.v1beta1.ImageVersions') : - // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.orchestration.airflow.service.v1beta1.ImageVersions, - 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 imageVersionsStubMethods = - ['listImageVersions']; - for (const methodName of imageVersionsStubMethods) { - const callPromise = this.imageVersionsStub.then( - stub => (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error|null|undefined) => () => { - throw err; - }); - - const descriptor = - this.descriptors.page[methodName] || - undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.imageVersionsStub; - } - - /** - * 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 'composer.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 'composer.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 -- - // ------------------- - - /** - * List ImageVersions for provided location. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of image_versions to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @param {boolean} request.includePastReleases - * Whether or not image versions from old releases should be included. - * @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.orchestration.airflow.service.v1beta1.ImageVersion|ImageVersion}. - * 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 `listImageVersionsAsync()` - * 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. - */ - listImageVersions( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, - options?: CallOptions): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[], - protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse - ]>; - listImageVersions( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion>): void; - listImageVersions( - request: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, - callback: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion>): void; - listImageVersions( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, - optionsOrCallback?: CallOptions|PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion>, - callback?: PaginationCallback< - protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse|null|undefined, - protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion>): - Promise<[ - protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[], - protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest|null, - protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsResponse - ]>|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(); - return this.innerApiCalls.listImageVersions(request, options, callback); - } - -/** - * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of image_versions to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @param {boolean} request.includePastReleases - * Whether or not image versions from old releases should be included. - * @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.orchestration.airflow.service.v1beta1.ImageVersion|ImageVersion} 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 `listImageVersionsAsync()` - * 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. - */ - listImageVersionsStream( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, - 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['listImageVersions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listImageVersions.createStream( - this.innerApiCalls.listImageVersions as GaxCall, - request, - callSettings - ); - } - -/** - * Equivalent to `listImageVersions`, 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 - * List ImageVersions in the given project and location, in the form: - * "projects/{projectId}/locations/{locationId}" - * @param {number} request.pageSize - * The maximum number of image_versions to return. - * @param {string} request.pageToken - * The next_page_token value returned from a previous List request, if any. - * @param {boolean} request.includePastReleases - * Whether or not image versions from old releases should be included. - * @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.orchestration.airflow.service.v1beta1.ImageVersion|ImageVersion}. 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/v1beta1/image_versions.list_image_versions.js - * region_tag:composer_v1beta1_generated_ImageVersions_ListImageVersions_async - */ - listImageVersionsAsync( - request?: protos.google.cloud.orchestration.airflow.service.v1beta1.IListImageVersionsRequest, - 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['listImageVersions']; - const callSettings = defaultCallSettings.merge(options); - this.initialize(); - return this.descriptors.page.listImageVersions.asyncIterate( - this.innerApiCalls['listImageVersions'] as GaxCall, - request as {}, - callSettings - ) as AsyncIterable; - } - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified environment resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} environment - * @returns {string} Resource name string. - */ - environmentPath(project:string,location:string,environment:string) { - return this.pathTemplates.environmentPathTemplate.render({ - project: project, - location: location, - environment: environment, - }); - } - - /** - * Parse the project from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the project. - */ - matchProjectFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).project; - } - - /** - * Parse the location from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the location. - */ - matchLocationFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).location; - } - - /** - * Parse the environment from Environment resource. - * - * @param {string} environmentName - * A fully-qualified path representing Environment resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromEnvironmentName(environmentName: string) { - return this.pathTemplates.environmentPathTemplate.match(environmentName).environment; - } - - /** - * Return a fully-qualified userWorkloadsConfigMap resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} environment - * @param {string} user_workloads_config_map - * @returns {string} Resource name string. - */ - userWorkloadsConfigMapPath(project:string,location:string,environment:string,userWorkloadsConfigMap:string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.render({ - project: project, - location: location, - environment: environment, - user_workloads_config_map: userWorkloadsConfigMap, - }); - } - - /** - * Parse the project from UserWorkloadsConfigMap resource. - * - * @param {string} userWorkloadsConfigMapName - * A fully-qualified path representing UserWorkloadsConfigMap resource. - * @returns {string} A string representing the project. - */ - matchProjectFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).project; - } - - /** - * Parse the location from UserWorkloadsConfigMap resource. - * - * @param {string} userWorkloadsConfigMapName - * A fully-qualified path representing UserWorkloadsConfigMap resource. - * @returns {string} A string representing the location. - */ - matchLocationFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).location; - } - - /** - * Parse the environment from UserWorkloadsConfigMap resource. - * - * @param {string} userWorkloadsConfigMapName - * A fully-qualified path representing UserWorkloadsConfigMap resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).environment; - } - - /** - * Parse the user_workloads_config_map from UserWorkloadsConfigMap resource. - * - * @param {string} userWorkloadsConfigMapName - * A fully-qualified path representing UserWorkloadsConfigMap resource. - * @returns {string} A string representing the user_workloads_config_map. - */ - matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(userWorkloadsConfigMapName: string) { - return this.pathTemplates.userWorkloadsConfigMapPathTemplate.match(userWorkloadsConfigMapName).user_workloads_config_map; - } - - /** - * Return a fully-qualified userWorkloadsSecret resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} environment - * @param {string} user_workloads_secret - * @returns {string} Resource name string. - */ - userWorkloadsSecretPath(project:string,location:string,environment:string,userWorkloadsSecret:string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.render({ - project: project, - location: location, - environment: environment, - user_workloads_secret: userWorkloadsSecret, - }); - } - - /** - * Parse the project from UserWorkloadsSecret resource. - * - * @param {string} userWorkloadsSecretName - * A fully-qualified path representing UserWorkloadsSecret resource. - * @returns {string} A string representing the project. - */ - matchProjectFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).project; - } - - /** - * Parse the location from UserWorkloadsSecret resource. - * - * @param {string} userWorkloadsSecretName - * A fully-qualified path representing UserWorkloadsSecret resource. - * @returns {string} A string representing the location. - */ - matchLocationFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).location; - } - - /** - * Parse the environment from UserWorkloadsSecret resource. - * - * @param {string} userWorkloadsSecretName - * A fully-qualified path representing UserWorkloadsSecret resource. - * @returns {string} A string representing the environment. - */ - matchEnvironmentFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).environment; - } - - /** - * Parse the user_workloads_secret from UserWorkloadsSecret resource. - * - * @param {string} userWorkloadsSecretName - * A fully-qualified path representing UserWorkloadsSecret resource. - * @returns {string} A string representing the user_workloads_secret. - */ - matchUserWorkloadsSecretFromUserWorkloadsSecretName(userWorkloadsSecretName: string) { - return this.pathTemplates.userWorkloadsSecretPathTemplate.match(userWorkloadsSecretName).user_workloads_secret; - } - - /** - * 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.imageVersionsStub && !this._terminated) { - return this.imageVersionsStub.then(stub => { - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_client_config.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_client_config.json deleted file mode 100644 index 9db3275858a..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_client_config.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "interfaces": { - "google.cloud.orchestration.airflow.service.v1beta1.ImageVersions": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "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 - } - }, - "methods": { - "ListImageVersions": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_proto_list.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_proto_list.json deleted file mode 100644 index c854c306722..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/image_versions_proto_list.json +++ /dev/null @@ -1,5 +0,0 @@ -[ - "../../protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto", - "../../protos/google/cloud/orchestration/airflow/service/v1beta1/image_versions.proto", - "../../protos/google/cloud/orchestration/airflow/service/v1beta1/operations.proto" -] diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/index.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/index.ts deleted file mode 100644 index 38cec48d623..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/src/v1beta1/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 {EnvironmentsClient} from './environments_client'; -export {ImageVersionsClient} from './image_versions_client'; diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 2ef4b0dcd16..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 service = require('@google-cloud/orchestration-airflow'); - -function main() { - const environmentsClient = new service.EnvironmentsClient(); - const imageVersionsClient = new service.ImageVersionsClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index dd47e569943..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 {EnvironmentsClient, ImageVersionsClient} from '@google-cloud/orchestration-airflow'; - -// check that the client class type name can be used -function doStuffWithEnvironmentsClient(client: EnvironmentsClient) { - client.close(); -} -function doStuffWithImageVersionsClient(client: ImageVersionsClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const environmentsClient = new EnvironmentsClient(); - doStuffWithEnvironmentsClient(environmentsClient); - // check that the client instance can be created - const imageVersionsClient = new ImageVersionsClient(); - doStuffWithImageVersionsClient(imageVersionsClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/install.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/install.ts deleted file mode 100644 index fd5bfdc71d5..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/system-test/install.ts +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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-orchestration-airflow-service/v1beta1/test/gapic_environments_v1beta1.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/test/gapic_environments_v1beta1.ts deleted file mode 100644 index 2f2ea8877bc..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/test/gapic_environments_v1beta1.ts +++ /dev/null @@ -1,4313 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 environmentsModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf, LROperation, operationsProtos} 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('v1beta1.EnvironmentsClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'composer.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient(); - 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 = environmentsModule.v1beta1.EnvironmentsClient.servicePath; - assert.strictEqual(servicePath, 'composer.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = environmentsModule.v1beta1.EnvironmentsClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'composer.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'composer.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'composer.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 environmentsModule.v1beta1.EnvironmentsClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'composer.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 environmentsModule.v1beta1.EnvironmentsClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'composer.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 environmentsModule.v1beta1.EnvironmentsClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = environmentsModule.v1beta1.EnvironmentsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.environmentsStub, undefined); - await client.initialize(); - assert(client.environmentsStub); - }); - - it('has close method for the initialized client', done => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.environmentsStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.environmentsStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - 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 environmentsModule.v1beta1.EnvironmentsClient({ - 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('getEnvironment', () => { - it('invokes getEnvironment without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() - ); - client.innerApiCalls.getEnvironment = stubSimpleCall(expectedResponse); - const [response] = await client.getEnvironment(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEnvironment without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment() - ); - client.innerApiCalls.getEnvironment = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getEnvironment( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEnvironment with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getEnvironment = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getEnvironment(request), expectedError); - const actualRequest = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getEnvironment with closed client', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getEnvironment(request), expectedError); - }); - }); - - describe('executeAirflowCommand', () => { - it('invokes executeAirflowCommand without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse() - ); - client.innerApiCalls.executeAirflowCommand = stubSimpleCall(expectedResponse); - const [response] = await client.executeAirflowCommand(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.executeAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeAirflowCommand without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandResponse() - ); - client.innerApiCalls.executeAirflowCommand = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.executeAirflowCommand( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IExecuteAirflowCommandResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.executeAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeAirflowCommand with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.executeAirflowCommand = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.executeAirflowCommand(request), expectedError); - const actualRequest = (client.innerApiCalls.executeAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.executeAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes executeAirflowCommand with closed client', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ExecuteAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.executeAirflowCommand(request), expectedError); - }); - }); - - describe('stopAirflowCommand', () => { - it('invokes stopAirflowCommand without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse() - ); - client.innerApiCalls.stopAirflowCommand = stubSimpleCall(expectedResponse); - const [response] = await client.stopAirflowCommand(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.stopAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.stopAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes stopAirflowCommand without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandResponse() - ); - client.innerApiCalls.stopAirflowCommand = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.stopAirflowCommand( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IStopAirflowCommandResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.stopAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.stopAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes stopAirflowCommand with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.stopAirflowCommand = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.stopAirflowCommand(request), expectedError); - const actualRequest = (client.innerApiCalls.stopAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.stopAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes stopAirflowCommand with closed client', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.StopAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.stopAirflowCommand(request), expectedError); - }); - }); - - describe('pollAirflowCommand', () => { - it('invokes pollAirflowCommand without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse() - ); - client.innerApiCalls.pollAirflowCommand = stubSimpleCall(expectedResponse); - const [response] = await client.pollAirflowCommand(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.pollAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.pollAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes pollAirflowCommand without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandResponse() - ); - client.innerApiCalls.pollAirflowCommand = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.pollAirflowCommand( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IPollAirflowCommandResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.pollAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.pollAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes pollAirflowCommand with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.pollAirflowCommand = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.pollAirflowCommand(request), expectedError); - const actualRequest = (client.innerApiCalls.pollAirflowCommand as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.pollAirflowCommand as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes pollAirflowCommand with closed client', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.PollAirflowCommandRequest', ['environment']); - request.environment = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.pollAirflowCommand(request), expectedError); - }); - }); - - describe('createUserWorkloadsSecret', () => { - it('invokes createUserWorkloadsSecret without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret() - ); - client.innerApiCalls.createUserWorkloadsSecret = stubSimpleCall(expectedResponse); - const [response] = await client.createUserWorkloadsSecret(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createUserWorkloadsSecret without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret() - ); - client.innerApiCalls.createUserWorkloadsSecret = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createUserWorkloadsSecret( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createUserWorkloadsSecret with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createUserWorkloadsSecret = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createUserWorkloadsSecret(request), expectedError); - const actualRequest = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createUserWorkloadsSecret with closed client', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsSecretRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createUserWorkloadsSecret(request), expectedError); - }); - }); - - describe('getUserWorkloadsSecret', () => { - it('invokes getUserWorkloadsSecret without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret() - ); - client.innerApiCalls.getUserWorkloadsSecret = stubSimpleCall(expectedResponse); - const [response] = await client.getUserWorkloadsSecret(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getUserWorkloadsSecret without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret() - ); - client.innerApiCalls.getUserWorkloadsSecret = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getUserWorkloadsSecret( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getUserWorkloadsSecret with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getUserWorkloadsSecret = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getUserWorkloadsSecret(request), expectedError); - const actualRequest = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getUserWorkloadsSecret with closed client', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsSecretRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getUserWorkloadsSecret(request), expectedError); - }); - }); - - describe('updateUserWorkloadsSecret', () => { - it('invokes updateUserWorkloadsSecret without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest() - ); - request.userWorkloadsSecret ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest', ['userWorkloadsSecret', 'name']); - request.userWorkloadsSecret.name = defaultValue1; - const expectedHeaderRequestParams = `user_workloads_secret.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret() - ); - client.innerApiCalls.updateUserWorkloadsSecret = stubSimpleCall(expectedResponse); - const [response] = await client.updateUserWorkloadsSecret(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateUserWorkloadsSecret without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest() - ); - request.userWorkloadsSecret ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest', ['userWorkloadsSecret', 'name']); - request.userWorkloadsSecret.name = defaultValue1; - const expectedHeaderRequestParams = `user_workloads_secret.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret() - ); - client.innerApiCalls.updateUserWorkloadsSecret = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateUserWorkloadsSecret( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateUserWorkloadsSecret with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest() - ); - request.userWorkloadsSecret ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest', ['userWorkloadsSecret', 'name']); - request.userWorkloadsSecret.name = defaultValue1; - const expectedHeaderRequestParams = `user_workloads_secret.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateUserWorkloadsSecret = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateUserWorkloadsSecret(request), expectedError); - const actualRequest = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateUserWorkloadsSecret with closed client', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest() - ); - request.userWorkloadsSecret ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsSecretRequest', ['userWorkloadsSecret', 'name']); - request.userWorkloadsSecret.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateUserWorkloadsSecret(request), expectedError); - }); - }); - - describe('deleteUserWorkloadsSecret', () => { - it('invokes deleteUserWorkloadsSecret without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteUserWorkloadsSecret = stubSimpleCall(expectedResponse); - const [response] = await client.deleteUserWorkloadsSecret(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteUserWorkloadsSecret without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteUserWorkloadsSecret = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteUserWorkloadsSecret( - request, - (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteUserWorkloadsSecret with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteUserWorkloadsSecret = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteUserWorkloadsSecret(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsSecret as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteUserWorkloadsSecret with closed client', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsSecretRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteUserWorkloadsSecret(request), expectedError); - }); - }); - - describe('createUserWorkloadsConfigMap', () => { - it('invokes createUserWorkloadsConfigMap without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap() - ); - client.innerApiCalls.createUserWorkloadsConfigMap = stubSimpleCall(expectedResponse); - const [response] = await client.createUserWorkloadsConfigMap(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createUserWorkloadsConfigMap without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap() - ); - client.innerApiCalls.createUserWorkloadsConfigMap = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createUserWorkloadsConfigMap( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createUserWorkloadsConfigMap with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createUserWorkloadsConfigMap = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.createUserWorkloadsConfigMap(request), expectedError); - const actualRequest = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createUserWorkloadsConfigMap with closed client', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateUserWorkloadsConfigMapRequest', ['parent']); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.createUserWorkloadsConfigMap(request), expectedError); - }); - }); - - describe('getUserWorkloadsConfigMap', () => { - it('invokes getUserWorkloadsConfigMap without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap() - ); - client.innerApiCalls.getUserWorkloadsConfigMap = stubSimpleCall(expectedResponse); - const [response] = await client.getUserWorkloadsConfigMap(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getUserWorkloadsConfigMap without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap() - ); - client.innerApiCalls.getUserWorkloadsConfigMap = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getUserWorkloadsConfigMap( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getUserWorkloadsConfigMap with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getUserWorkloadsConfigMap = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.getUserWorkloadsConfigMap(request), expectedError); - const actualRequest = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.getUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getUserWorkloadsConfigMap with closed client', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.GetUserWorkloadsConfigMapRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.getUserWorkloadsConfigMap(request), expectedError); - }); - }); - - describe('updateUserWorkloadsConfigMap', () => { - it('invokes updateUserWorkloadsConfigMap without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest() - ); - request.userWorkloadsConfigMap ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest', ['userWorkloadsConfigMap', 'name']); - request.userWorkloadsConfigMap.name = defaultValue1; - const expectedHeaderRequestParams = `user_workloads_config_map.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap() - ); - client.innerApiCalls.updateUserWorkloadsConfigMap = stubSimpleCall(expectedResponse); - const [response] = await client.updateUserWorkloadsConfigMap(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateUserWorkloadsConfigMap without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest() - ); - request.userWorkloadsConfigMap ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest', ['userWorkloadsConfigMap', 'name']); - request.userWorkloadsConfigMap.name = defaultValue1; - const expectedHeaderRequestParams = `user_workloads_config_map.name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap() - ); - client.innerApiCalls.updateUserWorkloadsConfigMap = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateUserWorkloadsConfigMap( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateUserWorkloadsConfigMap with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest() - ); - request.userWorkloadsConfigMap ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest', ['userWorkloadsConfigMap', 'name']); - request.userWorkloadsConfigMap.name = defaultValue1; - const expectedHeaderRequestParams = `user_workloads_config_map.name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateUserWorkloadsConfigMap = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.updateUserWorkloadsConfigMap(request), expectedError); - const actualRequest = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateUserWorkloadsConfigMap with closed client', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest() - ); - request.userWorkloadsConfigMap ??= {}; - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateUserWorkloadsConfigMapRequest', ['userWorkloadsConfigMap', 'name']); - request.userWorkloadsConfigMap.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.updateUserWorkloadsConfigMap(request), expectedError); - }); - }); - - describe('deleteUserWorkloadsConfigMap', () => { - it('invokes deleteUserWorkloadsConfigMap without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteUserWorkloadsConfigMap = stubSimpleCall(expectedResponse); - const [response] = await client.deleteUserWorkloadsConfigMap(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteUserWorkloadsConfigMap without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty() - ); - client.innerApiCalls.deleteUserWorkloadsConfigMap = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteUserWorkloadsConfigMap( - request, - (err?: Error|null, result?: protos.google.protobuf.IEmpty|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteUserWorkloadsConfigMap with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteUserWorkloadsConfigMap = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.deleteUserWorkloadsConfigMap(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteUserWorkloadsConfigMap as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteUserWorkloadsConfigMap with closed client', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteUserWorkloadsConfigMapRequest', ['name']); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.deleteUserWorkloadsConfigMap(request), expectedError); - }); - }); - - describe('fetchDatabaseProperties', () => { - it('invokes fetchDatabaseProperties without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse() - ); - client.innerApiCalls.fetchDatabaseProperties = stubSimpleCall(expectedResponse); - const [response] = await client.fetchDatabaseProperties(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchDatabaseProperties without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesResponse() - ); - client.innerApiCalls.fetchDatabaseProperties = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.fetchDatabaseProperties( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IFetchDatabasePropertiesResponse|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchDatabaseProperties with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.fetchDatabaseProperties = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.fetchDatabaseProperties(request), expectedError); - const actualRequest = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.fetchDatabaseProperties as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes fetchDatabaseProperties with closed client', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.FetchDatabasePropertiesRequest', ['environment']); - request.environment = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close(); - await assert.rejects(client.fetchDatabaseProperties(request), expectedError); - }); - }); - - describe('createEnvironment', () => { - it('invokes createEnvironment without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createEnvironment = stubLongRunningCall(expectedResponse); - const [operation] = await client.createEnvironment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEnvironment without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.createEnvironment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createEnvironment( - 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.createEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEnvironment with call error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEnvironment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.createEnvironment(request), expectedError); - const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createEnvironment with LRO error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CreateEnvironmentRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createEnvironment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.createEnvironment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.createEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCreateEnvironmentProgress without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.checkCreateEnvironmentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCreateEnvironmentProgress with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCreateEnvironmentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('updateEnvironment', () => { - it('invokes updateEnvironment without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateEnvironment = stubLongRunningCall(expectedResponse); - const [operation] = await client.updateEnvironment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEnvironment without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.updateEnvironment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.updateEnvironment( - 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.updateEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEnvironment with call error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEnvironment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.updateEnvironment(request), expectedError); - const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes updateEnvironment with LRO error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.UpdateEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.updateEnvironment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.updateEnvironment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.updateEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpdateEnvironmentProgress without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.checkUpdateEnvironmentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkUpdateEnvironmentProgress with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkUpdateEnvironmentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('deleteEnvironment', () => { - it('invokes deleteEnvironment without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteEnvironment = stubLongRunningCall(expectedResponse); - const [operation] = await client.deleteEnvironment(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEnvironment without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.deleteEnvironment = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteEnvironment( - 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.deleteEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEnvironment with call error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEnvironment = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.deleteEnvironment(request), expectedError); - const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteEnvironment with LRO error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DeleteEnvironmentRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteEnvironment = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.deleteEnvironment(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.deleteEnvironment as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDeleteEnvironmentProgress without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.checkDeleteEnvironmentProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDeleteEnvironmentProgress with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDeleteEnvironmentProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('restartWebServer', () => { - it('invokes restartWebServer without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.restartWebServer = stubLongRunningCall(expectedResponse); - const [operation] = await client.restartWebServer(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.restartWebServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restartWebServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes restartWebServer without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.restartWebServer = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.restartWebServer( - 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.restartWebServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restartWebServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes restartWebServer with call error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.restartWebServer = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.restartWebServer(request), expectedError); - const actualRequest = (client.innerApiCalls.restartWebServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restartWebServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes restartWebServer with LRO error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.RestartWebServerRequest', ['name']); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.restartWebServer = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.restartWebServer(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.restartWebServer as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.restartWebServer as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkRestartWebServerProgress without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.checkRestartWebServerProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkRestartWebServerProgress with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkRestartWebServerProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('checkUpgrade', () => { - it('invokes checkUpgrade without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.checkUpgrade = stubLongRunningCall(expectedResponse); - const [operation] = await client.checkUpgrade(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpgrade without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.checkUpgrade = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.checkUpgrade( - 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.checkUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpgrade with call error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.checkUpgrade = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.checkUpgrade(request), expectedError); - const actualRequest = (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkUpgrade with LRO error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.CheckUpgradeRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.checkUpgrade = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.checkUpgrade(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.checkUpgrade as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkCheckUpgradeProgress without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.checkCheckUpgradeProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkCheckUpgradeProgress with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkCheckUpgradeProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('saveSnapshot', () => { - it('invokes saveSnapshot without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.saveSnapshot = stubLongRunningCall(expectedResponse); - const [operation] = await client.saveSnapshot(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.saveSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.saveSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes saveSnapshot without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.saveSnapshot = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.saveSnapshot( - 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.saveSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.saveSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes saveSnapshot with call error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.saveSnapshot = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.saveSnapshot(request), expectedError); - const actualRequest = (client.innerApiCalls.saveSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.saveSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes saveSnapshot with LRO error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.SaveSnapshotRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.saveSnapshot = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.saveSnapshot(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.saveSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.saveSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkSaveSnapshotProgress without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.checkSaveSnapshotProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkSaveSnapshotProgress with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkSaveSnapshotProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('loadSnapshot', () => { - it('invokes loadSnapshot without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.loadSnapshot = stubLongRunningCall(expectedResponse); - const [operation] = await client.loadSnapshot(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.loadSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.loadSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes loadSnapshot without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.loadSnapshot = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.loadSnapshot( - 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.loadSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.loadSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes loadSnapshot with call error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.loadSnapshot = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.loadSnapshot(request), expectedError); - const actualRequest = (client.innerApiCalls.loadSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.loadSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes loadSnapshot with LRO error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.LoadSnapshotRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.loadSnapshot = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.loadSnapshot(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.loadSnapshot as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.loadSnapshot as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkLoadSnapshotProgress without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.checkLoadSnapshotProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkLoadSnapshotProgress with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkLoadSnapshotProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('databaseFailover', () => { - it('invokes databaseFailover without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.databaseFailover = stubLongRunningCall(expectedResponse); - const [operation] = await client.databaseFailover(request); - const [response] = await operation.promise(); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.databaseFailover as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.databaseFailover as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes databaseFailover without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedResponse = generateSampleMessage( - new protos.google.longrunning.Operation() - ); - client.innerApiCalls.databaseFailover = stubLongRunningCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.databaseFailover( - 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.databaseFailover as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.databaseFailover as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes databaseFailover with call error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.databaseFailover = stubLongRunningCall(undefined, expectedError); - await assert.rejects(client.databaseFailover(request), expectedError); - const actualRequest = (client.innerApiCalls.databaseFailover as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.databaseFailover as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes databaseFailover with LRO error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.DatabaseFailoverRequest', ['environment']); - request.environment = defaultValue1; - const expectedHeaderRequestParams = `environment=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.databaseFailover = stubLongRunningCall(undefined, undefined, expectedError); - const [operation] = await client.databaseFailover(request); - await assert.rejects(operation.promise(), expectedError); - const actualRequest = (client.innerApiCalls.databaseFailover as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.databaseFailover as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes checkDatabaseFailoverProgress without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.checkDatabaseFailoverProgress(expectedResponse.name); - assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); - assert(decodedOperation.metadata); - assert((client.operationsClient.getOperation as SinonStub).getCall(0)); - }); - - it('invokes checkDatabaseFailoverProgress with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const expectedError = new Error('expected'); - - client.operationsClient.getOperation = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.checkDatabaseFailoverProgress(''), expectedError); - assert((client.operationsClient.getOperation as SinonStub) - .getCall(0)); - }); - }); - - describe('listEnvironments', () => { - it('invokes listEnvironments without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), - ]; - client.innerApiCalls.listEnvironments = stubSimpleCall(expectedResponse); - const [response] = await client.listEnvironments(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEnvironments without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), - ]; - client.innerApiCalls.listEnvironments = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listEnvironments( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEnvironments with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listEnvironments = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listEnvironments(request), expectedError); - const actualRequest = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listEnvironments as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listEnvironmentsStream without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), - ]; - client.descriptors.page.listEnvironments.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listEnvironmentsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.Environment[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.Environment) => { - 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.listEnvironments.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listEnvironments, request)); - assert( - (client.descriptors.page.listEnvironments.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listEnvironmentsStream with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEnvironments.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listEnvironmentsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.Environment[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.Environment) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listEnvironments.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listEnvironments, request)); - assert( - (client.descriptors.page.listEnvironments.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEnvironments without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.Environment()), - ]; - client.descriptors.page.listEnvironments.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[] = []; - const iterable = client.listEnvironmentsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listEnvironments with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListEnvironmentsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listEnvironments.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listEnvironmentsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IEnvironment[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listEnvironments.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listWorkloads', () => { - it('invokes listWorkloads without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), - ]; - client.innerApiCalls.listWorkloads = stubSimpleCall(expectedResponse); - const [response] = await client.listWorkloads(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listWorkloads as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listWorkloads as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listWorkloads without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), - ]; - client.innerApiCalls.listWorkloads = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listWorkloads( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listWorkloads as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listWorkloads as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listWorkloads with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listWorkloads = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listWorkloads(request), expectedError); - const actualRequest = (client.innerApiCalls.listWorkloads as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listWorkloads as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listWorkloadsStream without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), - ]; - client.descriptors.page.listWorkloads.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listWorkloadsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload) => { - 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.listWorkloads.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listWorkloads, request)); - assert( - (client.descriptors.page.listWorkloads.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listWorkloadsStream with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listWorkloads.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listWorkloadsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listWorkloads.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listWorkloads, request)); - assert( - (client.descriptors.page.listWorkloads.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listWorkloads without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.ComposerWorkload()), - ]; - client.descriptors.page.listWorkloads.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload[] = []; - const iterable = client.listWorkloadsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listWorkloads.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listWorkloads.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listWorkloads with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listWorkloads.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listWorkloadsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.ListWorkloadsResponse.IComposerWorkload[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listWorkloads.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listWorkloads.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listUserWorkloadsSecrets', () => { - it('invokes listUserWorkloadsSecrets without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), - ]; - client.innerApiCalls.listUserWorkloadsSecrets = stubSimpleCall(expectedResponse); - const [response] = await client.listUserWorkloadsSecrets(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUserWorkloadsSecrets without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), - ]; - client.innerApiCalls.listUserWorkloadsSecrets = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listUserWorkloadsSecrets( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUserWorkloadsSecrets with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listUserWorkloadsSecrets = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listUserWorkloadsSecrets(request), expectedError); - const actualRequest = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsSecrets as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUserWorkloadsSecretsStream without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), - ]; - client.descriptors.page.listUserWorkloadsSecrets.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listUserWorkloadsSecretsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret) => { - 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.listUserWorkloadsSecrets.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listUserWorkloadsSecrets, request)); - assert( - (client.descriptors.page.listUserWorkloadsSecrets.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listUserWorkloadsSecretsStream with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listUserWorkloadsSecrets.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listUserWorkloadsSecretsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listUserWorkloadsSecrets.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listUserWorkloadsSecrets, request)); - assert( - (client.descriptors.page.listUserWorkloadsSecrets.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listUserWorkloadsSecrets without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsSecret()), - ]; - client.descriptors.page.listUserWorkloadsSecrets.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret[] = []; - const iterable = client.listUserWorkloadsSecretsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listUserWorkloadsSecrets.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listUserWorkloadsSecrets.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listUserWorkloadsSecrets with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsSecretsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listUserWorkloadsSecrets.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listUserWorkloadsSecretsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsSecret[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listUserWorkloadsSecrets.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listUserWorkloadsSecrets.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('listUserWorkloadsConfigMaps', () => { - it('invokes listUserWorkloadsConfigMaps without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), - ]; - client.innerApiCalls.listUserWorkloadsConfigMaps = stubSimpleCall(expectedResponse); - const [response] = await client.listUserWorkloadsConfigMaps(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUserWorkloadsConfigMaps without error using callback', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), - ]; - client.innerApiCalls.listUserWorkloadsConfigMaps = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listUserWorkloadsConfigMaps( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUserWorkloadsConfigMaps with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listUserWorkloadsConfigMaps = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listUserWorkloadsConfigMaps(request), expectedError); - const actualRequest = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listUserWorkloadsConfigMaps as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listUserWorkloadsConfigMapsStream without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), - ]; - client.descriptors.page.listUserWorkloadsConfigMaps.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listUserWorkloadsConfigMapsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap) => { - 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.listUserWorkloadsConfigMaps.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listUserWorkloadsConfigMaps, request)); - assert( - (client.descriptors.page.listUserWorkloadsConfigMaps.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listUserWorkloadsConfigMapsStream with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listUserWorkloadsConfigMaps.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listUserWorkloadsConfigMapsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listUserWorkloadsConfigMaps.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listUserWorkloadsConfigMaps, request)); - assert( - (client.descriptors.page.listUserWorkloadsConfigMaps.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listUserWorkloadsConfigMaps without error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.UserWorkloadsConfigMap()), - ]; - client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap[] = []; - const iterable = client.listUserWorkloadsConfigMapsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listUserWorkloadsConfigMaps with error', async () => { - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListUserWorkloadsConfigMapsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listUserWorkloadsConfigMapsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IUserWorkloadsConfigMap[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listUserWorkloadsConfigMaps.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listUserWorkloadsConfigMaps.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 environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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 environmentsModule.v1beta1.EnvironmentsClient({ - 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); - } - }); - }); - 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 environmentsModule.v1beta1.EnvironmentsClient({ - 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 environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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 environmentsModule.v1beta1.EnvironmentsClient({ - 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); - } - }); - }); - 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 environmentsModule.v1beta1.EnvironmentsClient({ - 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 environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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 environmentsModule.v1beta1.EnvironmentsClient({ - 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); - } - }); - }); - 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 environmentsModule.v1beta1.EnvironmentsClient({ - 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 environmentsModule.v1beta1.EnvironmentsClient({ - 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.ListOperationsResponse[] = []; - 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 environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - 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.ListOperationsResponse[] = []; - 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('environment', () => { - const fakePath = "/rendered/path/environment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - environment: "environmentValue", - }; - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.environmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.environmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('environmentPath', () => { - const result = client.environmentPath("projectValue", "locationValue", "environmentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEnvironmentName', () => { - const result = client.matchProjectFromEnvironmentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEnvironmentName', () => { - const result = client.matchLocationFromEnvironmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromEnvironmentName', () => { - const result = client.matchEnvironmentFromEnvironmentName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('userWorkloadsConfigMap', () => { - const fakePath = "/rendered/path/userWorkloadsConfigMap"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - environment: "environmentValue", - user_workloads_config_map: "userWorkloadsConfigMapValue", - }; - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.userWorkloadsConfigMapPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.userWorkloadsConfigMapPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('userWorkloadsConfigMapPath', () => { - const result = client.userWorkloadsConfigMapPath("projectValue", "locationValue", "environmentValue", "userWorkloadsConfigMapValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromUserWorkloadsConfigMapName', () => { - const result = client.matchProjectFromUserWorkloadsConfigMapName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromUserWorkloadsConfigMapName', () => { - const result = client.matchLocationFromUserWorkloadsConfigMapName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromUserWorkloadsConfigMapName', () => { - const result = client.matchEnvironmentFromUserWorkloadsConfigMapName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName', () => { - const result = client.matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(fakePath); - assert.strictEqual(result, "userWorkloadsConfigMapValue"); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('userWorkloadsSecret', () => { - const fakePath = "/rendered/path/userWorkloadsSecret"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - environment: "environmentValue", - user_workloads_secret: "userWorkloadsSecretValue", - }; - const client = new environmentsModule.v1beta1.EnvironmentsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.userWorkloadsSecretPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.userWorkloadsSecretPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('userWorkloadsSecretPath', () => { - const result = client.userWorkloadsSecretPath("projectValue", "locationValue", "environmentValue", "userWorkloadsSecretValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromUserWorkloadsSecretName', () => { - const result = client.matchProjectFromUserWorkloadsSecretName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromUserWorkloadsSecretName', () => { - const result = client.matchLocationFromUserWorkloadsSecretName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromUserWorkloadsSecretName', () => { - const result = client.matchEnvironmentFromUserWorkloadsSecretName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchUserWorkloadsSecretFromUserWorkloadsSecretName', () => { - const result = client.matchUserWorkloadsSecretFromUserWorkloadsSecretName(fakePath); - assert.strictEqual(result, "userWorkloadsSecretValue"); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/test/gapic_image_versions_v1beta1.ts b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/test/gapic_image_versions_v1beta1.ts deleted file mode 100644 index 80b42ab2683..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/test/gapic_image_versions_v1beta1.ts +++ /dev/null @@ -1,663 +0,0 @@ -// Copyright 2024 Google LLC -// -// Licensed under the Apache License, Version 2.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 imageversionsModule from '../src'; - -import {PassThrough} from 'stream'; - -import {protobuf} from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON(require('../protos/protos.json')).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = (instance.constructor as typeof protobuf.Message) - .toObject(instance as protobuf.Message, {defaults: true}); - return (instance.constructor as typeof protobuf.Message).fromObject(filledObject) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error ? sinon.stub().rejects(error) : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback(response?: ResponseType, error?: Error) { - return error ? sinon.stub().callsArgWith(2, error) : sinon.stub().callsArgWith(2, null, response); -} - -function stubPageStreamingCall(responses?: ResponseType[], error?: Error) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error ? sinon.stub().callsArgWith(2, error) : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { mockStream.write({}); }); - } - setImmediate(() => { mockStream.end(); }); - } else { - setImmediate(() => { mockStream.write({}); }); - setImmediate(() => { mockStream.end(); }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall(responses?: ResponseType[], error?: Error) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({done: true, value: undefined}); - } - return Promise.resolve({done: false, value: responses![counter++]}); - } - }; - } - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v1beta1.ImageVersionsClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'composer.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient(); - 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 = imageversionsModule.v1beta1.ImageVersionsClient.servicePath; - assert.strictEqual(servicePath, 'composer.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = imageversionsModule.v1beta1.ImageVersionsClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'composer.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({universeDomain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'composer.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({universe_domain: 'example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'composer.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 imageversionsModule.v1beta1.ImageVersionsClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'composer.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 imageversionsModule.v1beta1.ImageVersionsClient({universeDomain: 'configured.example.com'}); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'composer.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 imageversionsModule.v1beta1.ImageVersionsClient({universe_domain: 'example.com', universeDomain: 'example.net'}); }); - }); - - it('has port', () => { - const port = imageversionsModule.v1beta1.ImageVersionsClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.imageVersionsStub, undefined); - await client.initialize(); - assert(client.imageVersionsStub); - }); - - it('has close method for the initialized client', done => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - assert(client.imageVersionsStub); - client.close().then(() => { - done(); - }); - }); - - it('has close method for the non-initialized client', done => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - assert.strictEqual(client.imageVersionsStub, undefined); - client.close().then(() => { - done(); - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - 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 imageversionsModule.v1beta1.ImageVersionsClient({ - 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('listImageVersions', () => { - it('invokes listImageVersions without error', async () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), - ]; - client.innerApiCalls.listImageVersions = stubSimpleCall(expectedResponse); - const [response] = await client.listImageVersions(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listImageVersions without error using callback', async () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`;const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), - ]; - client.innerApiCalls.listImageVersions = stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listImageVersions( - request, - (err?: Error|null, result?: protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[]|null) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listImageVersions with error', async () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listImageVersions = stubSimpleCall(undefined, expectedError); - await assert.rejects(client.listImageVersions(request), expectedError); - const actualRequest = (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = (client.innerApiCalls.listImageVersions as SinonStub) - .getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listImageVersionsStream without error', async () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), - ]; - client.descriptors.page.listImageVersions.createStream = stubPageStreamingCall(expectedResponse); - const stream = client.listImageVersionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion) => { - 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.listImageVersions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listImageVersions, request)); - assert( - (client.descriptors.page.listImageVersions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('invokes listImageVersionsStream with error', async () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listImageVersions.createStream = stubPageStreamingCall(undefined, expectedError); - const stream = client.listImageVersionsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion[] = []; - stream.on('data', (response: protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion) => { - responses.push(response); - }); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert((client.descriptors.page.listImageVersions.createStream as SinonStub) - .getCall(0).calledWith(client.innerApiCalls.listImageVersions, request)); - assert( - (client.descriptors.page.listImageVersions.createStream as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listImageVersions without error', async () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), - generateSampleMessage(new protos.google.cloud.orchestration.airflow.service.v1beta1.ImageVersion()), - ]; - client.descriptors.page.listImageVersions.asyncIterate = stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[] = []; - const iterable = client.listImageVersionsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - - it('uses async iteration with listImageVersions with error', async () => { - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest() - ); - const defaultValue1 = - getTypeDefaultValue('.google.cloud.orchestration.airflow.service.v1beta1.ListImageVersionsRequest', ['parent']); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedError = new Error('expected'); - client.descriptors.page.listImageVersions.asyncIterate = stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listImageVersionsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.orchestration.airflow.service.v1beta1.IImageVersion[] = []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) - .getCall(0).args[1], request); - assert( - (client.descriptors.page.listImageVersions.asyncIterate as SinonStub) - .getCall(0).args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams - ) - ); - }); - }); - - describe('Path templates', () => { - - describe('environment', () => { - const fakePath = "/rendered/path/environment"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - environment: "environmentValue", - }; - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.environmentPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.environmentPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('environmentPath', () => { - const result = client.environmentPath("projectValue", "locationValue", "environmentValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.environmentPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromEnvironmentName', () => { - const result = client.matchProjectFromEnvironmentName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromEnvironmentName', () => { - const result = client.matchLocationFromEnvironmentName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromEnvironmentName', () => { - const result = client.matchEnvironmentFromEnvironmentName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.environmentPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('userWorkloadsConfigMap', () => { - const fakePath = "/rendered/path/userWorkloadsConfigMap"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - environment: "environmentValue", - user_workloads_config_map: "userWorkloadsConfigMapValue", - }; - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.userWorkloadsConfigMapPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.userWorkloadsConfigMapPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('userWorkloadsConfigMapPath', () => { - const result = client.userWorkloadsConfigMapPath("projectValue", "locationValue", "environmentValue", "userWorkloadsConfigMapValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromUserWorkloadsConfigMapName', () => { - const result = client.matchProjectFromUserWorkloadsConfigMapName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromUserWorkloadsConfigMapName', () => { - const result = client.matchLocationFromUserWorkloadsConfigMapName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromUserWorkloadsConfigMapName', () => { - const result = client.matchEnvironmentFromUserWorkloadsConfigMapName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName', () => { - const result = client.matchUserWorkloadsConfigMapFromUserWorkloadsConfigMapName(fakePath); - assert.strictEqual(result, "userWorkloadsConfigMapValue"); - assert((client.pathTemplates.userWorkloadsConfigMapPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - - describe('userWorkloadsSecret', () => { - const fakePath = "/rendered/path/userWorkloadsSecret"; - const expectedParameters = { - project: "projectValue", - location: "locationValue", - environment: "environmentValue", - user_workloads_secret: "userWorkloadsSecretValue", - }; - const client = new imageversionsModule.v1beta1.ImageVersionsClient({ - credentials: {client_email: 'bogus', private_key: 'bogus'}, - projectId: 'bogus', - }); - client.initialize(); - client.pathTemplates.userWorkloadsSecretPathTemplate.render = - sinon.stub().returns(fakePath); - client.pathTemplates.userWorkloadsSecretPathTemplate.match = - sinon.stub().returns(expectedParameters); - - it('userWorkloadsSecretPath', () => { - const result = client.userWorkloadsSecretPath("projectValue", "locationValue", "environmentValue", "userWorkloadsSecretValue"); - assert.strictEqual(result, fakePath); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.render as SinonStub) - .getCall(-1).calledWith(expectedParameters)); - }); - - it('matchProjectFromUserWorkloadsSecretName', () => { - const result = client.matchProjectFromUserWorkloadsSecretName(fakePath); - assert.strictEqual(result, "projectValue"); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchLocationFromUserWorkloadsSecretName', () => { - const result = client.matchLocationFromUserWorkloadsSecretName(fakePath); - assert.strictEqual(result, "locationValue"); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchEnvironmentFromUserWorkloadsSecretName', () => { - const result = client.matchEnvironmentFromUserWorkloadsSecretName(fakePath); - assert.strictEqual(result, "environmentValue"); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - - it('matchUserWorkloadsSecretFromUserWorkloadsSecretName', () => { - const result = client.matchUserWorkloadsSecretFromUserWorkloadsSecretName(fakePath); - assert.strictEqual(result, "userWorkloadsSecretValue"); - assert((client.pathTemplates.userWorkloadsSecretPathTemplate.match as SinonStub) - .getCall(-1).calledWith(fakePath)); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/tsconfig.json b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/tsconfig.json deleted file mode 100644 index c78f1c884ef..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/tsconfig.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2018", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts" - ] -} diff --git a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/webpack.config.js b/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/webpack.config.js deleted file mode 100644 index 9b7becac60a..00000000000 --- a/owl-bot-staging/google-cloud-orchestration-airflow-service/v1beta1/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: 'Environments', - filename: './environments.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-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto index ba6e5ec763a..cd66e2d6e18 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto +++ b/packages/google-cloud-orchestration-airflow-service/protos/google/cloud/orchestration/airflow/service/v1beta1/environments.proto @@ -2068,6 +2068,9 @@ message Environment { // Output only. Reserved for future use. bool satisfies_pzs = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. Reserved for future use. + bool satisfies_pzi = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + // Optional. Storage configuration for this environment. StorageConfig storage_config = 9 [(google.api.field_behavior) = OPTIONAL]; } diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts index 06bf69a798f..372a92b6293 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.d.ts @@ -17139,6 +17139,9 @@ export namespace google { /** Environment satisfiesPzs */ satisfiesPzs?: (boolean|null); + /** Environment satisfiesPzi */ + satisfiesPzi?: (boolean|null); + /** Environment storageConfig */ storageConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig|null); } @@ -17176,6 +17179,9 @@ export namespace google { /** Environment satisfiesPzs. */ public satisfiesPzs: boolean; + /** Environment satisfiesPzi. */ + public satisfiesPzi: boolean; + /** Environment storageConfig. */ public storageConfig?: (google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig|null); diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.js b/packages/google-cloud-orchestration-airflow-service/protos/protos.js index 13340da4bdb..c496819af1c 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.js +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.js @@ -40185,6 +40185,7 @@ * @property {google.protobuf.ITimestamp|null} [updateTime] Environment updateTime * @property {Object.|null} [labels] Environment labels * @property {boolean|null} [satisfiesPzs] Environment satisfiesPzs + * @property {boolean|null} [satisfiesPzi] Environment satisfiesPzi * @property {google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig|null} [storageConfig] Environment storageConfig */ @@ -40268,6 +40269,14 @@ */ Environment.prototype.satisfiesPzs = false; + /** + * Environment satisfiesPzi. + * @member {boolean} satisfiesPzi + * @memberof google.cloud.orchestration.airflow.service.v1beta1.Environment + * @instance + */ + Environment.prototype.satisfiesPzi = false; + /** * Environment storageConfig. * @member {google.cloud.orchestration.airflow.service.v1beta1.IStorageConfig|null|undefined} storageConfig @@ -40319,6 +40328,8 @@ writer.uint32(/* id 8, wireType 0 =*/64).bool(message.satisfiesPzs); if (message.storageConfig != null && Object.hasOwnProperty.call(message, "storageConfig")) $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.encode(message.storageConfig, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.satisfiesPzi); return writer; }; @@ -40404,6 +40415,10 @@ message.satisfiesPzs = reader.bool(); break; } + case 10: { + message.satisfiesPzi = reader.bool(); + break; + } case 9: { message.storageConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.decode(reader, reader.uint32()); break; @@ -40487,6 +40502,9 @@ 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.storageConfig != null && message.hasOwnProperty("storageConfig")) { var error = $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.verify(message.storageConfig); if (error) @@ -40567,6 +40585,8 @@ } if (object.satisfiesPzs != null) message.satisfiesPzs = Boolean(object.satisfiesPzs); + if (object.satisfiesPzi != null) + message.satisfiesPzi = Boolean(object.satisfiesPzi); if (object.storageConfig != null) { if (typeof object.storageConfig !== "object") throw TypeError(".google.cloud.orchestration.airflow.service.v1beta1.Environment.storageConfig: object expected"); @@ -40599,6 +40619,7 @@ object.updateTime = null; object.satisfiesPzs = false; object.storageConfig = null; + object.satisfiesPzi = false; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -40622,6 +40643,8 @@ object.satisfiesPzs = message.satisfiesPzs; if (message.storageConfig != null && message.hasOwnProperty("storageConfig")) object.storageConfig = $root.google.cloud.orchestration.airflow.service.v1beta1.StorageConfig.toObject(message.storageConfig, options); + if (message.satisfiesPzi != null && message.hasOwnProperty("satisfiesPzi")) + object.satisfiesPzi = message.satisfiesPzi; return object; }; diff --git a/packages/google-cloud-orchestration-airflow-service/protos/protos.json b/packages/google-cloud-orchestration-airflow-service/protos/protos.json index 4348e3c45c4..2593c83f537 100644 --- a/packages/google-cloud-orchestration-airflow-service/protos/protos.json +++ b/packages/google-cloud-orchestration-airflow-service/protos/protos.json @@ -4489,6 +4489,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY" } }, + "satisfiesPzi": { + "type": "bool", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "storageConfig": { "type": "StorageConfig", "id": 9,